diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..91354c172 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: maven + directory: "/" + schedule: + interval: daily + time: "09:00" + open-pull-requests-limit: 10 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..f5877a770 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: build +on: + push: + branches: + - master + - /\d\.0\.0-RC/ + pull_request: + branches: + - master + - /\d\.0\.0-RC/ +jobs: + builds-tests-coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + - uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Run build steps and generate coverage report + run: | + mvn verify javadoc:javadoc jacoco:report -Pcoverage -B -V + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v5 + with: + file: ./**/target/site/jacoco/jacoco.xml + name: codecov + fail_ci_if_error: false diff --git a/.sonar.settings b/.sonar.settings index 7aeeae863..1611fb1fa 100644 --- a/.sonar.settings +++ b/.sonar.settings @@ -1,2 +1,2 @@ # Settings for sonar scan -gdc.java_version=openjdk-11 +gdc.java_version=openjdk-17 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e8be7cbb7..000000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: java -# Skip the Travis Installation Phase (installation of dependencies: `mvn install -DskipTests=true`) -install: true -# Customized build command (default is only `mvn test`) -script: mvn verify javadoc:javadoc coveralls:report -Pcoverage -B -V -jdk: - - openjdk11 -branches: - only: - - master - - /\d\.0\.0-RC/ -# Cache Maven repo between Travis builds -cache: - directories: - - '$HOME/.m2/repository' diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index a734e49fb..ad99aa3bf 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,5 +1,5 @@ # Contributor Code of Conduct -This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters. +This project adheres to No Code of Conduct. We are all adults. We accept anyone's contributions. Nothing else matters. For more information please visit the [No Code of Conduct](https://github.com/domgetter/NCoC) homepage. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2d37ed5fc..150b45ca6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,73 +5,92 @@ Below are few **rules, recommendations and best practices** we try to follow whe ## Paperwork ### Committer + * The **commit message**: - * must be written in the **imperative mood** - * must clearly **explain rationale** behind this change (describe _why_ you are doing the change rather than _what_ you are changing) + * must be written in the **imperative mood** + * must clearly **explain rationale** behind this change (describe _why_ you are doing the change rather than _what_ + you are changing) * The **pull request**: - * with non-trivial change must be **[associated with an issue](https://help.github.com/articles/closing-issues-via-commit-messages/)** + * with non-trivial, non-dependencies change must be * + *[associated with an issue](https://help.github.com/articles/closing-issues-via-commit-messages/)** * Add usage examples of new high level functionality to -[documentation](https://github.com/gooddata/gooddata-java/wiki/Code-Examples). + [documentation](https://github.com/gooddata/gooddata-java/wiki/Code-Examples). ### Reviewer + Ensure pull request and issues are - * **properly labeled** (trivial/bug/enhancement/backward incompatible/...) - * marked with exactly one **milestone version** + +* **properly labeled** (trivial/bug/enhancement/backward incompatible/...) +* marked with exactly one **milestone version** ## Design ### Structure + * **Package names** for DTOs and services should be named in the same manner as REST API. * Don't create single implementation interfaces for services. ### DTOs + * All DTOs which can be updated should be **mutable**. Please keep mutable only the fields which are subject of change, -the rest should be immutable. + the rest should be immutable. * Create method named `String getUri()` to provide **URI string to self**. * Introduce **constant** with URI: - * ```java + * ```java public static final String URI = "/gdc/someresource/{resource-id}"; ``` - * If you need also constants with `UriTemplate`, do not put them into DTOs not to drag Spring dependency into model module. + * If you need also constants with `UriTemplate`, do not put them into DTOs not to drag Spring dependency into model + module. * Put _Jackson_ annotations on getters rather then on fields. * Consider the **visibility** - use `package protected` when DTO is not intended for SDK user, but is needed -in related service. + in related service. * Test all DTOs using _[JsonUnit](https://github.com/lukas-krecan/JsonUnit)_. * **Naming**: - * `Uri` for _URI string_ of some resource - * `Link` for structure containing at least _category_ (e.g. "self") and _URI string_ - (can contain also others like _title_, _summary_, etc.) + * `Uri` for _URI string_ of some resource + * `Link` for structure containing at least _category_ (e.g. "self") and _URI string_ + (can contain also others like _title_, _summary_, etc.) ### Enums + * Use enums sparingly, because they don't work with REST API changes (eg. new value added on the backend) **never use -them when deserializing**. + them when deserializing**. * Where make sense, use overloaded methods with an enum argument as well as `String` argument. ### Services + * When programming client for some polling return [`FutureResult`](src/main/java/com/gooddata/FutureResult.java) -to enable user asynchronous call. + to enable user asynchronous call. * Create custom [`GoodDataException`](src/main/java/com/gooddata/GoodDataException.java) when you feel the case -is specific enough. + is specific enough. * Prefer DTOs to `String` or primitive arguments. * **Method naming**: - * `get*()` when searching form single object (throw exception when no or multiple objects are found, - never return `null`) - * `find*()` when searching for multiple objects (collection of objects, never return `null`) - * `list*()` when listing whole or paged collection of objects (return collection or collection wrapped by DTO) - * `remove*()` (i.e. `remove(Project project)`) instead od `delete*()` -* Write **integration tests** for services using _[Jadler](https://github.com/jadler-mocking/jadler/wiki)_. -* If it is possible write **acceptance tests** to be run with the real backend. + * `get*()` when searching form single object (throw exception when no or multiple objects are found, + never return `null`) + * `find*()` when searching for multiple objects (collection of objects, never return `null`) + * `list*()` when listing whole or paged collection of objects (return collection or collection wrapped by DTO) + * `remove*()` (i.e. `remove(Project project)`) instead od `delete*()` +* In addition to unit tests, write also **integration tests** and **acceptance tests** if possible. See "What to test + where" in "Best practices" below. * Update [documentation](https://github.com/gooddata/gooddata-java/wiki/Code-Examples) with usage examples. ## Best practices -* **Test class naming**: - * `*Test` unit tests, but avoid service tests using mocked `RestTemplate` - use integration test - * `*IT` integration tests (see [`AbstractGoodDataIT`](src/test/java/com/gooddata/AbstractGoodDataIT.java)) - * `*AT` acceptance tests + +* **What to test where**: + * `*Test` = unit tests + * focus on verifying bussiness logic, corner cases, various input combinations, etc. + * avoid service tests using mocked `RestTemplate` - use integration tests with mocked API responses instead + * `*IT` = integration tests + * focus on verifying all possible outcomes of API calls + * see common ancestor [`AbstractGoodDataIT`](src/test/java/com/gooddata/AbstractGoodDataIT.java) setting + up [Jadler](https://github.com/jadler-mocking/jadler/wiki) for API mocking + * `*AT` = acceptance tests + * focus on verifying the happy path against the real backend (so we're sure mocks in ITs are correct) + * see common ancestor [`AbstractGoodDataAT`](src/test/java/com/gooddata/AbstractGoodDataAT.java) setting up + GoodData endpoint based on passed environment variables * Everything public should be **documented** using _javadoc_. * When you need some **utility code**, look for handy utilities in used libraries first (e.g. _Spring_ has -its `StreamUtils`, `FileCopyUtils`, ...). When you decide to create new utility class, -use _abstract utility class pattern_. + its `StreamUtils`, `FileCopyUtils`, ...). When you decide to create new utility class, + use _abstract utility class pattern_. ## Release candidates diff --git a/LICENSE.txt b/LICENSE.txt index 33b622ec7..4c1fba780 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -2,7 +2,7 @@ GoodData Java SDK BSD License -Copyright (c) 2014, GoodData Corporation +Copyright (c) 2014-2025, GoodData Corporation Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -25,3 +25,4058 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +================================================================================ +This product includes a number of subcomponents with separate copyright notices and license terms below. +Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license. +================================================================================ + +================================================================================ + TABLE OF CONTENTS + +================================================================================ +PART 1: SUBCOMPONENTS + +- AOP alliance (1.0) [public-domain] +- Apache Ant Core (1.10.3) [Apache-2.0] +- Apache Ant Launcher (1.10.3) [Apache-2.0] +- Apache Commons IO (2.21.0) [Apache-2.0] +- Apache Commons Lang (3.20.0) [Apache-2.0] +- Apache Groovy (4.0.28) [Apache-2.0] +- gooddata-http-client (3.0.0-SNAPSHOT) [BSD-3-Clause] +- gooddata-rest-common (3.0.0) [BSD-3-Clause] +- Gson (2.3.1) [Apache-2.0] +- Guava: Google Core Libraries for Java (17.0) [Apache-2.0, CC0-1.0] +- Hamcrest (2.2) [BSD-3-Clause] +- Hamcrest Core (2.2) [BSD-3-Clause] +- Jackson-annotations (2.13.0) [Apache-2.0] +- Jackson-core (2.13.0) [Apache-2.0] +- jackson-databind (2.13.4) [Apache-2.0] +- jadler-all (1.3.1) [MIT, Apache-2.0] +- jadler-core (1.3.1) [MIT, Apache-2.0] +- jakarta.inject (1) [Apache-2.0] +- jcommander (1.78) [Apache-2.0] +- JSON in Java (20090211) [JSON] +- json-unit (2.36.0) [Apache-2.0] +- json-unit-core (2.36.0) [Apache-2.0] +- JSONassert (1.2.3) [Apache-2.0] +- JUnit (4.12) [CPL-1.0] +- Mockito (5.14.2) [MIT, Apache-2.0] +- Objenesis (3.2) [MIT] +- Sardine WebDAV client (5.13) [Apache-2.0] +- Shazamcrest (0.11) [Apache-2.0] +- SLF4J API Module (2.0.17) [MIT] +- SLF4J Simple Binding (2.0.17) [MIT] +- SnakeYAML (1.21) [Apache-2.0, Multi-license: LGPL-2.1-or-later OR GPL-2.0-or-later OR EPL-1.0 OR BSD-3-Clause OR Apache-2.0] +- Spock Framework - Core Module (2.4-M1-groovy-4.0) [Apache-2.0] +- Spring Beans (6.0.15) [Apache-2.0] +- Spring Context (6.0.15) [Apache-2.0] +- Spring Core (6.0.15) [BSD-3-Clause, Apache-2.0] +- Spring Retry (2.0.12) [Apache-2.0] +- Spring Web (6.0.15) [Apache-2.0] +- testng (7.11.0) [Apache-2.0, AML] + +PART 2: LICENSES APPENDIX +Apache 2.0 +Creative commons Zero v1.0 Universal + +[END TABLE OF CONTENTS] +================================================================================ +PART 1: SUBCOMPONENTS +================================================================================ + +-------------------------------------------------------------------------------- +AOP alliance (1.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +public-domain + + +-------------------------------------------------------------------------------- +Apache Ant Core (1.10.3) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +/* + * Apache License + * Version 2.0, January 2004 + * http://www.apache.org/licenses/ + * + * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + * + * 1. Definitions. + * + * "License" shall mean the terms and conditions for use, reproduction, + * and distribution as defined by Sections 1 through 9 of this document. + * + * "Licensor" shall mean the copyright owner or entity authorized by + * the copyright owner that is granting the License. + * + * "Legal Entity" shall mean the union of the acting entity and all + * other entities that control, are controlled by, or are under common + * control with that entity. For the purposes of this definition, + * "control" means (i) the power, direct or indirect, to cause the + * direction or management of such entity, whether by contract or + * otherwise, or (ii) ownership of fifty percent (50%) or more of the + * outstanding shares, or (iii) beneficial ownership of such entity. + * + * "You" (or "Your") shall mean an individual or Legal Entity + * exercising permissions granted by this License. + * + * "Source" form shall mean the preferred form for making modifications, + * including but not limited to software source code, documentation + * source, and configuration files. + * + * "Object" form shall mean any form resulting from mechanical + * transformation or translation of a Source form, including but + * not limited to compiled object code, generated documentation, + * and conversions to other media types. + * + * "Work" shall mean the work of authorship, whether in Source or + * Object form, made available under the License, as indicated by a + * copyright notice that is included in or attached to the work + * (an example is provided in the Appendix below). + * + * "Derivative Works" shall mean any work, whether in Source or Object + * form, that is based on (or derived from) the Work and for which the + * editorial revisions, annotations, elaborations, or other modifications + * represent, as a whole, an original work of authorship. For the purposes + * of this License, Derivative Works shall not include works that remain + * separable from, or merely link (or bind by name) to the interfaces of, + * the Work and Derivative Works thereof. + * + * "Contribution" shall mean any work of authorship, including + * the original version of the Work and any modifications or additions + * to that Work or Derivative Works thereof, that is intentionally + * submitted to Licensor for inclusion in the Work by the copyright owner + * or by an individual or Legal Entity authorized to submit on behalf of + * the copyright owner. For the purposes of this definition, "submitted" + * means any form of electronic, verbal, or written communication sent + * to the Licensor or its representatives, including but not limited to + * communication on electronic mailing lists, source code control systems, + * and issue tracking systems that are managed by, or on behalf of, the + * Licensor for the purpose of discussing and improving the Work, but + * excluding communication that is conspicuously marked or otherwise + * designated in writing by the copyright owner as "Not a Contribution." + * + * "Contributor" shall mean Licensor and any individual or Legal Entity + * on behalf of whom a Contribution has been received by Licensor and + * subsequently incorporated within the Work. + * + * 2. Grant of Copyright License. Subject to the terms and conditions of + * this License, each Contributor hereby grants to You a perpetual, + * worldwide, non-exclusive, no-charge, royalty-free, irrevocable + * copyright license to reproduce, prepare Derivative Works of, + * publicly display, publicly perform, sublicense, and distribute the + * Work and such Derivative Works in Source or Object form. + * + * 3. Grant of Patent License. Subject to the terms and conditions of + * this License, each Contributor hereby grants to You a perpetual, + * worldwide, non-exclusive, no-charge, royalty-free, irrevocable + * (except as stated in this section) patent license to make, have made, + * use, offer to sell, sell, import, and otherwise transfer the Work, + * where such license applies only to those patent claims licensable + * by such Contributor that are necessarily infringed by their + * Contribution(s) alone or by combination of their Contribution(s) + * with the Work to which such Contribution(s) was submitted. If You + * institute patent litigation against any entity (including a + * cross-claim or counterclaim in a lawsuit) alleging that the Work + * or a Contribution incorporated within the Work constitutes direct + * or contributory patent infringement, then any patent licenses + * granted to You under this License for that Work shall terminate + * as of the date such litigation is filed. + * + * 4. Redistribution. You may reproduce and distribute copies of the + * Work or Derivative Works thereof in any medium, with or without + * modifications, and in Source or Object form, provided that You + * meet the following conditions: + * + * (a) You must give any other recipients of the Work or + * Derivative Works a copy of this License; and + * + * (b) You must cause any modified files to carry prominent notices + * stating that You changed the files; and + * + * (c) You must retain, in the Source form of any Derivative Works + * that You distribute, all copyright, patent, trademark, and + * attribution notices from the Source form of the Work, + * excluding those notices that do not pertain to any part of + * the Derivative Works; and + * + * (d) If the Work includes a "NOTICE" text file as part of its + * distribution, then any Derivative Works that You distribute must + * include a readable copy of the attribution notices contained + * within such NOTICE file, excluding those notices that do not + * pertain to any part of the Derivative Works, in at least one + * of the following places: within a NOTICE text file distributed + * as part of the Derivative Works; within the Source form or + * documentation, if provided along with the Derivative Works; or, + * within a display generated by the Derivative Works, if and + * wherever such third-party notices normally appear. The contents + * of the NOTICE file are for informational purposes only and + * do not modify the License. You may add Your own attribution + * notices within Derivative Works that You distribute, alongside + * or as an addendum to the NOTICE text from the Work, provided + * that such additional attribution notices cannot be construed + * as modifying the License. + * + * You may add Your own copyright statement to Your modifications and + * may provide additional or different license terms and conditions + * for use, reproduction, or distribution of Your modifications, or + * for any such Derivative Works as a whole, provided Your use, + * reproduction, and distribution of the Work otherwise complies with + * the conditions stated in this License. + * + * 5. Submission of Contributions. Unless You explicitly state otherwise, + * any Contribution intentionally submitted for inclusion in the Work + * by You to the Licensor shall be under the terms and conditions of + * this License, without any additional terms or conditions. + * Notwithstanding the above, nothing herein shall supersede or modify + * the terms of any separate license agreement you may have executed + * with Licensor regarding such Contributions. + * + * 6. Trademarks. This License does not grant permission to use the trade + * names, trademarks, service marks, or product names of the Licensor, + * except as required for reasonable and customary use in describing the + * origin of the Work and reproducing the content of the NOTICE file. + * + * 7. Disclaimer of Warranty. Unless required by applicable law or + * agreed to in writing, Licensor provides the Work (and each + * Contributor provides its Contributions) on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied, including, without limitation, any warranties or conditions + * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + * PARTICULAR PURPOSE. You are solely responsible for determining the + * appropriateness of using or redistributing the Work and assume any + * risks associated with Your exercise of permissions under this License. + * + * 8. Limitation of Liability. In no event and under no legal theory, + * whether in tort (including negligence), contract, or otherwise, + * unless required by applicable law (such as deliberate and grossly + * negligent acts) or agreed to in writing, shall any Contributor be + * liable to You for damages, including any direct, indirect, special, + * incidental, or consequential damages of any character arising as a + * result of this License or out of the use or inability to use the + * Work (including but not limited to damages for loss of goodwill, + * work stoppage, computer failure or malfunction, or any and all + * other commercial damages or losses), even if such Contributor + * has been advised of the possibility of such damages. + * + * 9. Accepting Warranty or Additional Liability. While redistributing + * the Work or Derivative Works thereof, You may choose to offer, + * and charge a fee for, acceptance of support, warranty, indemnity, + * or other liability obligations and/or rights consistent with this + * License. However, in accepting such obligations, You may act only + * on Your own behalf and on Your sole responsibility, not on behalf + * of any other Contributor, and only if You agree to indemnify, + * defend, and hold each Contributor harmless for any liability + * incurred by, or claims asserted against, such Contributor by reason + * of your accepting any such warranty or additional liability. + * + * END OF TERMS AND CONDITIONS + * + * APPENDIX: How to apply the Apache License to your work. + * + * To apply the Apache License to your work, attach the following + * boilerplate notice, with the fields enclosed by brackets "[]" + * replaced with your own identifying information. (Don't include + * the brackets!) The text should be enclosed in the appropriate + * comment syntax for the file format. We also recommend that a + * file or class name and description of purpose be included on the + * same "printed page" as the copyright notice for easier + * identification within third-party archives. + * + * Copyright [yyyy] [name of copyright owner] + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +W3C� SOFTWARE NOTICE AND LICENSE +http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +This work (and included software, documentation such as READMEs, or other +related items) is being provided by the copyright holders under the following +license. By obtaining, using and/or copying this work, you (the licensee) agree +that you have read, understood, and will comply with the following terms and +conditions. + +Permission to copy, modify, and distribute this software and its documentation, +with or without modification, for any purpose and without fee or royalty is +hereby granted, provided that you include the following on ALL copies of the +software and documentation or portions thereof, including modifications: + + 1. The full text of this NOTICE in a location viewable to users of the + redistributed or derivative work. + 2. Any pre-existing intellectual property disclaimers, notices, or terms + and conditions. If none exist, the W3C Software Short Notice should be + included (hypertext is preferred, text is permitted) within the body + of any redistributed or derivative code. + 3. Notice of any changes or modifications to the files, including the date + changes were made. (We recommend you provide URIs to the location from + which the code is derived.) + +THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE +NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT +THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY +PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. + +The name and trademarks of copyright holders may NOT be used in advertising or +publicity pertaining to the software without specific, written prior permission. +Title to copyright in this software and any associated documentation will at +all times remain with copyright holders. + +____________________________________ + +This formulation of W3C's notice and license became active on December 31 2002. +This version removes the copyright ownership notice such that this license can +be used with materials other than those owned by the W3C, reflects that ERCIM +is now a host of the W3C, includes references to this specific dated version of +the license, and removes the ambiguous grant of "use". Otherwise, this version +is the same as the previous version and is written so as to preserve the Free +Software Foundation's assessment of GPL compatibility and OSI's certification +under the Open Source Definition. Please see our Copyright FAQ for common +questions about using materials from our site, including specific terms and +conditions for packages like libwww, Amaya, and Jigsaw. Other questions about +this notice can be directed to site-policy@w3.org. + +Joseph Reagle + +This license came from: http://www.megginson.com/SAX/copying.html + However please note future versions of SAX may be covered + under http://saxproject.org/?selected=pd + +SAX2 is Free! + +I hereby abandon any property rights to SAX 2.0 (the Simple API for +XML), and release all of the SAX 2.0 source code, compiled code, and +documentation contained in this distribution into the Public Domain. +SAX comes with NO WARRANTY or guarantee of fitness for any +purpose. + +David Megginson, david@megginson.com +2000-05-05 + + + +-------------------------------------------------------------------------------- +Apache Ant Launcher (1.10.3) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +/* + * Apache License + * Version 2.0, January 2004 + * http://www.apache.org/licenses/ + * + * TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + * + * 1. Definitions. + * + * "License" shall mean the terms and conditions for use, reproduction, + * and distribution as defined by Sections 1 through 9 of this document. + * + * "Licensor" shall mean the copyright owner or entity authorized by + * the copyright owner that is granting the License. + * + * "Legal Entity" shall mean the union of the acting entity and all + * other entities that control, are controlled by, or are under common + * control with that entity. For the purposes of this definition, + * "control" means (i) the power, direct or indirect, to cause the + * direction or management of such entity, whether by contract or + * otherwise, or (ii) ownership of fifty percent (50%) or more of the + * outstanding shares, or (iii) beneficial ownership of such entity. + * + * "You" (or "Your") shall mean an individual or Legal Entity + * exercising permissions granted by this License. + * + * "Source" form shall mean the preferred form for making modifications, + * including but not limited to software source code, documentation + * source, and configuration files. + * + * "Object" form shall mean any form resulting from mechanical + * transformation or translation of a Source form, including but + * not limited to compiled object code, generated documentation, + * and conversions to other media types. + * + * "Work" shall mean the work of authorship, whether in Source or + * Object form, made available under the License, as indicated by a + * copyright notice that is included in or attached to the work + * (an example is provided in the Appendix below). + * + * "Derivative Works" shall mean any work, whether in Source or Object + * form, that is based on (or derived from) the Work and for which the + * editorial revisions, annotations, elaborations, or other modifications + * represent, as a whole, an original work of authorship. For the purposes + * of this License, Derivative Works shall not include works that remain + * separable from, or merely link (or bind by name) to the interfaces of, + * the Work and Derivative Works thereof. + * + * "Contribution" shall mean any work of authorship, including + * the original version of the Work and any modifications or additions + * to that Work or Derivative Works thereof, that is intentionally + * submitted to Licensor for inclusion in the Work by the copyright owner + * or by an individual or Legal Entity authorized to submit on behalf of + * the copyright owner. For the purposes of this definition, "submitted" + * means any form of electronic, verbal, or written communication sent + * to the Licensor or its representatives, including but not limited to + * communication on electronic mailing lists, source code control systems, + * and issue tracking systems that are managed by, or on behalf of, the + * Licensor for the purpose of discussing and improving the Work, but + * excluding communication that is conspicuously marked or otherwise + * designated in writing by the copyright owner as "Not a Contribution." + * + * "Contributor" shall mean Licensor and any individual or Legal Entity + * on behalf of whom a Contribution has been received by Licensor and + * subsequently incorporated within the Work. + * + * 2. Grant of Copyright License. Subject to the terms and conditions of + * this License, each Contributor hereby grants to You a perpetual, + * worldwide, non-exclusive, no-charge, royalty-free, irrevocable + * copyright license to reproduce, prepare Derivative Works of, + * publicly display, publicly perform, sublicense, and distribute the + * Work and such Derivative Works in Source or Object form. + * + * 3. Grant of Patent License. Subject to the terms and conditions of + * this License, each Contributor hereby grants to You a perpetual, + * worldwide, non-exclusive, no-charge, royalty-free, irrevocable + * (except as stated in this section) patent license to make, have made, + * use, offer to sell, sell, import, and otherwise transfer the Work, + * where such license applies only to those patent claims licensable + * by such Contributor that are necessarily infringed by their + * Contribution(s) alone or by combination of their Contribution(s) + * with the Work to which such Contribution(s) was submitted. If You + * institute patent litigation against any entity (including a + * cross-claim or counterclaim in a lawsuit) alleging that the Work + * or a Contribution incorporated within the Work constitutes direct + * or contributory patent infringement, then any patent licenses + * granted to You under this License for that Work shall terminate + * as of the date such litigation is filed. + * + * 4. Redistribution. You may reproduce and distribute copies of the + * Work or Derivative Works thereof in any medium, with or without + * modifications, and in Source or Object form, provided that You + * meet the following conditions: + * + * (a) You must give any other recipients of the Work or + * Derivative Works a copy of this License; and + * + * (b) You must cause any modified files to carry prominent notices + * stating that You changed the files; and + * + * (c) You must retain, in the Source form of any Derivative Works + * that You distribute, all copyright, patent, trademark, and + * attribution notices from the Source form of the Work, + * excluding those notices that do not pertain to any part of + * the Derivative Works; and + * + * (d) If the Work includes a "NOTICE" text file as part of its + * distribution, then any Derivative Works that You distribute must + * include a readable copy of the attribution notices contained + * within such NOTICE file, excluding those notices that do not + * pertain to any part of the Derivative Works, in at least one + * of the following places: within a NOTICE text file distributed + * as part of the Derivative Works; within the Source form or + * documentation, if provided along with the Derivative Works; or, + * within a display generated by the Derivative Works, if and + * wherever such third-party notices normally appear. The contents + * of the NOTICE file are for informational purposes only and + * do not modify the License. You may add Your own attribution + * notices within Derivative Works that You distribute, alongside + * or as an addendum to the NOTICE text from the Work, provided + * that such additional attribution notices cannot be construed + * as modifying the License. + * + * You may add Your own copyright statement to Your modifications and + * may provide additional or different license terms and conditions + * for use, reproduction, or distribution of Your modifications, or + * for any such Derivative Works as a whole, provided Your use, + * reproduction, and distribution of the Work otherwise complies with + * the conditions stated in this License. + * + * 5. Submission of Contributions. Unless You explicitly state otherwise, + * any Contribution intentionally submitted for inclusion in the Work + * by You to the Licensor shall be under the terms and conditions of + * this License, without any additional terms or conditions. + * Notwithstanding the above, nothing herein shall supersede or modify + * the terms of any separate license agreement you may have executed + * with Licensor regarding such Contributions. + * + * 6. Trademarks. This License does not grant permission to use the trade + * names, trademarks, service marks, or product names of the Licensor, + * except as required for reasonable and customary use in describing the + * origin of the Work and reproducing the content of the NOTICE file. + * + * 7. Disclaimer of Warranty. Unless required by applicable law or + * agreed to in writing, Licensor provides the Work (and each + * Contributor provides its Contributions) on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied, including, without limitation, any warranties or conditions + * of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + * PARTICULAR PURPOSE. You are solely responsible for determining the + * appropriateness of using or redistributing the Work and assume any + * risks associated with Your exercise of permissions under this License. + * + * 8. Limitation of Liability. In no event and under no legal theory, + * whether in tort (including negligence), contract, or otherwise, + * unless required by applicable law (such as deliberate and grossly + * negligent acts) or agreed to in writing, shall any Contributor be + * liable to You for damages, including any direct, indirect, special, + * incidental, or consequential damages of any character arising as a + * result of this License or out of the use or inability to use the + * Work (including but not limited to damages for loss of goodwill, + * work stoppage, computer failure or malfunction, or any and all + * other commercial damages or losses), even if such Contributor + * has been advised of the possibility of such damages. + * + * 9. Accepting Warranty or Additional Liability. While redistributing + * the Work or Derivative Works thereof, You may choose to offer, + * and charge a fee for, acceptance of support, warranty, indemnity, + * or other liability obligations and/or rights consistent with this + * License. However, in accepting such obligations, You may act only + * on Your own behalf and on Your sole responsibility, not on behalf + * of any other Contributor, and only if You agree to indemnify, + * defend, and hold each Contributor harmless for any liability + * incurred by, or claims asserted against, such Contributor by reason + * of your accepting any such warranty or additional liability. + * + * END OF TERMS AND CONDITIONS + * + * APPENDIX: How to apply the Apache License to your work. + * + * To apply the Apache License to your work, attach the following + * boilerplate notice, with the fields enclosed by brackets "[]" + * replaced with your own identifying information. (Don't include + * the brackets!) The text should be enclosed in the appropriate + * comment syntax for the file format. We also recommend that a + * file or class name and description of purpose be included on the + * same "printed page" as the copyright notice for easier + * identification within third-party archives. + * + * Copyright [yyyy] [name of copyright owner] + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +W3C� SOFTWARE NOTICE AND LICENSE +http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +This work (and included software, documentation such as READMEs, or other +related items) is being provided by the copyright holders under the following +license. By obtaining, using and/or copying this work, you (the licensee) agree +that you have read, understood, and will comply with the following terms and +conditions. + +Permission to copy, modify, and distribute this software and its documentation, +with or without modification, for any purpose and without fee or royalty is +hereby granted, provided that you include the following on ALL copies of the +software and documentation or portions thereof, including modifications: + + 1. The full text of this NOTICE in a location viewable to users of the + redistributed or derivative work. + 2. Any pre-existing intellectual property disclaimers, notices, or terms + and conditions. If none exist, the W3C Software Short Notice should be + included (hypertext is preferred, text is permitted) within the body + of any redistributed or derivative code. + 3. Notice of any changes or modifications to the files, including the date + changes were made. (We recommend you provide URIs to the location from + which the code is derived.) + +THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE +NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT +THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY +PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. + +The name and trademarks of copyright holders may NOT be used in advertising or +publicity pertaining to the software without specific, written prior permission. +Title to copyright in this software and any associated documentation will at +all times remain with copyright holders. + +____________________________________ + +This formulation of W3C's notice and license became active on December 31 2002. +This version removes the copyright ownership notice such that this license can +be used with materials other than those owned by the W3C, reflects that ERCIM +is now a host of the W3C, includes references to this specific dated version of +the license, and removes the ambiguous grant of "use". Otherwise, this version +is the same as the previous version and is written so as to preserve the Free +Software Foundation's assessment of GPL compatibility and OSI's certification +under the Open Source Definition. Please see our Copyright FAQ for common +questions about using materials from our site, including specific terms and +conditions for packages like libwww, Amaya, and Jigsaw. Other questions about +this notice can be directed to site-policy@w3.org. + +Joseph Reagle + +This license came from: http://www.megginson.com/SAX/copying.html + However please note future versions of SAX may be covered + under http://saxproject.org/?selected=pd + +SAX2 is Free! + +I hereby abandon any property rights to SAX 2.0 (the Simple API for +XML), and release all of the SAX 2.0 source code, compiled code, and +documentation contained in this distribution into the Public Domain. +SAX comes with NO WARRANTY or guarantee of fitness for any +purpose. + +David Megginson, david@megginson.com +2000-05-05 + + + +-------------------------------------------------------------------------------- +Apache Commons IO (2.11.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + +-------------------------------------------------------------------------------- +Apache Commons Lang (3.12.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Apache Commons Lang +Copyright 2001-2021 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (https://www.apache.org/). + + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + + +-------------------------------------------------------------------------------- +Apache Groovy (3.0.11) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2013 Terence Parr, Sam Harwell + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Apache Groovy (2.5.7) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright ownership. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Apache Groovy (2.5.4) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright ownership. The ASF licenses this file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Apache Groovy (2.5.4) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright ownership. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Apache Groovy (2.5.4) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright ownership. The ASF licenses this file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Apache Groovy (2.5.4) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright ownership. The ASF licenses this file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Apache Groovy (2.5.4) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright ownership. The ASF licenses this file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Apache Groovy (2.5.4) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright ownership. The ASF licenses this file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Apache Groovy (2.5.4) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright ownership. The ASF licenses this file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Apache HttpClient (4.5.13) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + + +Apache HttpClient +Copyright 1999-2020 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). +__________________ +* Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + + +-------------------------------------------------------------------------------- +Apache HttpCore (4.4.15) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Apache HttpCore +Copyright 2005-2021 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). +_____________ + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + + +-------------------------------------------------------------------------------- +Byte Buddy (without dependencies) (1.12.1) +-------------------------------------------------------------------------------- + +* Declared Licenses * + + +* Other Licenses * +BSD-3-Clause, Apache-2.0 + + +// ASM: a very small and fast Java bytecode manipulation framework +// Copyright (c) 2000-2011 INRIA, France Telecom +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the copyright holders nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. + + + * Copyright 2014 - Present Rafael Winterhalter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + + +-------------------------------------------------------------------------------- +Byte Buddy agent (1.12.1) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + + +-------------------------------------------------------------------------------- +cglib-nodep (3.3.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +-------------------------------------------------------------------------------- +EqualsVerifier | release normal jar (3.7.2) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2022, EqualsVerifier | release normal jar Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +EqualsVerifier | release normal jar (3.10) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2022, EqualsVerifier | release normal jar Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +gooddata-http-client (1.0.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +BSD-3-Clause + +Copyright (c) 2007-2016, GoodData . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- +gooddata-http-client (1.0.0+java7.fix1) +-------------------------------------------------------------------------------- + +* Declared Licenses * +BSD-3-Clause + +Copyright (c) 2007-2016, GoodData . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- +gooddata-rest-common (2.0.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +BSD-3-Clause + +Copyright (c) 2004-2017, GoodData . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- +Gson (2.3.1) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2008 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Guava: Google Core Libraries for Java (17.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * + + +* Other Licenses * +Apache-2.0, CC0-1.0 + + + * Copyright (C) 2008 The Guava Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + + + * Written by Doug Lea with assistance from members of JCP JSR-166 + * Expert Group and released to the public domain, as explained at + * http://creativecommons.org/publicdomain/zero/1.0/ + + +-------------------------------------------------------------------------------- +Hamcrest (2.2) +-------------------------------------------------------------------------------- + +* Declared Licenses * +BSD-3-Clause + +Copyright (c) 2022, Hamcrest Contributors . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- +Hamcrest Core (2.2) +-------------------------------------------------------------------------------- + +* Declared Licenses * +BSD-3-Clause + +Copyright (c) 2022, Hamcrest Core Contributors . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- +Jackson-annotations (2.13.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +-------------------------------------------------------------------------------- +Jackson-core (2.13.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +-------------------------------------------------------------------------------- +jackson-databind (2.13.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +-------------------------------------------------------------------------------- +jackson-databind (2.13.3) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + +-------------------------------------------------------------------------------- +jadler-all (1.3.1) +-------------------------------------------------------------------------------- + +* Declared Licenses * + + +* Other Licenses * +MIT, Apache-2.0 + + +Copyright (c) 2012 - 2016 Jadler contributors +This program is made available under the terms of the MIT License. + + + ~ Copyright (c) 2007-2011 Sonatype, Inc. All rights reserved. + ~ + ~ This program is licensed to you under the Apache License Version 2.0, + ~ and you may not use this file except in compliance with the Apache License Version 2.0. + ~ You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the Apache License Version 2.0 is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + --> + + +-------------------------------------------------------------------------------- +jadler-core (1.3.1) +-------------------------------------------------------------------------------- + +* Declared Licenses * + + +* Other Licenses * +MIT, Apache-2.0 + + +Copyright (c) 2012 - 2016 Jadler contributors +This program is made available under the terms of the MIT License. + + + ~ Copyright (c) 2007-2011 Sonatype, Inc. All rights reserved. + ~ + ~ This program is licensed to you under the Apache License Version 2.0, + ~ and you may not use this file except in compliance with the Apache License Version 2.0. + ~ You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the Apache License Version 2.0 is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. + + +-------------------------------------------------------------------------------- +jakarta.inject (1) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2009 The JSR-330 Expert Group + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +jcommander (1.78) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2010 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +JSON in Java (20090211) +-------------------------------------------------------------------------------- + +* Declared Licenses * +JSON + +Copyright (c) 2002 JSON.org +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +The Software shall be used for Good, not Evil. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +-------------------------------------------------------------------------------- +json-unit (2.28.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2009-2019 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +json-unit (2.35.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2009-2019 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +json-unit-core (2.28.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2009-2019 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +json-unit-core (2.35.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2009-2019 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +JSONassert (1.2.3) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2007-2011 Sonatype, Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +JUnit (4.12) +-------------------------------------------------------------------------------- + +* Declared Licenses * +CPL-1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 1. +DEFINITIONS +"Contribution" means: + a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. +"Contributor" means any person or entity that distributes the Program. +"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. +"Program" means the Contributions distributed in accordance with this Agreement. +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. 2. +GRANT OF RIGHTS + a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. + b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. 3. +REQUIREMENTS +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + a) it complies with the terms and conditions of this Agreement; and + b) its license agreement: + i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; + ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; + iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and + iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. +When the Program is made available in source code form: + a) it must be made available under this Agreement; and + b) a copy of this Agreement must be included with each copy of the Program. + Contributors may not remove or alter any copyright notices contained within the Program. + Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. 4. +COMMERCIAL DISTRIBUTION +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. 5. +NO WARRANTY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. 6. +DISCLAIMER OF LIABILITY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. +GENERAL +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. +If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. + + +-------------------------------------------------------------------------------- +Mockito (4.6.1) +-------------------------------------------------------------------------------- + +* Declared Licenses * + + +* Other Licenses * +MIT, Apache-2.0 + + +The MIT License + +Copyright (c) 2007 Mockito contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +Copyright 2022, Mockito Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Mockito (4.1.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * + + +* Other Licenses * +MIT, Apache-2.0 + + +The MIT License + +Copyright (c) 2007 Mockito contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +Copyright 2022, Mockito Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Objenesis (3.2) +-------------------------------------------------------------------------------- + +* Declared Licenses * +MIT + +Copyright (c) 2022, Objenesis Contributors +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +-------------------------------------------------------------------------------- +Sardine WebDAV client (5.10) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2009-2011 Jon Stevens et al. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Shazamcrest (0.11) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2011 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +SLF4J API Module (2.0.0-alpha7) +-------------------------------------------------------------------------------- + +* Declared Licenses * +MIT + +Copyright (c) 2004-2017 QOS.ch + All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +-------------------------------------------------------------------------------- +SLF4J Simple Binding (2.0.0-alpha7) +-------------------------------------------------------------------------------- + +* Declared Licenses * +MIT + +Copyright (c) 2004-2022 QOS.ch Sarl (Switzerland) +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +-------------------------------------------------------------------------------- +SnakeYAML (1.21) +-------------------------------------------------------------------------------- + +* Declared Licenses * + + +* Other Licenses * +Apache-2.0, Multi-license: LGPL-2.1-or-later OR GPL-2.0-or-later OR EPL-1.0 OR BSD-3-Clause OR Apache-2.0 + + + * Copyright (c) 2008, http://www.snakeyaml.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + + +// Copyright 2003-2010 Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland +// www.source-code.biz, www.inventec.ch/chdh +// +// This module is multi-licensed and may be used under the terms +// of any of the following licenses: +// +// EPL, Eclipse Public License, V1.0 or later, http://www.eclipse.org/legal +// LGPL, GNU Lesser General Public License, V2.1 or later, http://www.gnu.org/licenses/lgpl.html +// GPL, GNU General Public License, V2 or later, http://www.gnu.org/licenses/gpl.html +// AL, Apache License, V2.0 or later, http://www.apache.org/licenses +// BSD, BSD License, http://www.opensource.org/licenses/bsd-license.php +// +// Please contact the author if you need another license. +// This module is provided "as is", without warranties of any kind. + +package org.yaml.snakeyaml.external.biz.base64Coder; + +/** + * A Base64 encoder/decoder. + * + *

+ * This class is used to encode and decode data in Base64 format as described in + * RFC 1521. + * + *

+ * Project home page: www. + * source-code.biz/base64coder/java
+ * Author: Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
+ * Multi-licensed: EPL / LGPL / GPL / AL / BSD. + + +-------------------------------------------------------------------------------- +Spock Framework - Core Module (2.2-M1-groovy-4.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2012 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Spock Framework - Core Module (1.3-groovy-2.5) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2012 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Spring Beans (5.3.20) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2002-2021 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Spring Beans (5.3.13) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2002-2021 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Spring Commons Logging Bridge (5.3.13) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright ownership. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Spring Context (5.3.20) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2002-2019 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Spring Core (5.3.20) +-------------------------------------------------------------------------------- + +* Declared Licenses * + + +* Other Licenses * +BSD-3-Clause, Apache-2.0 + + +// ASM: a very small and fast Java bytecode manipulation framework +// Copyright (c) 2000-2011 INRIA, France Telecom +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the copyright holders nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. + + + * Copyright 2002-2018 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + + +-------------------------------------------------------------------------------- +Spring Core (5.3.13) +-------------------------------------------------------------------------------- + +* Declared Licenses * + + +* Other Licenses * +BSD-3-Clause, Apache-2.0 + + +// ASM: a very small and fast Java bytecode manipulation framework +// Copyright (c) 2000-2011 INRIA, France Telecom +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. Neither the name of the copyright holders nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. + + + * Copyright 2002-2018 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + + +-------------------------------------------------------------------------------- +Spring Retry (1.3.1) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2006-2007 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Spring Web (5.3.20) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2002-2021 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +Spring Web (5.3.13) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2002-2021 the original author or authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +-------------------------------------------------------------------------------- +testng (7.3.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + +Copyright 2022, testng Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and limitations under the License. + + +* Other Licenses * +AML + + +Copyright: Copyright (c) 2006 by Apple Computer, Inc., All Rights Reserved. +IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this Apple software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software. +In consideration of your agreement to abide by the following terms, and subject to these terms, Apple grants you a personal, non-exclusive license, under Apple's copyrights in this original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the Apple Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the Apple Software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the Apple Software. Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to endorse or promote products derived from the Apple Software without specific prior written permission from Apple. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Apple herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated. +The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. +IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-------------------------------------------------------------------------------- +testng (7.6.0) +-------------------------------------------------------------------------------- + +* Declared Licenses * +Apache-2.0 + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +================================================================================ +PART 2: LICENSES APPENDIX +================================================================================ + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +================================================================================ + +Creative Commons Legal Code + +CC0 1.0 Universal + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). +Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. +For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. + 1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: + i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); + iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and + vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. + 2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. + 3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. + 4. Limitations and Disclaimers. + a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. + d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. + +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- + +Report Generated by FOSSA on 2022-6-9 diff --git a/README.md b/README.md index aa79451ca..3153b328c 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,64 @@ # GoodData Java SDK -[![Build Status](https://travis-ci.org/gooddata/gooddata-java.png?branch=master)](https://travis-ci.org/gooddata/gooddata-java) -[![Javadocs](http://javadoc.io/badge/com.gooddata/gooddata-java.svg)](http://javadoc.io/doc/com.gooddata/gooddata-java) -[![Javadocs Model](https://javadoc.io/badge2/com.gooddata/gooddata-java-model/javadoc--model.svg)](https://javadoc.io/doc/com.gooddata/gooddata-java-model) -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.gooddata/gooddata-java/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.gooddata/gooddata-java) -[![Release](https://img.shields.io/github/release/gooddata/gooddata-java.svg)](https://github.com/gooddata/gooddata-java/releases) + +[![Build Status](https://github.com/gooddata/gooddata-java/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/gooddata/gooddata-java/actions/workflows/build.yml) +[![Coverage Status](https://codecov.io/gh/gooddata/gooddata-java/branch/master/graph/badge.svg)](https://app.codecov.io/gh/gooddata/gooddata-java/branch/master) [![Stability: Active](https://masterminds.github.io/stability/active.svg)](https://masterminds.github.io/stability/active.html) [![License](https://img.shields.io/badge/license-BSD-blue.svg)](LICENSE.txt) +[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fgooddata%2Fgooddata-java.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fgooddata%2Fgooddata-java?ref=badge_shield) + +[![Javadocs](https://javadoc.io/badge/com.gooddata/gooddata-java.svg)](https://javadoc.io/doc/com.gooddata/gooddata-java) +[![Javadocs Model](https://javadoc.io/badge2/com.gooddata/gooddata-java-model/javadoc--model.svg)](https://javadoc.io/doc/com.gooddata/gooddata-java-model) +[![Maven Central](https://img.shields.io/maven-central/v/com.gooddata/gooddata-java)](https://central.sonatype.com/artifact/com.gooddata/gooddata-java) +[![Release](https://img.shields.io/github/v/release/gooddata/gooddata-java?sort=semver)](https://github.com/gooddata/gooddata-java/releases) The *GoodData Java SDK* encapsulates the REST API of the **GoodData Platform**. + +**The project is currently NOT in "active development". Meaning that feature request may or may not be implemented. +You are welcomed to [contribute your code](CONTRIBUTING.md) and create +an [issue](https://github.com/gooddata/gooddata-java/issues).** + The first version was implemented during the [All Data Hackathon](http://hackathon.gooddata.com) April 10 - 11 2014. -It is free and open-source software provided "as-is" under the [BSD License](LICENSE.txt) as an official project by [GoodData Corporation](http://www.gooddata.com). +It is free and open-source software provided "as-is" under the [BSD License](LICENSE.txt) as an official project +by [GoodData Corporation](http://www.gooddata.com). ## Supported versions - -In order to make the user experience with integrating GoodData Java SDK as smooth and secure as possible and to ensure that the SDK is using the latest features of the platform, we only provide support to the most recent major version of Java SDK. - + +In order to make the user experience with integrating GoodData Java SDK as smooth and secure as possible and to ensure +that the SDK is using the latest features of the platform, we only provide support to the most recent major version of +Java SDK. + The most recent major will be supported in the following mode: - -- The latest major version will receive new functionality and bug fixes. These changes will be applied on top of last released version. + +- The latest major version will receive new functionality and bug fixes. These changes will be applied on top of last + released version. - GoodData customer support will provide support for the latest major version only. - The customers are encouraged to always use the latest version of the Java SDK. - In case of using older versions, the user might face API incompatibility, performance or security issues. - -Please follow the [upgrade instructions](https://github.com/gooddata/gooddata-java/wiki/Upgrading) to update to the newest version. + +Please follow the [upgrade instructions](https://github.com/gooddata/gooddata-java/wiki/Upgrading) to update to the +newest version. + +### Version 5.0 Release Notes + +**Version 5.0.0** represents a major modernization release with the following key updates: + +- **Java 17**: Minimum runtime requirement upgraded from Java 11 +- **Spring 6**: Framework upgraded from Spring 5.x to Spring 6.0.15 +- **Apache HTTP Client 5**: Primary HTTP client upgraded from version 4.5.x to 5.5.1 +- **Enhanced Compatibility**: Improved support for modern Java environments and cloud platforms + +This release maintains API compatibility while modernizing the underlying infrastructure for better performance, +security, and future extensibility. ## Modules The *GoodData Java SDK* contains following modules: + * [gooddata-java](./gooddata-java) - The GoodData API client (depends on `gooddata-java-model`). * [gooddata-java-model](./gooddata-java-model) - Lightweight library containing only GoodData API structures. -* [gooddata-java-parent](./pom.xml) - Parent for *GoodData Java SDK* libraries (just a wrapper around `gooddata-java` and `gooddata-java-model`). +* [gooddata-java-parent](./pom.xml) - Parent for *GoodData Java SDK* libraries (just a wrapper around `gooddata-java` + and `gooddata-java-model`). ## Usage @@ -40,10 +68,12 @@ The *GoodData Java SDK* is available in Maven Central Repository, to use it from com.gooddata gooddata-java - 3.5.0+api3 + {MAJOR}.{MINOR}.{PATCH}+api{API} ``` -See [releases page](https://github.com/gooddata/gooddata-java/releases) for information about versions and notable changes, + +See [releases page](https://github.com/gooddata/gooddata-java/releases) for information about versions and notable +changes, the [Upgrading Guide](https://github.com/gooddata/gooddata-java/wiki/Upgrading) will navigate you through changes between major versions. @@ -53,34 +83,143 @@ or [Wiki](https://github.com/gooddata/gooddata-java/wiki) for and [Extensibility How-To](https://github.com/gooddata/gooddata-java/wiki/Extending). ### API version -Since *GoodData Java SDK* version *2.32.0* API versioning is supported. The API version, GoodData Java is compatible with, is marked in artifact version using `+api` suffix (i.e. `2.32.0+api1` is compatible with API version `1`). + +Since *GoodData Java SDK* version *2.32.0* API versioning is supported. The API version, GoodData Java is compatible +with, is marked in artifact version using `+api` suffix (i.e. `2.32.0+api1` is compatible with API version `1`). ### Dependencies The *GoodData Java SDK* uses: -* the [GoodData HTTP client](https://github.com/gooddata/gooddata-http-client) version 0.9.3 or later -* the *Apache HTTP Client* version 4.5 or later (for white-labeled domains at least version 4.3.2 is required) -* the *Spring Framework* version 5* (can be used with spring 4.3.* as well) -* the *Jackson JSON Processor* version 2.* -* the *Slf4j API* version 1.7.* -* the *Java Development Kit (JDK)* version 11 or later to build, can run on 8 and later + +* the [GoodData HTTP client](https://github.com/gooddata/gooddata-http-client) version 3.0.0 +* the *Apache HTTP Client* version 5.5.1 +* the *Apache HTTP Client* version 4.5.13 (for compatibility with Sardine WebDAV library) +* the *Spring Framework* version 6.0.15 +* the *Jackson JSON Processor* version 2.13.4 +* the *Slf4j API* version 2.0.17 +* the *Java Development Kit (JDK)* version 17 or later to build + +### Migration from version 4.x to 5.0 + +**Version 5.0 introduces several significant upgrades that may require code changes in your application:** + +#### Breaking Changes + +1. **Java Runtime Requirement**: Minimum Java version is now **Java 17** (previously Java 11) +2. **Spring Framework**: Upgraded from Spring 5.x to **Spring 6.0.15** +3. **Apache HTTP Client**: Primary HTTP client upgraded from version 4.5.x to **version 5.5.1** +4. **SLF4J**: Upgraded from version 1.7.x to **version 2.0.17** + +#### Migration Steps + +**1. Update Java Runtime** +- Ensure your application runs on Java 17 or later +- Update your build tools (Maven/Gradle) to use Java 17 + +**2. Spring Framework Compatibility** +- If your application uses Spring Framework, upgrade to Spring 6.x or later +- Review Spring 6 migration guide for additional breaking changes: https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x +- Update Spring Boot to version 3.0+ if applicable + +**3. Dependency Updates** +Update your `pom.xml` or `build.gradle`: + +```xml + + + com.gooddata + gooddata-java + 5.0.0+api3 + + + + + org.springframework + spring-core + 6.0.15 + + + + + org.slf4j + slf4j-api + 2.0.17 + +``` + +**4. HTTP Client Configuration** +- The SDK now internally uses Apache HTTP Client 5.x +- If you customize HTTP client settings via `GoodDataSettings`, the API remains compatible +- Custom HTTP interceptors or low-level HTTP client configurations may need updates + +**5. Testing** +- Thoroughly test your application after upgrade +- Pay special attention to HTTP client behavior, especially with authentication and connection pooling +- Verify logging functionality works as expected with SLF4J 2.x + +#### Compatibility Notes + +- **API Compatibility**: The public SDK API remains largely backward compatible +- **Internal Changes**: HTTP client implementation has been modernized but SDK interfaces are unchanged +- **Jakarta EE**: Spring 6 uses Jakarta EE namespaces instead of Java EE (affects annotations if you use them directly) + +#### Known Migration Issues and Solutions + +**1. ClassNotFoundException for Apache HTTP Client classes** +If you see errors like `ClassNotFoundException: org.apache.http.impl.client.HttpClientBuilder`: +- Remove any direct dependencies on Apache HTTP Client 4.x from your project +- The SDK now uses HTTP Client 5.x internally, which has different package names + +**2. Spring Boot Applications** +- Ensure you're using Spring Boot 3.0+ which includes Spring 6 +- Update your `@SpringBootApplication` and other Spring annotations if needed +- Check Spring Boot 3.0 migration guide for additional changes + +**3. Logging Configuration** +- SLF4J 2.x has some configuration changes compared to 1.7.x +- Update your `logback.xml` or `log4j2.xml` if you use advanced logging features +- Basic logging configuration should work without changes + +**4. Build Tools** +```xml + + + 17 + 17 + +``` + +```gradle +// Gradle: Ensure Java 17 in your build.gradle +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} +``` + +For additional help, please refer to the [upgrading wiki page](https://github.com/gooddata/gooddata-java/wiki/Upgrading) +or [create an issue](https://github.com/gooddata/gooddata-java/issues) if you encounter problems during migration. ##### Retry of failed API calls -You can retry your failed requests since version *2.34.0*. Turn it on by configuring +You can retry your failed requests since *GoodData Java SDK* version *2.34.0*. Turn it on by configuring [RetrySettings](https://github.com/gooddata/gooddata-java/blob/master/src/main/java/com/gooddata/retry/RetrySettings.java) and add [Spring retry](https://github.com/spring-projects/spring-retry) to your classpath: + ```xml org.springframework.retry spring-retry - ${spring.retry.version} + 2.0.12 ``` +**Note**: Spring Retry 2.0.12 is compatible with Spring 6. If you're upgrading from prior versions of the SDK, +ensure you also upgrade your Spring Retry dependency to version 2.x for compatibility. + ### Logging -The *GoodData Java SDK* logs using `slf4j-api`. Please adjust your logging configuration for +The *GoodData Java SDK* logs using `slf4j-api`. Please adjust your logging configuration for `com.gooddata.sdk.*` loggers or alternatively turn the logging off using following dependency: ```xml @@ -91,6 +230,7 @@ The *GoodData Java SDK* logs using `slf4j-api`. Please adjust your logging confi ``` ### Date/Time + The *GoodData Java SDK* is using Java 8 Date/Time API (JSR 310) for all Date / Time / Zone public facing types. Good SO thread about differences between various types in Java Date/Time API: https://stackoverflow.com/a/32443004 @@ -99,7 +239,10 @@ Good SO thread about differences between various types in Java Date/Time API: ht Build the library with `mvn package`, see the [Testing](https://github.com/gooddata/gooddata-java/wiki/Testing) page for different testing methods. +For releasing see [Releasing How-To](https://github.com/gooddata/gooddata-java/wiki/Releasing). + ## Contribute Found a bug? Please create an [issue](https://github.com/gooddata/gooddata-java/issues). Missing functionality? -[Contribute your code](CONTRIBUTING.md). Any questions about GoodData or this library? Check out [the GoodData community website](http://community.gooddata.com/). +[Contribute your code](CONTRIBUTING.md). Any questions about GoodData or this library? Check +out [the GoodData community website](http://community.gooddata.com/). diff --git a/bugs-exclude.xml b/bugs-exclude.xml new file mode 100644 index 000000000..629a72fe5 --- /dev/null +++ b/bugs-exclude.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bugs-include.xml b/bugs-include.xml new file mode 100644 index 000000000..5926b1f8b --- /dev/null +++ b/bugs-include.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/findBugsFilter.xml b/findBugsFilter.xml deleted file mode 100644 index aadc37f69..000000000 --- a/findBugsFilter.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/gooddata-java-model/pom.xml b/gooddata-java-model/pom.xml index fb0c2ad83..1263350d4 100644 --- a/gooddata-java-model/pom.xml +++ b/gooddata-java-model/pom.xml @@ -3,11 +3,12 @@ 4.0.0 gooddata-java-model + ${project.artifactId} gooddata-java-parent com.gooddata - 3.5.1-SNAPSHOT + 5.0.2+api3-SNAPSHOT @@ -78,7 +79,7 @@ test - org.codehaus.groovy + org.apache.groovy groovy test @@ -103,4 +104,4 @@ - \ No newline at end of file + diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/Account.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/Account.java index 90cc1c88f..d0f0b6ae1 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/Account.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/Account.java @@ -1,13 +1,20 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.account; -import com.fasterxml.jackson.annotation.*; -import com.gooddata.sdk.model.util.UriHelper; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonView; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.util.UriHelper; import java.util.List; @@ -22,33 +29,29 @@ public class Account { public static final String URI = "/gdc/account/profile/{id}"; public static final String ACCOUNTS_URI = "/gdc/account/domains/{organization_name}/users"; + public static final String ACCOUNT_BY_EMAIL_URI = ACCOUNTS_URI + "?login={email}"; public static final String LOGIN_URI = "/gdc/account/login/{id}"; public static final String CURRENT_ID = "current"; private final String login; - + @JsonIgnore + private final Links links; @JsonView(UpdateView.class) private String email; - @JsonView(UpdateView.class) private String password; - @JsonView(UpdateView.class) private String verifyPassword; - @JsonView(UpdateView.class) private String firstName; - @JsonView(UpdateView.class) private String lastName; - @JsonView(UpdateView.class) private List ipWhitelist; - - @JsonIgnore - private final Links links; + @JsonView(UpdateView.class) + private List authenticationModes; @JsonCreator private Account( @@ -59,6 +62,7 @@ private Account( @JsonProperty("firstName") String firstName, @JsonProperty("lastName") String lastName, @JsonProperty("ipWhitelist") List ipWhitelist, + @JsonProperty("authenticationModes") List authenticationModes, @JsonProperty("links") Links links ) { this.login = login; @@ -68,22 +72,44 @@ private Account( this.firstName = firstName; this.lastName = lastName; this.ipWhitelist = ipWhitelist; + this.authenticationModes = authenticationModes; this.links = links; } + public Account(final String login, + final String email, + final String password, + final String firstName, + final String lastName, + final List ipWhitelist, + final List authenticationModes) { + this(login, email, password, password, firstName, lastName, ipWhitelist, authenticationModes, null); + } + public Account(String firstName, String lastName, Links links) { - this(null, null, null, null, firstName, lastName, null, links); + this(null, null, null, null, firstName, lastName, null, null, links); } /** * Account creation constructor - * @param email email + * + * @param email email * @param firstName first name - * @param lastName last name - * @param password password + * @param lastName last name + * @param password password */ public Account(String email, String password, String firstName, String lastName) { - this(email, email, password, password, firstName, lastName, null, null); + this(email, email, password, password, firstName, lastName, null, null, null); + } + + /** + * Extract Account's ID from Account's URI + * + * @param uri Account's URI + * @return Account's ID extracted from URI + */ + public static String getId(String uri) { + return UriHelper.getLastUriPart(uri); } public String getLogin() { @@ -94,22 +120,42 @@ public String getEmail() { return email; } + public void setEmail(final String email) { + this.email = email; + } + public String getPassword() { return password; } + public void setPassword(final String password) { + this.password = password; + } + public String getVerifyPassword() { return verifyPassword; } + public void setVerifyPassword(final String verifyPassword) { + this.verifyPassword = verifyPassword; + } + public String getFirstName() { return firstName; } + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + public String getLastName() { return lastName; } + public void setLastName(final String lastName) { + this.lastName = lastName; + } + @JsonIgnore public String getUri() { return links.getSelf(); @@ -129,28 +175,35 @@ public List getIpWhitelist() { return ipWhitelist; } - public void setEmail(final String email) { - this.email = email; - } - - public void setPassword(final String password) { - this.password = password; + public void setIpWhitelist(final List ipWhitelist) { + this.ipWhitelist = ipWhitelist; } - public void setVerifyPassword(final String verifyPassword) { - this.verifyPassword = verifyPassword; + public List getAuthenticationModes() { + return authenticationModes; } - public void setFirstName(final String firstName) { - this.firstName = firstName; + public void setAuthenticationModes(final List authenticationModes) { + this.authenticationModes = authenticationModes; } - public void setLastName(final String lastName) { - this.lastName = lastName; + @Override + public String toString() { + return GoodDataToStringBuilder.defaultToString(this, "password", "verifyPassword"); } - public void setIpWhitelist(final List ipWhitelist) { - this.ipWhitelist = ipWhitelist; + /** + * Enumeration type representing GoodData authentication mode. + */ + public enum AuthenticationMode { + /** + * User can be authenticated using password + */ + PASSWORD, + /** + * User can be authenticated via SSO + */ + SSO } @JsonIgnoreProperties(ignoreUnknown = true) @@ -173,20 +226,6 @@ public String getProjects() { } } - /** - * Extract Account's ID from Account's URI - * @param uri Account's URI - * @return Account's ID extracted from URI - */ - public static String getId(String uri) { - return UriHelper.getLastUriPart(uri); - } - - @Override - public String toString() { - return GoodDataToStringBuilder.defaultToString(this, "password", "verifyPassword"); - } - /** * Class representing update view of account */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/Accounts.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/Accounts.java new file mode 100644 index 000000000..82c1a3c78 --- /dev/null +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/Accounts.java @@ -0,0 +1,34 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.account; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeInfo.Id; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.gooddata.sdk.common.collections.Page; +import com.gooddata.sdk.common.collections.Paging; + +import java.util.List; +import java.util.Map; + +/** + * List of accounts. Deserialization only. + */ +@JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = Id.NAME) +@JsonTypeName(Accounts.ROOT_NODE) +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonDeserialize(using = AccountsDeserializer.class) +public class Accounts extends Page { + + static final String ROOT_NODE = "accountSettings"; + + + Accounts(final List items, final Paging paging, final Map links) { + super(items, paging, links); + } +} diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/AccountsDeserializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/AccountsDeserializer.java new file mode 100644 index 000000000..f03c4b243 --- /dev/null +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/AccountsDeserializer.java @@ -0,0 +1,24 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.account; + +import com.gooddata.sdk.common.collections.PageDeserializer; +import com.gooddata.sdk.common.collections.Paging; + +import java.util.List; +import java.util.Map; + +class AccountsDeserializer extends PageDeserializer { + + protected AccountsDeserializer() { + super(Account.class); + } + + @Override + protected Accounts createPage(final List items, final Paging paging, final Map links) { + return new Accounts(items, paging, links); + } +} diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/SeparatorSettings.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/SeparatorSettings.java index e49dd83dc..3f94eabc3 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/SeparatorSettings.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/account/SeparatorSettings.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -24,10 +24,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class SeparatorSettings implements Serializable { - private static final long serialVersionUID = 446547615105910660L; - public static final String URI = "/gdc/account/profile/{id}/settings/separators"; - + private static final long serialVersionUID = 446547615105910660L; private final String thousand; private final String decimal; private final Links links; @@ -60,7 +58,7 @@ public String toString() { } @JsonIgnoreProperties(ignoreUnknown = true) - private static class Links implements Serializable{ + private static class Links implements Serializable { private final String self; @JsonCreator diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLog.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLog.java new file mode 100644 index 000000000..8bed61789 --- /dev/null +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLog.java @@ -0,0 +1,96 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.auditevent; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.common.util.ISOZonedDateTime; + +import java.time.ZonedDateTime; + +/** + * Model class, used for special audit log events/access logs directly from haproxy, + * that represents access logs for particular hosts. + */ +@JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME) +@JsonTypeName("accessLog") +@JsonIgnoreProperties(ignoreUnknown = true) +public class AccessLog { + + public static final String RESOURCE_URI = "/gdc/domains/{domainId}/accessLogs"; + + private final String id; + private final String host; + private final String path; + private final String method; + private final String code; + private final String size; + private final String userIp; + @ISOZonedDateTime + private final ZonedDateTime occurred; + @ISOZonedDateTime + private final ZonedDateTime recorded; + + @JsonCreator + public AccessLog(@JsonProperty("id") String id, @JsonProperty("host") String host, @JsonProperty("path") String path, + @JsonProperty("method") String method, @JsonProperty("code") String code, @JsonProperty("size") String size, + @JsonProperty("userIp") String userIp, @JsonProperty("occurred") ZonedDateTime occurred, @JsonProperty("recorded") ZonedDateTime recorded) { + this.id = id; + this.host = host; + this.path = path; + this.method = method; + this.code = code; + this.size = size; + this.userIp = userIp; + this.occurred = occurred; + this.recorded = recorded; + } + + public String getId() { + return id; + } + + public String getHost() { + return host; + } + + public String getPath() { + return path; + } + + public String getMethod() { + return method; + } + + public String getCode() { + return code; + } + + public String getSize() { + return size; + } + + public String getUserIp() { + return userIp; + } + + public ZonedDateTime getOccurred() { + return occurred; + } + + public ZonedDateTime getRecorded() { + return recorded; + } + + @Override + public String toString() { + return GoodDataToStringBuilder.defaultToString(this); + } +} diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLogs.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLogs.java new file mode 100644 index 000000000..b45655fc8 --- /dev/null +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLogs.java @@ -0,0 +1,39 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.auditevent; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.gooddata.sdk.common.collections.Page; +import com.gooddata.sdk.common.collections.Paging; + +import java.util.List; +import java.util.Map; + +@JsonTypeInfo( + include = JsonTypeInfo.As.WRAPPER_OBJECT, + use = JsonTypeInfo.Id.NAME +) +@JsonTypeName("accessLogs") +@JsonIgnoreProperties( + ignoreUnknown = true +) +@JsonSerialize( + using = AccessLogsSerializer.class +) +@JsonDeserialize( + using = AccessLogsDeserializer.class +) +public class AccessLogs extends Page { + static final String ROOT_NODE = "accessLogs"; + + public AccessLogs(List items, Paging paging, Map links) { + super(items, paging, links); + } +} diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLogsDeserializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLogsDeserializer.java new file mode 100644 index 000000000..857547c4a --- /dev/null +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLogsDeserializer.java @@ -0,0 +1,24 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.auditevent; + +import com.gooddata.sdk.common.collections.PageDeserializer; +import com.gooddata.sdk.common.collections.Paging; + +import java.util.List; +import java.util.Map; + +public class AccessLogsDeserializer extends PageDeserializer { + + public AccessLogsDeserializer() { + super(AccessLog.class); + } + + @Override + protected AccessLogs createPage(List items, Paging paging, Map links) { + return new AccessLogs(items, paging, links); + } +} diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLogsSerializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLogsSerializer.java new file mode 100644 index 000000000..4c901162c --- /dev/null +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AccessLogsSerializer.java @@ -0,0 +1,14 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.auditevent; + +import com.gooddata.sdk.common.collections.PageSerializer; + +public class AccessLogsSerializer extends PageSerializer { + public AccessLogsSerializer() { + super(AccessLogs.ROOT_NODE); + } +} diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEvent.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEvent.java index 23f837454..554441574 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEvent.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -35,11 +35,15 @@ public class AuditEvent { private final String userLogin; - /** the time the event occurred */ + /** + * the time the event occurred + */ @ISOZonedDateTime private final ZonedDateTime occurred; - /** the time event was recorded by audit system */ + /** + * the time event was recorded by audit system + */ @ISOZonedDateTime private final ZonedDateTime recorded; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEvents.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEvents.java index da42bbb18..e60324e1c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEvents.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEvents.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEventsDeserializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEventsDeserializer.java index 46d2efada..4ab1dd022 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEventsDeserializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEventsDeserializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,7 +11,7 @@ import java.util.List; import java.util.Map; -class AuditEventsDeserializer extends PageDeserializer{ +class AuditEventsDeserializer extends PageDeserializer { protected AuditEventsDeserializer() { super(AuditEvent.class); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEventsSerializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEventsSerializer.java index 0f7de8bef..8d36cc8b3 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEventsSerializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/auditevent/AuditEventsSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ConnectorType.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ConnectorType.java index d6aa0ea45..c7b602e25 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ConnectorType.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ConnectorType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Integration.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Integration.java index f2722856c..4a5040878 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Integration.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Integration.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -26,12 +26,11 @@ public class Integration { public static final String URL = "/gdc/projects/{project}/connectors/{connector}/integration"; - - private String projectTemplate; - private boolean active; private final IntegrationProcessStatus lastFinishedProcess; private final IntegrationProcessStatus lastSuccessfulProcess; private final IntegrationProcessStatus runningProcess; + private String projectTemplate; + private boolean active; public Integration(final String projectTemplate) { this(projectTemplate, true, null, null, null); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/IntegrationProcessStatus.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/IntegrationProcessStatus.java index 28fe7a43f..df309dcbf 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/IntegrationProcessStatus.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/IntegrationProcessStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.util.UriHelper; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.common.util.ISOZonedDateTime; +import com.gooddata.sdk.model.util.UriHelper; import java.time.ZonedDateTime; import java.util.Map; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ProcessExecution.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ProcessExecution.java index 3bc7c78f6..e1ec36c69 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ProcessExecution.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ProcessExecution.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ProcessStatus.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ProcessStatus.java index 7d73aed6f..a8665cbb6 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ProcessStatus.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/ProcessStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Reload.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Reload.java index 87c917001..cc9c46d08 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Reload.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Reload.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Settings.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Settings.java index cb9427a6d..a7e2810ba 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Settings.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Settings.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Status.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Status.java index 86ea1e793..0144b3bb9 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Status.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Status.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -67,6 +67,10 @@ public boolean isFailed() { return ERROR.name().equalsIgnoreCase(code) || USER_ERROR.name().equalsIgnoreCase(code); } + @Override + public String toString() { + return GoodDataToStringBuilder.defaultToString(this); + } /** * Enum of connector process status codes @@ -75,9 +79,4 @@ public enum Code { NEW, SCHEDULED, DOWNLOADING, DOWNLOADED, TRANSFORMING, TRANSFORMED, UPLOADING, UPLOADED, SYNCHRONIZED, ERROR, USER_ERROR } - - @Override - public String toString() { - return GoodDataToStringBuilder.defaultToString(this); - } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Zendesk4ProcessExecution.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Zendesk4ProcessExecution.java index c15ceac58..197be0f1d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Zendesk4ProcessExecution.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Zendesk4ProcessExecution.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -17,9 +17,9 @@ import java.util.Map; import java.util.TreeMap; -import static com.gooddata.sdk.model.connector.ConnectorType.ZENDESK4; import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; +import static com.gooddata.sdk.model.connector.ConnectorType.ZENDESK4; /** * Zendesk 4 (Insights) connector process execution (i.e. definition for single ETL run). Serialization only. @@ -110,15 +110,15 @@ public DownloadParams getDownloadParams() { return downloadParams; } + public void setDownloadParams(DownloadParams downloadParams) { + this.downloadParams = downloadParams; + } + @JsonProperty("downloadParams") private DownloadParams getDownloadParamsPlain() { return downloadParams; } - public void setDownloadParams(DownloadParams downloadParams) { - this.downloadParams = downloadParams; - } - @Override public String toString() { return GoodDataToStringBuilder.defaultToString(this); @@ -144,7 +144,8 @@ public DownloadParams(Boolean useBackup) { this(useBackup, null, null); } - private DownloadParams() {} + private DownloadParams() { + } @JsonProperty("useBackup") public Boolean getUseBackup() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Zendesk4Settings.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Zendesk4Settings.java index e0a8ed296..287b69340 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Zendesk4Settings.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/connector/Zendesk4Settings.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -18,13 +18,12 @@ public class Zendesk4Settings implements Settings { public static final String URL = "/gdc/projects/{project}/connectors/zendesk4/integration/settings"; - - private String apiUrl; - private String zopimUrl; - private String account; private final String type; private final String syncTime; private final String syncTimeZone; + private String apiUrl; + private String zopimUrl; + private String account; public Zendesk4Settings(final String apiUrl) { this(apiUrl, null, null, null, null, null); @@ -86,13 +85,13 @@ public ConnectorType getConnectorType() { return ZENDESK4; } - /** - * Type of Zendesk account. - */ - public enum Zendesk4Type {plus, enterprise} - @Override public String toString() { return GoodDataToStringBuilder.defaultToString(this); } + + /** + * Type of Zendesk account. + */ + public enum Zendesk4Type {plus, enterprise} } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/OutputStage.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/OutputStage.java index fd5e0a931..314e3edee 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/OutputStage.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/OutputStage.java @@ -1,13 +1,19 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.dataload; -import com.fasterxml.jackson.annotation.*; -import com.gooddata.sdk.model.warehouse.WarehouseSchema; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.warehouse.WarehouseSchema; import java.util.Map; @@ -28,11 +34,10 @@ public class OutputStage { private static final String SELF_LINK = "self"; private static final String OUTPUT_STAGE_DIFF = "outputStageDiff"; private static final String DATALOAD_PROCESS = "dataloadProcess"; - + private final Map links; private String schema; private String clientId; private String outputStagePrefix; - private final Map links; @JsonCreator private OutputStage(@JsonProperty("schema") final String schema, diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/AsyncTask.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/AsyncTask.java index 53ea2477c..5d145923d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/AsyncTask.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/AsyncTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/DataloadProcess.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/DataloadProcess.java index d85e38d85..689453d40 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/DataloadProcess.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/DataloadProcess.java @@ -1,19 +1,27 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.dataload.processes; -import com.fasterxml.jackson.annotation.*; -import com.gooddata.sdk.model.util.UriHelper; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.util.UriHelper; import java.util.Collections; import java.util.Map; import java.util.Set; -import static com.gooddata.sdk.common.util.Validate.*; +import static com.gooddata.sdk.common.util.Validate.notEmpty; +import static com.gooddata.sdk.common.util.Validate.notNull; +import static com.gooddata.sdk.common.util.Validate.notNullState; /** * Dataload process. @@ -32,7 +40,7 @@ public class DataloadProcess { private String name; private String type; private Set executables; - private Map links; + private Map links; private String path; public DataloadProcess(String name, String type) { @@ -43,8 +51,8 @@ public DataloadProcess(String name, String type) { /** * Use this constructor, when you want to deploy process from appstore. * - * @param name name - * @param type type + * @param name name + * @param type type * @param appstorePath valid path to brick in appstore */ public DataloadProcess(String name, String type, String appstorePath) { @@ -58,8 +66,8 @@ public DataloadProcess(String name, ProcessType type) { @JsonCreator private DataloadProcess(@JsonProperty("name") String name, @JsonProperty("type") String type, - @JsonProperty("executables") Set executables, - @JsonProperty("links") Map links) { + @JsonProperty("executables") Set executables, + @JsonProperty("links") Map links) { this(name, type); this.executables = executables != null ? Collections.unmodifiableSet(executables) : null; this.links = links; @@ -69,14 +77,14 @@ public String getName() { return name; } - public String getType() { - return type; - } - public void setName(String name) { this.name = name; } + public String getType() { + return type; + } + public void setType(String type) { this.type = type; } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/DataloadProcesses.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/DataloadProcesses.java index 57f19b1d0..307eed7bf 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/DataloadProcesses.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/DataloadProcesses.java @@ -1,13 +1,17 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.dataload.processes; -import com.fasterxml.jackson.annotation.*; -import com.gooddata.sdk.model.account.Account; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.account.Account; import java.util.Collection; import java.util.List; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecution.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecution.java index c0187085e..9a8a064f0 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecution.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecution.java @@ -1,13 +1,10 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.dataload.processes; -import static com.gooddata.sdk.common.util.Validate.notEmpty; -import static com.gooddata.sdk.common.util.Validate.notNull; - import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -17,6 +14,9 @@ import java.util.HashMap; import java.util.Map; +import static com.gooddata.sdk.common.util.Validate.notEmpty; +import static com.gooddata.sdk.common.util.Validate.notNull; + /** * Dataload process execution. Serialization only. */ @@ -28,8 +28,8 @@ public class ProcessExecution { private final String executionsUri; private final String executable; - private final Map params; - private final Map hiddenParams; + private final Map params; + private final Map hiddenParams; public ProcessExecution(DataloadProcess process, String executable) { this(process, executable, new HashMap<>(), new HashMap<>()); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionDetail.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionDetail.java index 5978cd1e6..57b9b8c6f 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionDetail.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionDetail.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -47,7 +47,7 @@ public class ProcessExecutionDetail { private final ZonedDateTime finished; private final ErrorStructure error; - private final Map links; + private final Map links; @JsonCreator private ProcessExecutionDetail(@JsonProperty("status") String status, @@ -66,6 +66,10 @@ private ProcessExecutionDetail(@JsonProperty("status") String status, this.links = links; } + public static URI uriFromExecutionUri(URI executionUri) { + return URI.create(executionUri.toString() + "/detail"); + } + public String getStatus() { return status; } @@ -110,11 +114,6 @@ public boolean isSuccess() { return STATUS_OK.equals(status); } - - public static URI uriFromExecutionUri(URI executionUri) { - return URI.create(executionUri.toString() + "/detail"); - } - @Override public String toString() { return GoodDataToStringBuilder.defaultToString(this); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTask.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTask.java index e8c08cd9c..8fe5169ec 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTask.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTask.java @@ -1,12 +1,10 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.dataload.processes; -import static com.gooddata.sdk.common.util.Validate.notNullState; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,6 +13,8 @@ import java.util.Map; +import static com.gooddata.sdk.common.util.Validate.notNullState; + /** * Process execution task. Deserialization only */ @@ -26,7 +26,7 @@ public class ProcessExecutionTask { private static final String POLL_LINK = "poll"; private static final String DETAIL_LINK = "detail"; - private final Map links; + private final Map links; @JsonCreator private ProcessExecutionTask(@JsonProperty("links") Map links) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessType.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessType.java index 1605741af..1d32f2a12 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessType.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ProcessType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/Schedule.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/Schedule.java index 7b4c85416..e7e113c3c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/Schedule.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/Schedule.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -13,9 +13,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.gooddata.sdk.model.util.UriHelper; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.common.util.ISOZonedDateTimeDeserializer; +import com.gooddata.sdk.model.util.UriHelper; import java.time.Duration; import java.time.ZonedDateTime; @@ -46,16 +46,16 @@ public class Schedule { private static final String EXECUTABLE = "EXECUTABLE"; private final String type; + private final ZonedDateTime nextExecutionTime; + private final int consecutiveFailedExecutionCount; + private final Map params; + private final Map links; private String state; private String cron; private String timezone; private Integer reschedule; private String triggerScheduleId; private String name; - private final ZonedDateTime nextExecutionTime; - private final int consecutiveFailedExecutionCount; - private final Map params; - private final Map links; public Schedule(final DataloadProcess process, final String executable, final String cron) { this(process, executable); @@ -187,6 +187,11 @@ public void setTimezone(final String timezone) { this.timezone = timezone; } + @JsonIgnore + public void setTimezone(final ZonedDateTime timezone) { + this.timezone = notNull(timezone, "timezone").getZone().getId(); + } + /** * Duration after a failed execution of the schedule is executed again * @@ -232,11 +237,6 @@ public void setName(final String name) { this.name = name; } - @JsonIgnore - public void setTimezone(final ZonedDateTime timezone) { - this.timezone = notNull(timezone, "timezone").getZone().getId(); - } - @JsonIgnore public ZonedDateTime getNextExecutionTime() { return nextExecutionTime; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ScheduleExecution.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ScheduleExecution.java index 7f8bc61ee..2ff82dd9a 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ScheduleExecution.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ScheduleExecution.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -40,9 +40,10 @@ public class ScheduleExecution { private String trigger; private String processLastDeployedBy; - private Map links; + private Map links; - public ScheduleExecution() {} + public ScheduleExecution() { + } @JsonCreator private ScheduleExecution(@JsonProperty("createdTime") @JsonDeserialize(using = ISOZonedDateTimeDeserializer.class) ZonedDateTime created, diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ScheduleState.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ScheduleState.java index 973216d7e..553d6632e 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ScheduleState.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/ScheduleState.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/Schedules.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/Schedules.java index d7cc018e3..2443ff04e 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/Schedules.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/Schedules.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/SchedulesDeserializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/SchedulesDeserializer.java index 3cb92b0bf..7c21903e1 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/SchedulesDeserializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataload/processes/SchedulesDeserializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetLinks.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetLinks.java index cf74439ed..3b0027c49 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetLinks.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetLinks.java @@ -1,11 +1,12 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.dataset; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; import com.gooddata.sdk.model.gdc.AboutLinks; import java.util.List; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetManifest.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetManifest.java index f8ce4eb87..63563f952 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetManifest.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetManifest.java @@ -1,21 +1,21 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.dataset; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gooddata.sdk.common.util.BooleanDeserializer; -import com.gooddata.sdk.common.util.BooleanIntegerSerializer; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.gooddata.sdk.common.util.BooleanDeserializer; +import com.gooddata.sdk.common.util.BooleanIntegerSerializer; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.io.InputStream; @@ -48,6 +48,7 @@ public DatasetManifest(String dataSet) { /** * Create dataset upload manifest. + * * @param dataSet dataset name * @param source source CSV */ @@ -86,6 +87,7 @@ public void setFile(String file) { /** * Set upload mode for all parts of this dataset manifest + * * @param uploadMode upload mode */ public void setUploadMode(final UploadMode uploadMode) { @@ -97,8 +99,9 @@ public void setUploadMode(final UploadMode uploadMode) { /** * Map the given CSV column name to the dataset field + * * @param columnName column name - * @param populates dataset field + * @param populates dataset field */ public void setMapping(final String columnName, final String populates) { notNull(columnName, "columnName"); @@ -144,10 +147,10 @@ public static class Part { @JsonCreator public Part(@JsonProperty("mode") String uploadMode, - @JsonProperty("columnName") String columnName, - @JsonProperty("populates") List populates, - @JsonProperty("referenceKey") @JsonDeserialize(using = BooleanDeserializer.class) Boolean referenceKey, - @JsonProperty("constraints") Map constraints) { + @JsonProperty("columnName") String columnName, + @JsonProperty("populates") List populates, + @JsonProperty("referenceKey") @JsonDeserialize(using = BooleanDeserializer.class) Boolean referenceKey, + @JsonProperty("constraints") Map constraints) { this.uploadMode = uploadMode; this.columnName = columnName; this.populates = populates; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetManifests.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetManifests.java index 3b3d1a96c..41dade477 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetManifests.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetManifests.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -22,6 +22,7 @@ public class DatasetManifests { /** * Construct object. + * * @param manifests dataset upload manifests */ @JsonCreator diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetNotFoundException.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetNotFoundException.java index 30f47db60..32704688a 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetNotFoundException.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/DatasetNotFoundException.java @@ -1,14 +1,14 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.dataset; -import static java.lang.String.format; - import com.gooddata.sdk.common.GoodDataException; +import static java.lang.String.format; + /** * Represents error when dataset of the given id was not found */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/EtlMode.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/EtlMode.java index 860d86ae6..4299adde8 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/EtlMode.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/EtlMode.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/EtlModeType.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/EtlModeType.java index 6adbbe42e..8492b9898 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/EtlModeType.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/EtlModeType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/LookupMode.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/LookupMode.java index ca77b4532..2f39b6118 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/LookupMode.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/LookupMode.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/MaqlDml.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/MaqlDml.java index 8693ca76c..fac9510fb 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/MaqlDml.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/MaqlDml.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Pull.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Pull.java index 957abb9ec..56eeaf5b7 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Pull.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Pull.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/PullTask.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/PullTask.java index a38d0f070..f1aedb205 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/PullTask.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/PullTask.java @@ -1,11 +1,15 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.dataset; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/TaskState.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/TaskState.java index d93ea1430..e65700f15 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/TaskState.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/TaskState.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Upload.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Upload.java index 31e540aa0..98c3d38db 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Upload.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Upload.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -37,13 +37,13 @@ public class Upload { private final ZonedDateTime processedAt; Upload(@JsonProperty("msg") String message, - @JsonProperty("progress") Double progress, - @JsonProperty("status") String status, - @JsonProperty("fullUpload") @JsonDeserialize(using = BooleanDeserializer.class) Boolean fullUpload, - @JsonProperty("uri") String uri, - @JsonProperty("createdAt") @JsonDeserialize(using = GDZonedDateTimeDeserializer.class) ZonedDateTime createdAt, - @JsonProperty("fileSize") Integer size, - @JsonProperty("processedAt") @JsonDeserialize(using = GDZonedDateTimeDeserializer.class) ZonedDateTime processedAt) { + @JsonProperty("progress") Double progress, + @JsonProperty("status") String status, + @JsonProperty("fullUpload") @JsonDeserialize(using = BooleanDeserializer.class) Boolean fullUpload, + @JsonProperty("uri") String uri, + @JsonProperty("createdAt") @JsonDeserialize(using = GDZonedDateTimeDeserializer.class) ZonedDateTime createdAt, + @JsonProperty("fileSize") Integer size, + @JsonProperty("processedAt") @JsonDeserialize(using = GDZonedDateTimeDeserializer.class) ZonedDateTime processedAt) { this.uri = uri; this.status = status; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadMode.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadMode.java index fd573ac2b..2c0c67d61 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadMode.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadMode.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadStatistics.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadStatistics.java index 146e1df99..540d76653 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadStatistics.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadStatistics.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Uploads.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Uploads.java index 266dc5686..1b44c8735 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Uploads.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/Uploads.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadsInfo.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadsInfo.java index b0d4f413f..80b8dcdd8 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadsInfo.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/dataset/UploadsInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,8 +9,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -import com.gooddata.sdk.model.md.Meta; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.Meta; import java.util.Collection; import java.util.HashMap; @@ -70,7 +70,7 @@ public String toString() { *

  • uri to all uploads for the given dataset
  • *
  • last upload
  • * - * + *

    * Deserialization only. */ @JsonIgnoreProperties(ignoreUnknown = true) diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/Execution.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/Execution.java index 275c1c1dc..807f94382 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/Execution.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/Execution.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.afm.Afm; import com.gooddata.sdk.model.executeafm.resultspec.ResultSpec; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; /** * Represents structure for triggering execution of contained AFM (Attributes Filters Metrics). diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/IdentifierObjQualifier.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/IdentifierObjQualifier.java index fd2a00e44..52305268d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/IdentifierObjQualifier.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/IdentifierObjQualifier.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,8 +7,8 @@ import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.annotation.JsonValue; -import com.gooddata.sdk.model.md.Obj; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.Obj; import java.io.Serializable; import java.util.Objects; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/LocalIdentifierQualifier.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/LocalIdentifierQualifier.java index ef33ae1d4..5a49c4dbc 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/LocalIdentifierQualifier.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/LocalIdentifierQualifier.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/ObjQualifier.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/ObjQualifier.java index cf7a5d61c..8f125fab9 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/ObjQualifier.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/ObjQualifier.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -21,6 +21,7 @@ public interface ObjQualifier extends Qualifier { /** * Returns the qualifier in the form of uri. Default implementation throws {@link UnsupportedOperationException} + * * @return uri qualifier */ default String getUri() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/Qualifier.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/Qualifier.java index 2a8635a3d..dda15d711 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/Qualifier.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/Qualifier.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/ResultPage.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/ResultPage.java index 5de0229dd..1839ca11b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/ResultPage.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/ResultPage.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -24,8 +24,9 @@ public class ResultPage { /** * Creates new instance + * * @param offsets list of page offsets - * @param limits list of page limits + * @param limits list of page limits */ public ResultPage(final List offsets, final List limits) { this.offsets = notEmpty(offsets, "offsets"); @@ -35,6 +36,10 @@ public ResultPage(final List offsets, final List limits) { } } + private static String toQueryParam(final List list) { + return list.stream().map(String::valueOf).collect(joining("%2C")); + } + /** * @return page offsets joined and URL-encoded to be used as query parameter */ @@ -48,8 +53,4 @@ public String getOffsetsQueryParam() { public String getLimitsQueryParam() { return toQueryParam(limits); } - - private static String toQueryParam(final List list) { - return list.stream().map(String::valueOf).collect(joining("%2C")); - } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/UriObjQualifier.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/UriObjQualifier.java index fc5db773f..55944043e 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/UriObjQualifier.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/UriObjQualifier.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,8 +7,8 @@ import com.fasterxml.jackson.annotation.JsonRootName; import com.fasterxml.jackson.annotation.JsonValue; -import com.gooddata.sdk.model.md.Obj; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.Obj; import java.io.Serializable; import java.util.Objects; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/VisualizationExecution.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/VisualizationExecution.java index 6ebdec422..9ab1be7d6 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/VisualizationExecution.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/VisualizationExecution.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -40,14 +40,14 @@ public VisualizationExecution(final String reference) { } /** - * @param reference reference uri to visualization object metadata - * @param filters additional filters which should be merged + * @param reference reference uri to visualization object metadata + * @param filters additional filters which should be merged * @param resultSpec result specification of executed viz. object */ @JsonCreator VisualizationExecution(@JsonProperty("reference") final String reference, - @JsonProperty("filters") final List filters, - @JsonProperty("resultSpec") final ResultSpec resultSpec) { + @JsonProperty("filters") final List filters, + @JsonProperty("resultSpec") final ResultSpec resultSpec) { this.reference = reference; this.resultSpec = resultSpec; this.filters = filters; @@ -65,13 +65,13 @@ public List getFilters() { } /** - * Sets the result specification and returns this instance + * Sets additional filters to this execution. * - * @param resultSpec result specification of executed viz. object + * @param filters additional filters * @return updated execution */ - public VisualizationExecution setResultSpec(final ResultSpec resultSpec) { - this.resultSpec = resultSpec; + public VisualizationExecution setFilters(final List filters) { + this.filters = filters; return this; } @@ -83,13 +83,13 @@ public ResultSpec getResultSpec() { } /** - * Sets additional filters to this execution. + * Sets the result specification and returns this instance * - * @param filters additional filters + * @param resultSpec result specification of executed viz. object * @return updated execution */ - public VisualizationExecution setFilters(final List filters) { - this.filters = filters; + public VisualizationExecution setResultSpec(final ResultSpec resultSpec) { + this.resultSpec = resultSpec; return this; } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/Afm.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/Afm.java index 6f66c6185..4bd2bc35b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/Afm.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/Afm.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,8 +9,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.executeafm.afm.filter.CompatibilityFilter; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.afm.filter.CompatibilityFilter; import java.util.ArrayList; import java.util.List; @@ -45,8 +45,15 @@ public Afm(@JsonProperty("attributes") final List attributes, public Afm() { } + private static T getIdentifiable(final List toSearch, final String localIdentifier) { + return Optional.ofNullable(toSearch) + .flatMap(a -> a.stream().filter(i -> Objects.equals(localIdentifier, i.getLocalIdentifier())).findFirst()) + .orElseThrow(() -> new IllegalArgumentException(format("Item of localIdentifier=%s not found", localIdentifier))); + } + /** * Find {@link AttributeItem} within attributes by given localIdentifier + * * @param localIdentifier identifier used for search * @return found attribute or throws exception */ @@ -57,6 +64,7 @@ public AttributeItem getAttribute(final String localIdentifier) { /** * Find {@link MeasureItem} within measures by given localIdentifier + * * @param localIdentifier identifier used for search * @return found measure or throws exception */ @@ -134,10 +142,4 @@ public String toString() { return GoodDataToStringBuilder.defaultToString(this); } - private static T getIdentifiable(final List toSearch, final String localIdentifier) { - return Optional.ofNullable(toSearch) - .flatMap(a -> a.stream().filter(i -> Objects.equals(localIdentifier, i.getLocalIdentifier())).findFirst()) - .orElseThrow(() -> new IllegalArgumentException(format("Item of localIdentifier=%s not found", localIdentifier))); - } - } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/Aggregation.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/Aggregation.java index 10d32e84e..e30c65bf0 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/Aggregation.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/Aggregation.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ArithmeticMeasureDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ArithmeticMeasureDefinition.java index 473df358e..77fa740c6 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ArithmeticMeasureDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ArithmeticMeasureDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,8 +8,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; -import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.ObjQualifier; import java.util.Collection; import java.util.Collections; @@ -21,17 +21,16 @@ @JsonRootName(PreviousPeriodMeasureDefinition.NAME) public class ArithmeticMeasureDefinition implements MeasureDefinition { - private static final long serialVersionUID = -2597112924341600780L; - static final String NAME = "arithmeticMeasure"; - + private static final long serialVersionUID = -2597112924341600780L; private final List measureIdentifiers; private final String operator; /** * Constructor of {@link ArithmeticMeasureDefinition} + * * @param measureIdentifiers local identifiers of measures - * @param operator operator used for aggregation, for example sum, difference, multiplication, ratio, growth + * @param operator operator used for aggregation, for example sum, difference, multiplication, ratio, growth */ @JsonCreator public ArithmeticMeasureDefinition( @@ -43,6 +42,7 @@ public ArithmeticMeasureDefinition( /** * no qualifiers are used, only local identifiers are used see {@link ArithmeticMeasureDefinition#getOperator()} + * * @return empty set */ @Override @@ -52,6 +52,7 @@ public Collection getObjQualifiers() { /** * no conversion is done, because this definition uses only local identifiers + * * @return this instance */ @Override @@ -66,6 +67,7 @@ public boolean isAdHoc() { /** * get local identifiers of used measures + * * @return local identifiers of measure */ public List getMeasureIdentifiers() { @@ -74,6 +76,7 @@ public List getMeasureIdentifiers() { /** * get used operator + * * @return used operator */ public String getOperator() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/AttributeItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/AttributeItem.java index ba7a4fe1d..8f49bb864 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/AttributeItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/AttributeItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,9 +8,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.model.md.AttributeDisplayForm; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.io.Serializable; import java.util.Objects; @@ -29,9 +29,10 @@ public class AttributeItem implements LocallyIdentifiable, Serializable { /** * Creates new instance - * @param displayForm qualifier of {@link AttributeDisplayForm} representing the attribute + * + * @param displayForm qualifier of {@link AttributeDisplayForm} representing the attribute * @param localIdentifier local identifier, unique within {@link Afm} - * @param alias attribute alias + * @param alias attribute alias */ @JsonCreator public AttributeItem(@JsonProperty("displayForm") final ObjQualifier displayForm, @@ -44,7 +45,8 @@ public AttributeItem(@JsonProperty("displayForm") final ObjQualifier displayForm /** * Creates new instance - * @param displayForm qualifier of {@link AttributeDisplayForm} representing the attribute + * + * @param displayForm qualifier of {@link AttributeDisplayForm} representing the attribute * @param localIdentifier local identifier, unique within {@link Afm} */ public AttributeItem(final ObjQualifier displayForm, final String localIdentifier) { @@ -73,6 +75,7 @@ public String getAlias() { /** * Sets attribute alias (used as header in result) + * * @param alias alias */ public void setAlias(final String alias) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/DerivedMeasureDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/DerivedMeasureDefinition.java index cb00178fe..365b111da 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/DerivedMeasureDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/DerivedMeasureDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -32,11 +32,8 @@ public abstract class DerivedMeasureDefinition implements MeasureDefinition { /** * Create a new instance of {@link DerivedMeasureDefinition}. * - * @param measureIdentifier - * The local identifier of the master measure this derived measure refers to. The parameter must not be null. - * - * @throws IllegalArgumentException - * Thrown when required parameter is null. + * @param measureIdentifier The local identifier of the master measure this derived measure refers to. The parameter must not be null. + * @throws IllegalArgumentException Thrown when required parameter is null. */ DerivedMeasureDefinition(final String measureIdentifier) { this.measureIdentifier = notNull(measureIdentifier, "measureIdentifier"); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/LocallyIdentifiable.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/LocallyIdentifiable.java index 9a754ea1b..5c556d91c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/LocallyIdentifiable.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/LocallyIdentifiable.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/MeasureDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/MeasureDefinition.java index 76489c3ee..e48df6116 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/MeasureDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/MeasureDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.gooddata.sdk.model.executeafm.IdentifierObjQualifier; import com.gooddata.sdk.model.executeafm.ObjQualifier; +import com.gooddata.sdk.model.md.Metric; import com.gooddata.sdk.model.md.visualization.VOPopMeasureDefinition; import com.gooddata.sdk.model.md.visualization.VOSimpleMeasureDefinition; -import com.gooddata.sdk.model.md.Metric; import java.io.Serializable; import java.util.Collection; @@ -59,16 +59,12 @@ default String getUri() { * The provided converter must be able to handle the conversion for the qualifiers that are of the {@link IdentifierObjQualifier} type that are used by * this object or its encapsulated child objects. * - * @param objQualifierConverter - * The function that converts identifier qualifiers to the matching URI qualifiers. In case when the object uses the identifier qualifiers, it - * will return a new copy of itself or its encapsulated objects that used URI qualifiers, otherwise the original object is returned. - * The parameter must not be null. - * + * @param objQualifierConverter The function that converts identifier qualifiers to the matching URI qualifiers. In case when the object uses the identifier qualifiers, it + * will return a new copy of itself or its encapsulated objects that used URI qualifiers, otherwise the original object is returned. + * The parameter must not be null. * @return copy of itself with replaced qualifiers in case when some {@link IdentifierObjQualifier} were used, otherwise original object is returned. - * - * @throws IllegalArgumentException - * The exception is thrown when conversion for the identifier qualifier used by this measure definition could not be made by the provided - * converter or when provided converter is null. + * @throws IllegalArgumentException The exception is thrown when conversion for the identifier qualifier used by this measure definition could not be made by the provided + * converter or when provided converter is null. */ MeasureDefinition withObjUriQualifiers(ObjQualifierConverter objQualifierConverter); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/MeasureItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/MeasureItem.java index 4bd0566eb..a22d2c914 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/MeasureItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/MeasureItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -63,6 +63,7 @@ public String getAlias() { /** * Sets measure alias (will be used as header in result) + * * @param alias alias */ public void setAlias(final String alias) { @@ -78,6 +79,7 @@ public String getFormat() { /** * Sets measure format (used to format measure values in result) + * * @param format */ public void setFormat(final String format) { @@ -103,7 +105,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; MeasureItem that = (MeasureItem) o; return Objects.equals(definition, that.definition) && - Objects.equals(localIdentifier, that.localIdentifier); + Objects.equals(localIdentifier, that.localIdentifier); } @Override diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/NativeTotalItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/NativeTotalItem.java index f3b7742c9..fdb5af35b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/NativeTotalItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/NativeTotalItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -13,7 +13,6 @@ import java.util.List; import static com.gooddata.sdk.common.util.Validate.notEmpty; -import static java.util.Arrays.asList; /** * Native total definition @@ -24,7 +23,8 @@ public class NativeTotalItem { /** * Native total definition - * @param measureIdentifier measure on which is total defined + * + * @param measureIdentifier measure on which is total defined * @param attributeIdentifiers subset of internal attribute identifiers in AFM defining total placement */ @JsonCreator @@ -37,6 +37,7 @@ public NativeTotalItem( /** * internal identifier of measure in AFM, on which is total defined + * * @return measure */ public String getMeasureIdentifier() { @@ -45,6 +46,7 @@ public String getMeasureIdentifier() { /** * subset of internal attribute identifiers in AFM defining total placement + * * @return list of identifiers (never null) */ public List getAttributeIdentifiers() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ObjIdentifierUtilities.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ObjIdentifierUtilities.java index 0194229f1..035a5243c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ObjIdentifierUtilities.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ObjIdentifierUtilities.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -23,26 +23,18 @@ abstract class ObjIdentifierUtilities { * Copy {@code objectToBeCopied} via provided {@code objectCopyFactory} in case when {@code qualifierForPossibleConversion} is of {@link * IdentifierObjQualifier} type. Otherwise the original object is returned. * - * @param objectToBeCopied - * The object that should be copied in case {@code qualifierForPossibleConversion} is of {@link IdentifierObjQualifier} type. The parameter must - * not be null. - * @param qualifierForPossibleConversion - * The qualifier that defines if {@code objectToBeCopied} will be copied or not. In case when it is of the {@link IdentifierObjQualifier} type, - * it will be converted via {@code qualifierConverter} and used in copy of the {@code objectToBeCopied}. The parameter must not be null. - * @param objectCopyFactory - * The factory method that accepts the result of the {@code qualifierForPossibleConversion} conversion in form of {@link UriObjQualifier} and - * returns new copy of the {@code objectToBeCopied}. The parameter must not be null. - * @param qualifierConverter - * The convert that can convert {@code qualifierForPossibleConversion} into its matching {@link UriObjQualifier} form. The parameter must not be - * null. - * @param - * The type of the object that should be copied. - * + * @param objectToBeCopied The object that should be copied in case {@code qualifierForPossibleConversion} is of {@link IdentifierObjQualifier} type. The parameter must + * not be null. + * @param qualifierForPossibleConversion The qualifier that defines if {@code objectToBeCopied} will be copied or not. In case when it is of the {@link IdentifierObjQualifier} type, + * it will be converted via {@code qualifierConverter} and used in copy of the {@code objectToBeCopied}. The parameter must not be null. + * @param objectCopyFactory The factory method that accepts the result of the {@code qualifierForPossibleConversion} conversion in form of {@link UriObjQualifier} and + * returns new copy of the {@code objectToBeCopied}. The parameter must not be null. + * @param qualifierConverter The convert that can convert {@code qualifierForPossibleConversion} into its matching {@link UriObjQualifier} form. The parameter must not be + * null. + * @param The type of the object that should be copied. * @return Copy of the {@code objectToBeCopied} in case when {@code qualifierForPossibleConversion} was of {@link IdentifierObjQualifier} type. Otherwise * the original object is returned. - * - * @throws IllegalArgumentException - * The exception is thrown when required parameter is null. + * @throws IllegalArgumentException The exception is thrown when required parameter is null. */ static R copyIfNecessary(final R objectToBeCopied, final ObjQualifier qualifierForPossibleConversion, diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ObjQualifierConverter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ObjQualifierConverter.java index 884f27545..4196d64fa 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ObjQualifierConverter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/ObjQualifierConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -19,9 +19,7 @@ public interface ObjQualifierConverter { /** * Convert provided {@link IdentifierObjQualifier} to the matching {@link UriObjQualifier}. * - * @param identifierObjQualifier - * The identifier that must be converted. - * + * @param identifierObjQualifier The identifier that must be converted. * @return The optional matching {@link UriObjQualifier} obtained by the conversion. */ Optional convertToUriQualifier(IdentifierObjQualifier identifierObjQualifier); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/OverPeriodDateAttribute.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/OverPeriodDateAttribute.java index 3062982a0..4c45443fa 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/OverPeriodDateAttribute.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/OverPeriodDateAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,8 +7,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.ObjQualifier; import java.io.Serializable; import java.util.Objects; @@ -28,15 +28,11 @@ public class OverPeriodDateAttribute implements Serializable { /** * Create a new instance of {@link OverPeriodDateAttribute}. * - * @param attribute - * The {@link ObjQualifier} of the attribute from the date data set that defines the PoP period and date data set. The parameter must not be - * null. - * @param periodsAgo - * The number of periods defined by the {@code attribute} about which this period will be shifted about. The positive number shifts the period to - * the past, the negative to the future. The parameter must not be null. - * - * @throws IllegalArgumentException - * Thrown when one of the required parameter is null. + * @param attribute The {@link ObjQualifier} of the attribute from the date data set that defines the PoP period and date data set. The parameter must not be + * null. + * @param periodsAgo The number of periods defined by the {@code attribute} about which this period will be shifted about. The positive number shifts the period to + * the past, the negative to the future. The parameter must not be null. + * @throws IllegalArgumentException Thrown when one of the required parameter is null. */ @JsonCreator public OverPeriodDateAttribute( diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/OverPeriodMeasureDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/OverPeriodMeasureDefinition.java index a54837543..0b29a36b3 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/OverPeriodMeasureDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/OverPeriodMeasureDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,17 +8,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; -import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.ObjQualifier; import java.util.Collection; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import static com.gooddata.sdk.model.executeafm.afm.OverPeriodMeasureDefinition.NAME; import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; +import static com.gooddata.sdk.model.executeafm.afm.OverPeriodMeasureDefinition.NAME; /** * Definition of the period over period measure that is used for the Same period last year and Same period 2 years back comparisons. @@ -26,22 +26,16 @@ @JsonRootName(NAME) public class OverPeriodMeasureDefinition extends DerivedMeasureDefinition { - private static final long serialVersionUID = -8904516814279504098L; - static final String NAME = "overPeriodMeasure"; - + private static final long serialVersionUID = -8904516814279504098L; private final List dateAttributes; /** * Create a new instance of {@link OverPeriodMeasureDefinition}. * - * @param measureIdentifier - * The local identifier of the measure this PoP measure refers to. The parameter must not be null. - * @param dateAttributes - * The date attributes that defines how this measure will be shifted in time. The parameter must not be null. - * - * @throws IllegalArgumentException - * Thrown when {@code dateAttributes} list is empty or required parameter is null. + * @param measureIdentifier The local identifier of the measure this PoP measure refers to. The parameter must not be null. + * @param dateAttributes The date attributes that defines how this measure will be shifted in time. The parameter must not be null. + * @throws IllegalArgumentException Thrown when {@code dateAttributes} list is empty or required parameter is null. */ @JsonCreator public OverPeriodMeasureDefinition( diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PopMeasureDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PopMeasureDefinition.java index ea8039471..966618f1f 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PopMeasureDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PopMeasureDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,8 +9,8 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; -import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.ObjQualifier; import java.util.Collection; import java.util.Collections; @@ -29,20 +29,16 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class PopMeasureDefinition extends DerivedMeasureDefinition { - private static final long serialVersionUID = 1430640153994197345L; - static final String NAME = "popMeasure"; - + private static final long serialVersionUID = 1430640153994197345L; private final ObjQualifier popAttribute; /** * Creates new definition from given measure identifier referencing another measure in {@link Afm} and given attribute qualifier (should qualify date * attribute) * - * @param measureIdentifier - * measure identifier - * @param popAttribute - * "period over period" date attribute + * @param measureIdentifier measure identifier + * @param popAttribute "period over period" date attribute */ @JsonCreator public PopMeasureDefinition(@JsonProperty("measureIdentifier") final String measureIdentifier, diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodDateDataSet.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodDateDataSet.java index 936cfeaf9..c00744557 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodDateDataSet.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodDateDataSet.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,9 +7,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.model.executeafm.afm.filter.DateFilter; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.io.Serializable; import java.util.Objects; @@ -29,14 +29,10 @@ public class PreviousPeriodDateDataSet implements Serializable { /** * Create a new instance of {@link PreviousPeriodDateDataSet}. * - * @param dataSet - * The {@link ObjQualifier} of the data set that match one of the {@link DateFilter} in the execution. The parameter must not be null. - * @param periodsAgo - * The number of periods defined by the matching date filter which this period will be shifted about. The positive number shifts the period to - * the past, the negative to the future. The parameter must not be null. - * - * @throws IllegalArgumentException - * Thrown when one of the required parameter is null. + * @param dataSet The {@link ObjQualifier} of the data set that match one of the {@link DateFilter} in the execution. The parameter must not be null. + * @param periodsAgo The number of periods defined by the matching date filter which this period will be shifted about. The positive number shifts the period to + * the past, the negative to the future. The parameter must not be null. + * @throws IllegalArgumentException Thrown when one of the required parameter is null. */ @JsonCreator public PreviousPeriodDateDataSet( diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodMeasureDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodMeasureDefinition.java index 8160e304b..096cb8be1 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodMeasureDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodMeasureDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,17 +8,17 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; -import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.ObjQualifier; import java.util.Collection; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; -import static com.gooddata.sdk.model.executeafm.afm.PreviousPeriodMeasureDefinition.NAME; import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; +import static com.gooddata.sdk.model.executeafm.afm.PreviousPeriodMeasureDefinition.NAME; /** * Definition of the period over period measure that is used for the Previous period comparison. @@ -26,22 +26,16 @@ @JsonRootName(NAME) public class PreviousPeriodMeasureDefinition extends DerivedMeasureDefinition { - private static final long serialVersionUID = -4741355657671354062L; - static final String NAME = "previousPeriodMeasure"; - + private static final long serialVersionUID = -4741355657671354062L; private final List dateDataSets; /** * Create a new instance of {@link PreviousPeriodMeasureDefinition}. * - * @param measureIdentifier - * The local identifier of the measure this PoP measure refers to. The parameter must not be null. - * @param dateDataSets - * The date data sets that defines how this measure will be shifted in time. The parameter must not be null. - * - * @throws IllegalArgumentException - * Thrown when {@code attributes} list is empty or required parameter is null. + * @param measureIdentifier The local identifier of the measure this PoP measure refers to. The parameter must not be null. + * @param dateDataSets The date data sets that defines how this measure will be shifted in time. The parameter must not be null. + * @throws IllegalArgumentException Thrown when {@code attributes} list is empty or required parameter is null. */ @JsonCreator public PreviousPeriodMeasureDefinition( diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/SimpleMeasureDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/SimpleMeasureDefinition.java index 85b12f93a..23eefe764 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/SimpleMeasureDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/SimpleMeasureDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,9 +9,9 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.model.executeafm.afm.filter.FilterItem; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.ArrayList; import java.util.Collection; @@ -19,8 +19,8 @@ import java.util.List; import java.util.Objects; -import static com.gooddata.sdk.model.executeafm.afm.SimpleMeasureDefinition.NAME; import static com.gooddata.sdk.common.util.Validate.notNull; +import static com.gooddata.sdk.model.executeafm.afm.SimpleMeasureDefinition.NAME; import static java.util.Arrays.asList; /** @@ -30,9 +30,8 @@ @JsonRootName(NAME) public class SimpleMeasureDefinition implements MeasureDefinition { - private static final long serialVersionUID = -385490772711914776L; static final String NAME = "measure"; - + private static final long serialVersionUID = -385490772711914776L; private final ObjQualifier item; private String aggregation; private Boolean computeRatio; @@ -45,14 +44,10 @@ public SimpleMeasureDefinition(final ObjQualifier item) { /** * Creates new definition * - * @param item - * item which is measured, can be attribute, fact or another measure - * @param aggregation - * additional aggregation applied - * @param computeRatio - * whether should be shown as ratio - * @param filters - * additional filters applied + * @param item item which is measured, can be attribute, fact or another measure + * @param aggregation additional aggregation applied + * @param computeRatio whether should be shown as ratio + * @param filters additional filters applied */ @JsonCreator public SimpleMeasureDefinition(@JsonProperty("item") final ObjQualifier item, @@ -68,14 +63,10 @@ public SimpleMeasureDefinition(@JsonProperty("item") final ObjQualifier item, /** * Creates new definition * - * @param item - * item which is measured, can be attribute, fact or another measure - * @param aggregation - * additional aggregation applied - * @param computeRatio - * whether should be shown as ratio - * @param filters - * additional filters applied + * @param item item which is measured, can be attribute, fact or another measure + * @param aggregation additional aggregation applied + * @param computeRatio whether should be shown as ratio + * @param filters additional filters applied */ public SimpleMeasureDefinition(final ObjQualifier item, final Aggregation aggregation, final Boolean computeRatio, final List filters) { @@ -85,14 +76,10 @@ public SimpleMeasureDefinition(final ObjQualifier item, final Aggregation aggreg /** * Creates new definition * - * @param item - * item which is measured, can be attribute, fact or another measure - * @param aggregation - * additional aggregation applied - * @param computeRatio - * whether should be shown as ratio - * @param filters - * additional filters applied + * @param item item which is measured, can be attribute, fact or another measure + * @param aggregation additional aggregation applied + * @param computeRatio whether should be shown as ratio + * @param filters additional filters applied */ public SimpleMeasureDefinition(final ObjQualifier item, final Aggregation aggregation, final Boolean computeRatio, final FilterItem... filters) { this(item, aggregation, computeRatio, asList(filters)); @@ -142,8 +129,7 @@ public String getAggregation() { /** * Set additional aggregation applied * - * @param aggregation - * additional aggregation applied + * @param aggregation additional aggregation applied */ public void setAggregation(final String aggregation) { this.aggregation = aggregation; @@ -152,8 +138,7 @@ public void setAggregation(final String aggregation) { /** * Set additional aggregation applied * - * @param aggregation - * additional aggregation applied + * @param aggregation additional aggregation applied */ public void setAggregation(final Aggregation aggregation) { setAggregation(notNull(aggregation, "aggregation").toString()); @@ -169,8 +154,7 @@ public Boolean getComputeRatio() { /** * Set whether should be shown as ratio * - * @param computeRatio - * whether should be shown as ratio + * @param computeRatio whether should be shown as ratio */ public void setComputeRatio(final Boolean computeRatio) { this.computeRatio = computeRatio; @@ -186,8 +170,7 @@ public List getFilters() { /** * Set additional filters applied * - * @param filters - * additional filters applied + * @param filters additional filters applied */ public void setFilters(final List filters) { this.filters = filters; @@ -196,8 +179,7 @@ public void setFilters(final List filters) { /** * Apply additional filter * - * @param filter - * filter to be applied + * @param filter filter to be applied */ public void addFilter(final FilterItem filter) { if (filters == null) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AbsoluteDateFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AbsoluteDateFilter.java index fe9b0d8a7..2e6d87022 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AbsoluteDateFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AbsoluteDateFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,10 +9,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; -import com.gooddata.sdk.model.executeafm.ObjQualifier; -import com.gooddata.sdk.model.executeafm.UriObjQualifier; import com.gooddata.sdk.common.util.GDLocalDate; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.ObjQualifier; +import com.gooddata.sdk.model.executeafm.UriObjQualifier; import java.time.LocalDate; import java.util.Objects; @@ -23,9 +23,8 @@ @JsonRootName(AbsoluteDateFilter.NAME) public class AbsoluteDateFilter extends DateFilter { - private static final long serialVersionUID = -1857726227400504182L; static final String NAME = "absoluteDateFilter"; - + private static final long serialVersionUID = -1857726227400504182L; @GDLocalDate private final LocalDate from; @GDLocalDate @@ -33,9 +32,10 @@ public class AbsoluteDateFilter extends DateFilter { /** * Creates new filter instance + * * @param dataSet qualifier of date dimension dataset - * @param from date from - * @param to date to + * @param from date from + * @param to date to */ @JsonCreator public AbsoluteDateFilter(@JsonProperty("dataSet") final ObjQualifier dataSet, diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AttributeFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AttributeFilter.java index c78c9baad..8edd5ff31 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AttributeFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AttributeFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -22,6 +22,7 @@ public abstract class AttributeFilter implements FilterItem, Serializable { /** * Creates new filter + * * @param displayForm qualifier of attribute's display form to be filtered */ AttributeFilter(final ObjQualifier displayForm) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AttributeFilterElements.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AttributeFilterElements.java index 5082f1d5a..1f01f6e81 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AttributeFilterElements.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/AttributeFilterElements.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -38,6 +38,12 @@ public interface AttributeFilterElements { class Serializer extends JsonSerializer { + private static void serializeWrapped(String name, AttributeFilterElements elements, JsonGenerator jg, SerializerProvider serializerProvider) throws IOException { + jg.writeStartObject(); + serializerProvider.defaultSerializeField(name, elements.getElements(), jg); + jg.writeEndObject(); + } + @Override public void serialize(AttributeFilterElements elements, JsonGenerator jg, SerializerProvider serializerProvider) throws IOException { if (elements instanceof UriAttributeFilterElements) { @@ -48,16 +54,14 @@ public void serialize(AttributeFilterElements elements, JsonGenerator jg, Serial serializerProvider.defaultSerializeValue(elements.getElements(), jg); } } - - private static void serializeWrapped(String name, AttributeFilterElements elements, JsonGenerator jg, SerializerProvider serializerProvider) throws IOException { - jg.writeStartObject(); - serializerProvider.defaultSerializeField(name, elements.getElements(), jg); - jg.writeEndObject(); - } } class Deserializer extends JsonDeserializer { + private static List nodeToElements(JsonNode node) { + return StreamSupport.stream(node.spliterator(), false).map(JsonNode::textValue).collect(Collectors.toList()); + } + @Override public AttributeFilterElements deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { final JsonNode node = jp.readValueAsTree(); @@ -78,10 +82,6 @@ public AttributeFilterElements deserialize(JsonParser jp, DeserializationContext throw from(jp, "Unknown value of type: " + jp.currentToken()); } } - - private static List nodeToElements(JsonNode node) { - return StreamSupport.stream(node.spliterator(), false).map(JsonNode::textValue).collect(Collectors.toList()); - } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonCondition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonCondition.java index caae5c588..1de8df6f2 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonCondition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonCondition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -32,9 +32,9 @@ public class ComparisonCondition extends MeasureValueFilterCondition implements @JsonCreator public ComparisonCondition( - @JsonProperty("operator") final String operator, - @JsonProperty("value") final BigDecimal value, - @JsonProperty("treatNullValuesAs") final BigDecimal treatNullValuesAs + @JsonProperty("operator") final String operator, + @JsonProperty("value") final BigDecimal value, + @JsonProperty("treatNullValuesAs") final BigDecimal treatNullValuesAs ) { super(treatNullValuesAs); this.operator = notNull(operator, "operator"); @@ -48,8 +48,8 @@ public ComparisonCondition( * @param value The value of the condition. */ public ComparisonCondition( - final ComparisonConditionOperator operator, - final BigDecimal value + final ComparisonConditionOperator operator, + final BigDecimal value ) { this(notNull(operator, "operator").toString(), value, null); } @@ -62,9 +62,9 @@ public ComparisonCondition( * @param treatNullValuesAs The number that will be used instead of compared values that are null. */ public ComparisonCondition( - final ComparisonConditionOperator operator, - final BigDecimal value, - final BigDecimal treatNullValuesAs + final ComparisonConditionOperator operator, + final BigDecimal value, + final BigDecimal treatNullValuesAs ) { this(notNull(operator, "operator").toString(), value, treatNullValuesAs); } @@ -96,7 +96,7 @@ public boolean equals(final Object o) { if (!super.equals(o)) return false; final ComparisonCondition that = (ComparisonCondition) o; return Objects.equals(operator, that.operator) && - Objects.equals(value, that.value); + Objects.equals(value, that.value); } @Override diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonConditionOperator.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonConditionOperator.java index 0ddfdea46..76a223612 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonConditionOperator.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonConditionOperator.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -24,12 +24,6 @@ public enum ComparisonConditionOperator { EQUAL_TO, NOT_EQUAL_TO; - @JsonValue - @Override - public String toString() { - return name(); - } - @JsonCreator public static ComparisonConditionOperator of(String operator) { notNull(operator, "operator"); @@ -37,9 +31,15 @@ public static ComparisonConditionOperator of(String operator) { return ComparisonConditionOperator.valueOf(operator); } catch (IllegalArgumentException e) { throw new UnsupportedOperationException( - format("Unknown value for comparison condition operator: \"%s\", supported values are: [%s]", - operator, stream(ComparisonConditionOperator.values()).map(Enum::name).collect(joining(","))), - e); + format("Unknown value for comparison condition operator: \"%s\", supported values are: [%s]", + operator, stream(ComparisonConditionOperator.values()).map(Enum::name).collect(joining(","))), + e); } } + + @JsonValue + @Override + public String toString() { + return name(); + } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/CompatibilityFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/CompatibilityFilter.java index 4b55b4eb6..fc1596f8a 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/CompatibilityFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/CompatibilityFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/DateFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/DateFilter.java index f3e4e0b8a..84b9e5e52 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/DateFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/DateFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -25,6 +25,7 @@ public abstract class DateFilter implements FilterItem, Serializable { /** * Creates new filter + * * @param dataSet qualifier of date dimension dataSet */ DateFilter(final ObjQualifier dataSet) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ExpressionFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ExpressionFilter.java index 196377156..df8b94969 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ExpressionFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ExpressionFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -22,6 +22,7 @@ public final class ExpressionFilter implements CompatibilityFilter { /** * Creates new instance + * * @param value expression value */ @JsonCreator diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ExtendedFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ExtendedFilter.java index 247c34858..ea0726cc4 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ExtendedFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ExtendedFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/FilterItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/FilterItem.java index 3f7be112d..be2525a0b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/FilterItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/FilterItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -25,6 +25,7 @@ public interface FilterItem extends CompatibilityFilter, ExtendedFilter { /** * Get qualifier of {@link Obj} to which the filter relates. + * * @return filtered object qualifier */ @JsonIgnore @@ -32,6 +33,7 @@ public interface FilterItem extends CompatibilityFilter, ExtendedFilter { /** * Copy itself using given uri qualifier + * * @param qualifier qualifier to use for the new filter * @return self copy with given qualifier */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilter.java index 66a03f6e0..e42ef87aa 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,10 +9,9 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.Qualifier; import com.gooddata.sdk.model.executeafm.UriObjQualifier; -import com.gooddata.sdk.model.md.visualization.Measure; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.io.Serializable; import java.util.Objects; @@ -46,7 +45,7 @@ public MeasureValueFilter(final Qualifier measure) { /** * Creates a new {@link MeasureValueFilter} instance. * - * @param measure The qualifier of referenced measure. + * @param measure The qualifier of referenced measure. * @param condition The condition applied to a sliced measure value. (Optional) */ @JsonCreator @@ -61,7 +60,6 @@ public MeasureValueFilter( * Copy itself using given uri qualifier * * @param qualifier qualifier to use for the new filter - * * @return self copy with given qualifier */ public MeasureValueFilter withUriObjQualifier(final UriObjQualifier qualifier) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterCondition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterCondition.java index be596e189..43aa9d4f8 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterCondition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterCondition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -16,7 +16,7 @@ /** * Covers all the conditions that can be used within {@link MeasureValueFilter}. - * + *

    * Contains shared functionality to set a custom value instead of {@code null} measure * values against the condition's value will be compared to. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/NegativeAttributeFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/NegativeAttributeFilter.java index 1fdd3f6f2..909c66d4f 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/NegativeAttributeFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/NegativeAttributeFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,9 +9,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.model.executeafm.UriObjQualifier; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.List; import java.util.Objects; @@ -24,9 +24,8 @@ @JsonRootName(NegativeAttributeFilter.NAME) public class NegativeAttributeFilter extends AttributeFilter { - private static final long serialVersionUID = -6202625318104289333L; static final String NAME = "negativeAttributeFilter"; - + private static final long serialVersionUID = -6202625318104289333L; private final AttributeFilterElements notIn; /** diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/PositiveAttributeFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/PositiveAttributeFilter.java index 70d7f9064..432870895 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/PositiveAttributeFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/PositiveAttributeFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,9 +8,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.model.executeafm.UriObjQualifier; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.List; import java.util.Objects; @@ -23,9 +23,8 @@ @JsonRootName(PositiveAttributeFilter.NAME) public class PositiveAttributeFilter extends AttributeFilter { - private static final long serialVersionUID = 1934771670274345290L; static final String NAME = "positiveAttributeFilter"; - + private static final long serialVersionUID = 1934771670274345290L; private final AttributeFilterElements in; /** diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RangeCondition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RangeCondition.java index 13e74ddc2..016164c58 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RangeCondition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RangeCondition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -33,10 +33,10 @@ public class RangeCondition extends MeasureValueFilterCondition implements Seria @JsonCreator public RangeCondition( - @JsonProperty("operator") final String operator, - @JsonProperty("from") final BigDecimal from, - @JsonProperty("to") final BigDecimal to, - @JsonProperty("treatNullValuesAs") final BigDecimal treatNullValuesAs) { + @JsonProperty("operator") final String operator, + @JsonProperty("from") final BigDecimal from, + @JsonProperty("to") final BigDecimal to, + @JsonProperty("treatNullValuesAs") final BigDecimal treatNullValuesAs) { super(treatNullValuesAs); this.operator = notNull(operator, "operator"); this.from = notNull(from, "from"); @@ -51,9 +51,9 @@ public RangeCondition( * @param to The right boundary value. */ public RangeCondition( - final RangeConditionOperator operator, - final BigDecimal from, - final BigDecimal to) { + final RangeConditionOperator operator, + final BigDecimal from, + final BigDecimal to) { this(notNull(operator, "operator").toString(), from, to, null); } @@ -66,10 +66,10 @@ public RangeCondition( * @param treatNullValuesAs The number that will be used instead of compared values that are null. */ public RangeCondition( - final RangeConditionOperator operator, - final BigDecimal from, - final BigDecimal to, - final BigDecimal treatNullValuesAs) { + final RangeConditionOperator operator, + final BigDecimal from, + final BigDecimal to, + final BigDecimal treatNullValuesAs) { this(notNull(operator, "operator").toString(), from, to, treatNullValuesAs); } @@ -82,7 +82,9 @@ public RangeConditionOperator getOperator() { } @JsonProperty("operator") - public String getStringOperator() { return this.operator; } + public String getStringOperator() { + return this.operator; + } /** * @return left boundary of the range @@ -105,8 +107,8 @@ public boolean equals(final Object o) { if (!super.equals(o)) return false; final RangeCondition that = (RangeCondition) o; return Objects.equals(operator, that.operator) && - Objects.equals(from, that.from) && - Objects.equals(to, that.to); + Objects.equals(from, that.from) && + Objects.equals(to, that.to); } @Override diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RangeConditionOperator.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RangeConditionOperator.java index bbf3d5f17..2c895d034 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RangeConditionOperator.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RangeConditionOperator.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -20,12 +20,6 @@ public enum RangeConditionOperator { BETWEEN, NOT_BETWEEN; - @JsonValue - @Override - public String toString() { - return name(); - } - @JsonCreator public static RangeConditionOperator of(String operator) { notNull(operator, "operator"); @@ -33,9 +27,15 @@ public static RangeConditionOperator of(String operator) { return RangeConditionOperator.valueOf(operator); } catch (IllegalArgumentException e) { throw new UnsupportedOperationException( - format("Unknown value for range condition operator: \"%s\", supported values are: [%s]", - operator, stream(RangeConditionOperator.values()).map(Enum::name).collect(joining(","))), - e); + format("Unknown value for range condition operator: \"%s\", supported values are: [%s]", + operator, stream(RangeConditionOperator.values()).map(Enum::name).collect(joining(","))), + e); } } + + @JsonValue + @Override + public String toString() { + return name(); + } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilter.java index 7250a4330..709a45f2e 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -12,7 +12,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; -import com.gooddata.sdk.common.util.Validate; import com.gooddata.sdk.model.executeafm.IdentifierObjQualifier; import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.model.executeafm.Qualifier; @@ -47,11 +46,10 @@ public class RankingFilter implements ExtendedFilter, CompatibilityFilter, Seria /** * Creates a new {@link RankingFilter} instance. * - * @param measures measures on which is the ranking applied. Must not be null. + * @param measures measures on which is the ranking applied. Must not be null. * @param attributes attributes that define ranking granularity. Optional, can be null. - * @param operator operator that defines the type of ranking. - * @param value number of requested ranked records. - * + * @param operator operator that defines the type of ranking. + * @param value number of requested ranked records. * @throws NullPointerException thrown when required parameter is not provided. */ @JsonCreator @@ -74,6 +72,10 @@ public RankingFilter( this(measures, attributes, notNull(operator, "operator must not be null!").name(), value); } + private static IllegalArgumentException buildExceptionForFailedConversion(final IdentifierObjQualifier qualifierFailedToConvert) { + return new IllegalArgumentException(format("Supplied converter does not provide conversion for '%s'!", qualifierFailedToConvert)); + } + /** * Returns all the qualifiers used by the ranking filter. *

    @@ -86,9 +88,9 @@ public RankingFilter( @JsonIgnore public Collection getObjQualifiers() { return Stream.concat( - this.measures.stream(), - this.attributes == null ? Stream.empty() : this.attributes.stream() - ) + this.measures.stream(), + this.attributes == null ? Stream.empty() : this.attributes.stream() + ) .filter(ObjQualifier.class::isInstance) .map(ObjQualifier.class::cast) .collect(Collectors.toSet()); @@ -102,15 +104,13 @@ public Collection getObjQualifiers() { * this object or its encapsulated child objects. * * @param objQualifierConverter The function that converts identifier qualifiers to the matching URI qualifiers. In case when the object uses the - * identifier qualifiers, it - * will return a new copy of itself or its encapsulated objects that used URI qualifiers, otherwise the original object is returned. - * The parameter must not be null. - * + * identifier qualifiers, it + * will return a new copy of itself or its encapsulated objects that used URI qualifiers, otherwise the original object is returned. + * The parameter must not be null. * @return copy of itself with replaced qualifiers in case when some {@link IdentifierObjQualifier} were used, otherwise original object is returned. - * * @throws IllegalArgumentException The exception is thrown when conversion for the identifier qualifier used by this ranking filter could not be - * made by the provided - * converter or when provided converter is null. + * made by the provided + * converter or when provided converter is null. */ public RankingFilter withObjUriQualifiers(final ObjQualifierConverter objQualifierConverter) { notNull(objQualifierConverter, "objQualifierConverter"); @@ -138,10 +138,6 @@ private Qualifier translateIdentifierQualifier(final Qualifier qualifier, final return qualifier; } - private static IllegalArgumentException buildExceptionForFailedConversion(final IdentifierObjQualifier qualifierFailedToConvert) { - return new IllegalArgumentException(format("Supplied converter does not provide conversion for '%s'!", qualifierFailedToConvert)); - } - /** * @return measures on which is the ranking applied */ @@ -158,6 +154,7 @@ public List getAttributes() { /** * Get operator as an enum constant for easier programmatic access. + * * @return ranking operator constant */ @JsonIgnore @@ -167,6 +164,7 @@ public RankingFilterOperator getOperator() { /** * Get operator as a string representation of the {@link RankingFilterOperator} enum constant as it was parsed from the JSON. + * * @return string operator provided at the time of the filter instance creation */ @JsonProperty("operator") diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterOperator.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterOperator.java index 503bb80b6..4a532fc70 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterOperator.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterOperator.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -21,12 +21,6 @@ public enum RankingFilterOperator { TOP, BOTTOM; - @JsonValue - @Override - public String toString() { - return name(); - } - @JsonCreator public static RankingFilterOperator of(final String operator) { notNull(operator, "operator"); @@ -39,4 +33,10 @@ operator, stream(RankingFilterOperator.values()).map(Enum::name).collect(joining e); } } + + @JsonValue + @Override + public String toString() { + return name(); + } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RelativeDateFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RelativeDateFilter.java index 4137e99a0..0cef6d2a7 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RelativeDateFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/RelativeDateFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,9 +9,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.model.executeafm.UriObjQualifier; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.Objects; @@ -24,19 +24,19 @@ @JsonRootName(RelativeDateFilter.NAME) public class RelativeDateFilter extends DateFilter { - private static final long serialVersionUID = 7257627800833737063L; static final String NAME = "relativeDateFilter"; - + private static final long serialVersionUID = 7257627800833737063L; private final String granularity; private final Integer from; private final Integer to; /** * Creates new instance - * @param dataSet qualifier of date dimension dataSet + * + * @param dataSet qualifier of date dimension dataSet * @param granularity granularity specified as type GDC date attribute type - * @param from from - * @param to to + * @param from from + * @param to to */ @JsonCreator public RelativeDateFilter(@JsonProperty("dataSet") final ObjQualifier dataSet, diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/SimpleAttributeFilterElements.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/SimpleAttributeFilterElements.java index 3193a3bec..dce54c676 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/SimpleAttributeFilterElements.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/SimpleAttributeFilterElements.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/UriAttributeFilterElements.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/UriAttributeFilterElements.java index 20c01abd5..c7d5aa4dd 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/UriAttributeFilterElements.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/UriAttributeFilterElements.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -19,13 +19,13 @@ */ public final class UriAttributeFilterElements implements AttributeFilterElements, Serializable { - private static final long serialVersionUID = -588170788038973574L; static final String NAME = "uris"; - + private static final long serialVersionUID = -588170788038973574L; private final List uris; /** * Creates new instance of given attribute elements' uris. + * * @param uris elements' uris. */ @JsonCreator @@ -35,6 +35,7 @@ public UriAttributeFilterElements(final List uris) { /** * Creates new instance of given attribute elements' uris. + * * @param uris elements' uris. */ public UriAttributeFilterElements(String... uris) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ValueAttributeFilterElements.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ValueAttributeFilterElements.java index a25422f47..d46faa45d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ValueAttributeFilterElements.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/afm/filter/ValueAttributeFilterElements.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -19,13 +19,13 @@ */ public final class ValueAttributeFilterElements implements AttributeFilterElements, Serializable { - private static final long serialVersionUID = 8162844914489089022L; static final String NAME = "values"; - + private static final long serialVersionUID = 8162844914489089022L; private final List values; /** * Creates new instance of given attribute elements' values. + * * @param values elements' values. */ @JsonCreator @@ -35,6 +35,7 @@ public ValueAttributeFilterElements(final List values) { /** * Creates new instance of given attribute elements' values. + * * @param values elements' values. */ public ValueAttributeFilterElements(String... values) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/AttributeHeader.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/AttributeHeader.java index df721fea5..606ea32c8 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/AttributeHeader.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/AttributeHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,10 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.afm.Afm; -import com.gooddata.sdk.model.executeafm.afm.LocallyIdentifiable; import com.gooddata.sdk.model.executeafm.afm.AttributeItem; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.afm.LocallyIdentifiable; import java.util.List; @@ -37,11 +37,12 @@ public class AttributeHeader implements Header, LocallyIdentifiable { /** * Creates new header - * @param name name + * + * @param name name * @param localIdentifier local identifier - * @param uri uri - * @param identifier identifier - * @param formOf info about attribute which this header's display form is form of + * @param uri uri + * @param identifier identifier + * @param formOf info about attribute which this header's display form is form of */ public AttributeHeader(final String name, final String localIdentifier, final String uri, final String identifier, final AttributeInHeader formOf) { this(name, localIdentifier, uri, identifier, formOf, null); @@ -49,11 +50,12 @@ public AttributeHeader(final String name, final String localIdentifier, final St /** * Creates new header - * @param name name - * @param localIdentifier local identifier - * @param uri uri - * @param identifier identifier - * @param formOf info about attribute which this header's display form is form of + * + * @param name name + * @param localIdentifier local identifier + * @param uri uri + * @param identifier identifier + * @param formOf info about attribute which this header's display form is form of * @param totalHeaderItems total header items */ public AttributeHeader(@JsonProperty("name") final String name, @@ -67,12 +69,13 @@ public AttributeHeader(@JsonProperty("name") final String name, /** * Creates new header - * @param name name - * @param localIdentifier local identifier - * @param uri uri - * @param identifier identifier - * @param type type - * @param formOf info about attribute which this header's display form is form of + * + * @param name name + * @param localIdentifier local identifier + * @param uri uri + * @param identifier identifier + * @param type type + * @param formOf info about attribute which this header's display form is form of * @param totalHeaderItems total header items */ @JsonCreator @@ -94,6 +97,7 @@ public AttributeHeader(@JsonProperty("name") final String name, /** * Header name, an attribute's display form title, or specified alias. + * * @return header name */ public String getName() { @@ -102,7 +106,8 @@ public String getName() { /** * Local identifier referencing header's {@link AttributeItem} - * within {@link Afm} + * within {@link Afm} + * * @return attribute's local identifier */ @Override @@ -112,6 +117,7 @@ public String getLocalIdentifier() { /** * Uri of attribute's display form + * * @return uri */ public String getUri() { @@ -120,6 +126,7 @@ public String getUri() { /** * Metadata identifier of attribute's display form + * * @return identifier */ public String getIdentifier() { @@ -128,6 +135,7 @@ public String getIdentifier() { /** * Metadata type of attribute's display form + * * @return type */ public String getType() { @@ -140,6 +148,7 @@ public AttributeInHeader getFormOf() { /** * Totals' headers belonging to the same level as this header. + * * @return lists of totals' header */ public List getTotalItems() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/AttributeInHeader.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/AttributeInHeader.java index c760a5924..0b5628c61 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/AttributeInHeader.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/AttributeInHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -23,8 +23,9 @@ public class AttributeInHeader { /** * Creates new instance - * @param name attribute's title - * @param uri attribute's uri + * + * @param name attribute's title + * @param uri attribute's uri * @param identifier attribute's identifier */ @JsonCreator diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/ExecutionResponse.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/ExecutionResponse.java index 6dab259d9..daf20ac38 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/ExecutionResponse.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/ExecutionResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,9 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.Execution; import com.gooddata.sdk.model.executeafm.result.ExecutionResult; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.LinkedHashMap; import java.util.List; @@ -22,7 +22,6 @@ import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; import static com.gooddata.sdk.common.util.Validate.notNullState; -import static org.apache.commons.lang3.ArrayUtils.toObject; /** * Represents response on {@link Execution} request. @@ -41,7 +40,8 @@ public class ExecutionResponse { /** * Creates new instance of given dimensions and execution result uri. - * @param dimensions dimensions + * + * @param dimensions dimensions * @param executionResultUri execution result uri */ public ExecutionResponse(final List dimensions, final String executionResultUri) { @@ -58,6 +58,7 @@ private ExecutionResponse(@JsonProperty("dimensions") final List getDimensions() { @@ -66,6 +67,7 @@ public List getDimensions() { /** * Map of response's links. + * * @return links */ public Map getLinks() { @@ -74,6 +76,7 @@ public Map getLinks() { /** * Uri referencing the data result location. + * * @return execution result uri or throws exception in case the link doesn't exist */ @JsonIgnore diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/Header.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/Header.java index cb6f82ea9..6830f752c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/Header.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/Header.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/MeasureGroupHeader.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/MeasureGroupHeader.java index 3779e95ef..cd5ad03d6 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/MeasureGroupHeader.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/MeasureGroupHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -24,6 +24,7 @@ public class MeasureGroupHeader implements Header { /** * Creates new header + * * @param items header items */ @JsonCreator @@ -33,6 +34,7 @@ public MeasureGroupHeader(@JsonProperty("items") final List i /** * Header items for particular measures + * * @return header items */ public List getItems() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/MeasureHeaderItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/MeasureHeaderItem.java index cedcb7721..9e89c228e 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/MeasureHeaderItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/MeasureHeaderItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,10 +10,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.executeafm.afm.Afm; import com.gooddata.sdk.model.executeafm.afm.LocallyIdentifiable; import com.gooddata.sdk.model.executeafm.afm.MeasureItem; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import static com.gooddata.sdk.common.util.Validate.notEmpty; @@ -52,6 +52,7 @@ public MeasureHeaderItem(@JsonProperty("name") final String name, /** * Header name, can be measure title, or specified alias + * * @return name */ public String getName() { @@ -68,6 +69,7 @@ public String getFormat() { /** * Local identifier, referencing the {@link MeasureItem} * in {@link Afm} + * * @return local identifier */ @Override @@ -82,23 +84,25 @@ public String getUri() { return uri; } - /** - * @return Measure metadata identifier - */ - public String getIdentifier() { - return identifier; - } - /** * Set measure uri + * * @param uri measure uri */ public void setUri(final String uri) { this.uri = uri; } + /** + * @return Measure metadata identifier + */ + public String getIdentifier() { + return identifier; + } + /** * Set measure metadata identifier + * * @param identifier */ public void setIdentifier(final String identifier) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/ResultDimension.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/ResultDimension.java index c69aadc70..a25bfb91d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/ResultDimension.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/ResultDimension.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,8 +8,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.executeafm.result.ExecutionResult; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.result.ExecutionResult; import java.util.List; @@ -24,6 +24,7 @@ public class ResultDimension { /** * Creates the result dimension of given headers + * * @param headers headers */ @JsonCreator @@ -33,6 +34,7 @@ public ResultDimension(@JsonProperty("headers") final List

    headers) { /** * Creates the result dimension of given headers + * * @param headers headers */ public ResultDimension(final Header... headers) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/TotalHeaderItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/TotalHeaderItem.java index 3f9574488..5eb38cc67 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/TotalHeaderItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/response/TotalHeaderItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,8 +9,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -import com.gooddata.sdk.model.md.report.Total; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.report.Total; import static com.gooddata.sdk.common.util.Validate.notNull; @@ -25,6 +25,7 @@ public class TotalHeaderItem { /** * Creates new header + * * @param name total name */ @JsonCreator @@ -34,6 +35,7 @@ public TotalHeaderItem(@JsonProperty("name") final String name) { /** * Creates new header + * * @param total total value */ public TotalHeaderItem(final Total total) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/AttributeHeaderItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/AttributeHeaderItem.java index 6f55c823d..8971ded4c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/AttributeHeaderItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/AttributeHeaderItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -24,8 +24,9 @@ public class AttributeHeaderItem extends ResultHeaderItem { /** * Creates new header item + * * @param name name of item (usually attribute element title) - * @param uri uri of item (usually attribute element uri) + * @param uri uri of item (usually attribute element uri) */ @JsonCreator public AttributeHeaderItem(@JsonProperty("name") final String name, @JsonProperty("uri") final String uri) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Data.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Data.java index 8adee2ab0..e8638cf83 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Data.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Data.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/DataList.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/DataList.java index a27e4ebc0..ba2da8143 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/DataList.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/DataList.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -21,6 +21,7 @@ public class DataList extends ArrayList implements Data { /** * Creates new instance of given list of data + * * @param values list to use as values, can't be null */ public DataList(final List values) { @@ -29,6 +30,7 @@ public DataList(final List values) { /** * Creates new instance by transforming the given array to list of simple or null values + * * @param array array of values */ DataList(final String[] array) { @@ -37,6 +39,7 @@ public DataList(final List values) { /** * Creates new instance by transforming the given array to list of data lists of simple or null values + * * @param array array of values */ DataList(final String[][] array) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/DataValue.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/DataValue.java index 454fa1902..2ed9372bb 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/DataValue.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/DataValue.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -19,6 +19,7 @@ public class DataValue implements Data { /** * Creates new instance of given value. + * * @param value textual value, can't be null */ public DataValue(final String value) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ExecutionResult.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ExecutionResult.java index dd186ad8f..82a1f656d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ExecutionResult.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ExecutionResult.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,8 +10,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -import com.gooddata.sdk.model.executeafm.Execution; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.Execution; import java.util.ArrayList; import java.util.List; @@ -36,7 +36,8 @@ public class ExecutionResult { /** * Creates new result - * @param data result data + * + * @param data result data * @param paging result paging */ public ExecutionResult(final String[] data, final Paging paging) { @@ -46,7 +47,8 @@ public ExecutionResult(final String[] data, final Paging paging) { /** * Creates new result - * @param data result data + * + * @param data result data * @param paging result paging */ public ExecutionResult(final String[][] data, final Paging paging) { @@ -56,10 +58,11 @@ public ExecutionResult(final String[][] data, final Paging paging) { /** * Creates new result - * @param data result data - * @param paging result paging + * + * @param data result data + * @param paging result paging * @param headerItems items for headers, for each header in each dimension, there is a list of header items - * @param totals data of totals, for each total in each dimension, there is a list of total's values + * @param totals data of totals, for each total in each dimension, there is a list of total's values */ @JsonCreator ExecutionResult(@JsonProperty("data") final DataList data, @@ -99,6 +102,7 @@ public List>> getHeaderItems() { /** * Sets header items, for each header in each dimension, there is a list of header items + * * @param headerItems header items */ public void setHeaderItems(final List>> headerItems) { @@ -107,6 +111,7 @@ public void setHeaderItems(final List>> headerItems) /** * Add header items for next dimension (this method will add dimension in header items) + * * @param items header items for one dimension */ public void addHeaderItems(final List> items) { @@ -125,6 +130,7 @@ public List>> getTotals() { /** * Sets total data, for each total in each dimension, there is a list of total's values + * * @param totals totals data */ public void setTotals(final List>> totals) { @@ -163,6 +169,7 @@ public List getWarnings() { /** * Sets warnings for this result + * * @param warnings result's warning */ public void setWarnings(final List warnings) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Paging.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Paging.java index 75590dfd2..0443db0c9 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Paging.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Paging.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -31,9 +31,10 @@ public Paging() { /** * Creates new paging - * @param count multiple dimensions count + * + * @param count multiple dimensions count * @param offset multiple dimensions offset - * @param total multiple dimensions total + * @param total multiple dimensions total */ @JsonCreator public Paging(@JsonProperty("count") final List count, @@ -67,6 +68,7 @@ public List getTotal() { /** * Sets count compound of given elements, each element per dimension + * * @param count count elements * @return this */ @@ -77,6 +79,7 @@ public Paging count(final int... count) { /** * Sets size compound of given elements, each element per dimension + * * @param total size elements * @return this */ @@ -87,6 +90,7 @@ public Paging total(final int... total) { /** * Sets size compound of given elements, each element per dimension + * * @param offset size elements * @return this */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultHeaderItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultHeaderItem.java index a043c5138..35ad52a8e 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultHeaderItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultHeaderItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultMeasureHeaderItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultMeasureHeaderItem.java index cbf241196..ad33f4482 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultMeasureHeaderItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultMeasureHeaderItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -23,7 +23,8 @@ public class ResultMeasureHeaderItem extends ResultHeaderItem { /** * Creates new instance of given header name and order - * @param name header name + * + * @param name header name * @param order measure order within measureGroup */ @JsonCreator diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultTotalHeaderItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultTotalHeaderItem.java index b0170e64b..8eaa8e1dc 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultTotalHeaderItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/ResultTotalHeaderItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import com.fasterxml.jackson.annotation.JsonRootName; import com.gooddata.sdk.model.md.report.Total; -import static com.gooddata.sdk.model.executeafm.result.ResultTotalHeaderItem.NAME; import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; +import static com.gooddata.sdk.model.executeafm.result.ResultTotalHeaderItem.NAME; /** * Header item for total. @@ -26,6 +26,7 @@ public class ResultTotalHeaderItem extends ResultHeaderItem { /** * Creates new instance of given total type, type is used for the name as well + * * @param type total type */ public ResultTotalHeaderItem(final String type) { @@ -34,6 +35,7 @@ public ResultTotalHeaderItem(final String type) { /** * Creates new instance of given total type, type is used for the name as well + * * @param type total type */ public ResultTotalHeaderItem(final Total type) { @@ -42,6 +44,7 @@ public ResultTotalHeaderItem(final Total type) { /** * Creates new instance of given header name and total type + * * @param name header name * @param type total type */ @@ -53,6 +56,7 @@ public ResultTotalHeaderItem(@JsonProperty("name") final String name, @JsonPrope /** * Creates new instance of given header name and total type + * * @param name header name * @param type total type */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Warning.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Warning.java index 8aa6f3559..33a9b0e47 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Warning.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/result/Warning.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -25,8 +25,9 @@ public class Warning { /** * Creates new instance + * * @param warningCode error code - * @param message message + * @param message message */ public Warning(final String warningCode, final String message) { this(warningCode, message, emptyList()); @@ -34,9 +35,10 @@ public Warning(final String warningCode, final String message) { /** * Creates new instance + * * @param warningCode error code - * @param message message - * @param parameters message's parameters + * @param message message + * @param parameters message's parameters */ @JsonCreator public Warning(@JsonProperty("warningCode") final String warningCode, diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeLocatorItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeLocatorItem.java index 6a315f2ee..0f185c2e5 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeLocatorItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeLocatorItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortAggregation.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortAggregation.java index 58f7a252a..7609010d6 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortAggregation.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortAggregation.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortItem.java index 36a0ea559..cf23e0605 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/Dimension.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/Dimension.java index 7b17e511e..dd3f14a95 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/Dimension.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/Dimension.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,8 +8,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.executeafm.afm.Afm; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.afm.Afm; import java.util.Collections; import java.util.HashSet; @@ -37,8 +37,9 @@ public class Dimension { /** * Creates new instance + * * @param itemIdentifiers identifiers referencing attributes from {@link Afm} or {@link Dimension#MEASURE_GROUP} - * @param totals set of totals + * @param totals set of totals */ @JsonCreator public Dimension( @@ -50,6 +51,7 @@ public Dimension( /** * Creates new instance + * * @param itemIdentifiers identifiers referencing attributes from {@link Afm} or {@link Dimension#MEASURE_GROUP} */ public Dimension(final List itemIdentifiers) { @@ -58,6 +60,7 @@ public Dimension(final List itemIdentifiers) { /** * Creates new instance + * * @param itemIdentifiers identifiers referencing attributes from {@link Afm} or {@link Dimension#MEASURE_GROUP} */ public Dimension(final String... itemIdentifiers) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/Direction.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/Direction.java index f95b6e463..2fa830757 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/Direction.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/Direction.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/LocatorItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/LocatorItem.java index 0a10b0eec..70654df42 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/LocatorItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/LocatorItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/MeasureLocatorItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/MeasureLocatorItem.java index c767499c9..0ca8ad407 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/MeasureLocatorItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/MeasureLocatorItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/MeasureSortItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/MeasureSortItem.java index 2173cf419..ea95fef26 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/MeasureSortItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/MeasureSortItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/ResultSpec.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/ResultSpec.java index 617b6b180..3aebfddff 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/ResultSpec.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/ResultSpec.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,8 +8,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.executeafm.afm.Afm; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.executeafm.afm.Afm; import java.util.ArrayList; import java.util.List; @@ -39,14 +39,14 @@ public List getDimensions() { return dimensions; } - public List getSorts() { - return sorts; - } - public void setDimensions(final List dimensions) { this.dimensions = dimensions; } + public List getSorts() { + return sorts; + } + public void setSorts(final List sorts) { this.sorts = sorts; } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/SortItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/SortItem.java index bac702583..d6891c73b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/SortItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/SortItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/TotalItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/TotalItem.java index 5be6aca30..b125547a5 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/TotalItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/TotalItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,8 +7,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.md.report.Total; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.report.Total; import java.util.Objects; @@ -25,8 +25,9 @@ public class TotalItem { /** * Total definition - * @param measureIdentifier measure on which is total defined - * @param type total type + * + * @param measureIdentifier measure on which is total defined + * @param type total type * @param attributeIdentifier internal attribute identifier in AFM defining total placement */ @JsonCreator @@ -44,6 +45,7 @@ public TotalItem(final String measureIdentifier, final Total total, final String /** * total type + * * @return total type */ public String getType() { @@ -52,6 +54,7 @@ public String getType() { /** * internal measure identifier in AFM, on which is total defined + * * @return measure */ public String getMeasureIdentifier() { @@ -60,6 +63,7 @@ public String getMeasureIdentifier() { /** * internal attribute identifier in AFM defining total placement + * * @return identifier (never null) */ public String getAttributeIdentifier() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/TotalLocatorItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/TotalLocatorItem.java index 1aa6437a3..8929c5f64 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/TotalLocatorItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/executeafm/resultspec/TotalLocatorItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ClientExport.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ClientExport.java index 0d56cf8e9..2258a8f0b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ClientExport.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ClientExport.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -32,9 +32,9 @@ public ClientExport(final String goodDataEndpointUri, final String projectUri, f final String tabId) { this(notEmpty(goodDataEndpointUri, "goodDataEndpointUri") + String.format(DASHBOARD_EXPORT_URI, - notNull(projectUri, "projectUri"), - notNull(dashboardUri, "dashboardUri"), - notNull(tabId, "tabId")), + notNull(projectUri, "projectUri"), + notNull(dashboardUri, "dashboardUri"), + notNull(tabId, "tabId")), "export.pdf"); } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExecuteReport.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExecuteReport.java index 380fbd6f2..e5a8bdddb 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExecuteReport.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExecuteReport.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,8 +7,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.md.report.Report; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.report.Report; import static com.gooddata.sdk.common.util.Validate.notNull; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExecuteReportDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExecuteReportDefinition.java index 89212cfc3..2efe1ded7 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExecuteReportDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExecuteReportDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,8 +7,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.md.report.ReportDefinition; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.report.ReportDefinition; import static com.gooddata.sdk.common.util.Validate.notNull; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExportFormat.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExportFormat.java index 815dd02bf..2351381ca 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExportFormat.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ExportFormat.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -14,13 +14,13 @@ public enum ExportFormat { PDF, XLS, PNG, CSV, HTML, XLSX; - public String getValue() { - return name().toLowerCase(); - } - public static String[] arrayToStringArray(final ExportFormat... formats) { return Stream.of(formats) .map(ExportFormat::getValue) .toArray(String[]::new); } + + public String getValue() { + return name().toLowerCase(); + } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ReportRequest.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ReportRequest.java index 7f067c3b2..a45308ee8 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ReportRequest.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/export/ReportRequest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/FeatureFlag.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/FeatureFlag.java index bfa85b1e8..484ff016a 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/FeatureFlag.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/FeatureFlag.java @@ -1,14 +1,14 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.featureflag; -import static com.gooddata.sdk.common.util.Validate.notNull; - import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import static com.gooddata.sdk.common.util.Validate.notNull; + /** * Feature flag is a boolean flag used for enabling / disabling some specific feature of GoodData platform. * It can be used in various scopes (per project, per project group, per user, global etc.). diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/FeatureFlags.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/FeatureFlags.java index c123582d1..9d81c3811 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/FeatureFlags.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/FeatureFlags.java @@ -1,14 +1,22 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.featureflag; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; -import java.util.*; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Optional; import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; @@ -79,16 +87,13 @@ private Optional findFlag(final String flagName) { public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; - final FeatureFlags that = (FeatureFlags) o; - - return !(featureFlags != null ? !featureFlags.equals(that.featureFlags) : that.featureFlags != null); - + return featureFlags.equals(that.featureFlags); } @Override public int hashCode() { - return featureFlags != null ? featureFlags.hashCode() : 0; + return featureFlags.hashCode(); } @Override diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlag.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlag.java index c59d92ef3..664034e8d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlag.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlag.java @@ -1,11 +1,17 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.featureflag; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import static com.gooddata.sdk.common.util.Validate.notEmpty; @@ -25,10 +31,9 @@ public class ProjectFeatureFlag { public static final String PROJECT_FEATURE_FLAG_URI = ProjectFeatureFlags.PROJECT_FEATURE_FLAGS_URI + "/{featureFlag}"; private final String name; - private boolean enabled; - @JsonIgnore private final Links links; + private boolean enabled; /** * Creates new project feature flag which is by default enabled (true). @@ -42,7 +47,7 @@ public ProjectFeatureFlag(String name) { /** * Creates new project feature flag with given value. * - * @param name unique name of feature flag + * @param name unique name of feature flag * @param enabled true (flag enabled) or false (flag disabled) */ public ProjectFeatureFlag(String name, boolean enabled) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlags.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlags.java index 0881b40b2..bcd2cd37b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlags.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlags.java @@ -1,13 +1,17 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.featureflag; -import com.fasterxml.jackson.annotation.*; -import com.gooddata.sdk.model.project.Project; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.project.Project; import java.util.Iterator; import java.util.LinkedList; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AboutLinks.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AboutLinks.java index e49efe2ab..14e57a9b0 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AboutLinks.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AboutLinks.java @@ -1,11 +1,16 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.gdc; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.Collection; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AbstractMaql.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AbstractMaql.java index 218ee9669..0ebff076d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AbstractMaql.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AbstractMaql.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AsyncTask.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AsyncTask.java index 60388ee5d..8fd0f34b9 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AsyncTask.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/AsyncTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/LinkEntries.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/LinkEntries.java index 95d0525c1..3324c8177 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/LinkEntries.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/LinkEntries.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/RootLinks.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/RootLinks.java index d03271eb9..fed0c3402 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/RootLinks.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/RootLinks.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/TaskStatus.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/TaskStatus.java index 9131e38f6..b9d70dc1b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/TaskStatus.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/TaskStatus.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/UriResponse.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/UriResponse.java index 6e2155fb5..0aa2201ad 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/UriResponse.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/gdc/UriResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItem.java index e4f6e5f2e..aec37382b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItem.java @@ -1,16 +1,27 @@ /* - * Copyright (C) 2004-2021, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.hierarchicalconfig; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNullState; -import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.*; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.CLIENT; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.DATA_PRODUCT; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.DOMAIN; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.PROJECT; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.PROJECT_GROUP; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.SEGMENT; /** * Contains information about hierarchical configuration object aka platform setting aka feature flag. @@ -30,14 +41,14 @@ public class ConfigItem { public static final String PROJECT_GROUP_CONFIG_ITEM_URI = PROJECT_GROUP.getApiUri() + "/{configName}"; private final String key; - private String value; private final String source; private final Links links; + private String value; /** * Creates new config item with given key/name and value. * - * @param key unique key/name of config item + * @param key unique key/name of config item * @param value value of config item */ public ConfigItem(String key, String value) { @@ -74,6 +85,10 @@ public String getValue() { return value; } + public void setValue(String value) { + this.value = value; + } + @JsonIgnore public String getSource() { return source; @@ -84,12 +99,9 @@ public Links getLinks() { return links; } - public void setValue(String value) { - this.value = value; - } - /** * Conversion method from String to Boolean type. + * * @return returns converted value: true or false */ @JsonIgnore @@ -103,6 +115,7 @@ public void setEnabled(Boolean value) { /** * Conversion method from source to SourceType enum. + * * @return returns SourceType or null, if source is not recognized */ @JsonIgnore diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItems.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItems.java index 6c94b945a..e09b1b0c7 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItems.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItems.java @@ -1,11 +1,15 @@ /* - * Copyright (C) 2004-2021, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.hierarchicalconfig; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.ArrayList; @@ -13,7 +17,12 @@ import java.util.List; import static com.gooddata.sdk.common.util.Validate.notEmpty; -import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.*; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.CLIENT; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.DATA_PRODUCT; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.DOMAIN; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.PROJECT; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.PROJECT_GROUP; +import static com.gooddata.sdk.model.hierarchicalconfig.SourceType.SEGMENT; /** * Contains collection of config items aka feature flags aka hierarchical config. diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/SourceType.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/SourceType.java index e0151826c..4a3a1b0eb 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/SourceType.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/hierarchicalconfig/SourceType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2021, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -55,7 +55,7 @@ public enum SourceType { private final String apiUri; /** - * @param name source of config item + * @param name source of config item * @param apiUri api uri in case that config item is manageable */ SourceType(String name, String apiUri) { @@ -63,14 +63,6 @@ public enum SourceType { this.apiUri = apiUri; } - public String getName() { - return name; - } - - public String getApiUri() { - return apiUri; - } - /** * Get source type by string. * @@ -81,6 +73,14 @@ public static SourceType get(String source) { return lookup.get(source); } + public String getName() { + return name; + } + + public String getApiUri() { + return apiUri; + } + @Override public String toString() { return this.name; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntities.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntities.java index 8d397b6fb..30dd48279 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntities.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntities.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntity.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntity.java index 9cf70d382..17f060ddb 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntity.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntity.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,19 +10,19 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.project.Project; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.project.Project; import java.util.Map; import java.util.Objects; +import static com.gooddata.sdk.common.util.Validate.notEmpty; +import static com.gooddata.sdk.common.util.Validate.notNull; +import static com.gooddata.sdk.common.util.Validate.notNullState; import static com.gooddata.sdk.model.lcm.LcmEntity.LinkCategory.CLIENT; import static com.gooddata.sdk.model.lcm.LcmEntity.LinkCategory.DATA_PRODUCT; import static com.gooddata.sdk.model.lcm.LcmEntity.LinkCategory.PROJECT; import static com.gooddata.sdk.model.lcm.LcmEntity.LinkCategory.SEGMENT; -import static com.gooddata.sdk.common.util.Validate.notEmpty; -import static com.gooddata.sdk.common.util.Validate.notNull; -import static com.gooddata.sdk.common.util.Validate.notNullState; /** * Single Life Cycle Management entity representing the relation between {@link Project}, @@ -41,9 +41,10 @@ public class LcmEntity { /** * Creates new instance of given project id and title - * @param projectId id of the project + * + * @param projectId id of the project * @param projectTitle title of the project - * @param links links + * @param links links */ public LcmEntity(final String projectId, final String projectTitle, final Map links) { this(projectId, projectTitle, null, null, null, links); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntityFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntityFilter.java index 0d0cb9f4e..3d04a01ac 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntityFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/lcm/LcmEntityFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -33,6 +33,7 @@ public LcmEntityFilter() { /** * Adds given data product to this filter. + * * @param dataProduct data product id - must not be empty. * @return this filter */ @@ -45,6 +46,7 @@ public LcmEntityFilter withDataProduct(final String dataProduct) { /** * Adds given segment to this filter. + * * @param segment segment id - must not be empty. * @return this filter */ @@ -57,6 +59,7 @@ public LcmEntityFilter withSegment(final String segment) { /** * Adds given client to this filter. + * * @param client client id - must not be empty. * @return this filter */ @@ -81,6 +84,7 @@ public String getClient() { /** * This filter in the form of query parameters map. + * * @return filter as query params map */ public Map> asQueryParams() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AbstractObj.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AbstractObj.java index 95358308c..44e9bde7d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AbstractObj.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AbstractObj.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,8 +7,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.util.UriHelper; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.util.UriHelper; import java.io.Serializable; import java.time.ZonedDateTime; @@ -30,6 +30,23 @@ protected AbstractObj(@JsonProperty("meta") Meta meta) { this.meta = meta; } + /** + * Get list of URIs of the given {@link Obj}s + * + * @param objs metadata objects + * @param Obj type + * @return list of URIs + */ + @SafeVarargs + protected static String[] uris(T... objs) { + noNullElements(objs, "objs"); + final String[] uris = new String[objs.length]; + for (int i = 0; i < objs.length; i++) { + uris[i] = objs[i].getUri(); + } + return uris; + } + /** * Returns internally generated ID of the object (that's part of the object URI). * @@ -169,23 +186,6 @@ public void setFlags(final Set flags) { meta.setFlags(flags); } - /** - * Get list of URIs of the given {@link Obj}s - * - * @param objs metadata objects - * @param Obj type - * @return list of URIs - */ - @SafeVarargs - protected static String[] uris(T... objs) { - noNullElements(objs, "objs"); - final String[] uris = new String[objs.length]; - for (int i = 0; i < objs.length; i++) { - uris[i] = objs[i].getUri(); - } - return uris; - } - @Override public String toString() { return GoodDataToStringBuilder.defaultToString(this); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Attachment.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Attachment.java index b81a7c426..2dba335f2 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Attachment.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Attachment.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -35,7 +35,9 @@ protected Attachment(@JsonProperty("uri") String uri) { this.uri = uri; } - public String getUri() { return uri; } + public String getUri() { + return uri; + } @Override public boolean equals(Object o) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Attribute.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Attribute.java index dd62e4ab0..d19b54908 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Attribute.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Attribute.java @@ -1,12 +1,10 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md; -import static java.util.Arrays.asList; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,6 +13,8 @@ import java.util.Collections; +import static java.util.Arrays.asList; + /** * Attribute of GoodData project dataset */ @@ -30,7 +30,7 @@ private Attribute(@JsonProperty("meta") Meta meta, @JsonProperty("content") Nest /* Just for serialization test */ Attribute(String title, Key primaryKey, Key foreignKey) { - this(new Meta(title), new Content(asList(primaryKey), asList(foreignKey), Collections.emptyList(), null, null, null, null, null, + this(new Meta(title), new Content(asList(primaryKey), asList(foreignKey), Collections.emptyList(), null, null, null, null, null, null, null, null, null, null, null)); } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeDisplayForm.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeDisplayForm.java index 024a7b979..d86dcd7e6 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeDisplayForm.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeDisplayForm.java @@ -1,11 +1,16 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.gooddata.sdk.common.util.BooleanDeserializer; @@ -27,7 +32,7 @@ public class AttributeDisplayForm extends DisplayForm implements Updatable { @JsonCreator private AttributeDisplayForm(@JsonProperty("meta") Meta meta, @JsonProperty("content") AttributeContent content, - @JsonProperty("links") Links links) { + @JsonProperty("links") Links links) { super(meta, content, links); this.attributeContent = content; } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeElement.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeElement.java index 3f4296372..ffd105b3e 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeElement.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeElement.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeElements.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeElements.java index 97ea4dedc..025b141de 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeElements.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeElements.java @@ -1,11 +1,16 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.List; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeSort.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeSort.java index 8b43f8221..a4d7d8838 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeSort.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/AttributeSort.java @@ -1,13 +1,10 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md; -import static com.gooddata.sdk.common.util.Validate.notEmpty; -import static com.gooddata.sdk.common.util.Validate.notNull; - import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; @@ -22,6 +19,9 @@ import java.io.IOException; import java.io.Serializable; +import static com.gooddata.sdk.common.util.Validate.notEmpty; +import static com.gooddata.sdk.common.util.Validate.notNull; + /** * Internal representation of attribute sort field. Which can be either plain text value or structure pointing to display form. */ @@ -29,10 +29,9 @@ @JsonSerialize(using = AttributeSort.Serializer.class) class AttributeSort implements Serializable { - private static final long serialVersionUID = -7415504020870223701L; static final String PK = "pk"; static final String BY_USED_DF = "byUsedDF"; - + private static final long serialVersionUID = -7415504020870223701L; private final String value; private final boolean linkType; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/BulkGet.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/BulkGet.java index 5eba715e6..7ca9401fc 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/BulkGet.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/BulkGet.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/BulkGetUris.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/BulkGetUris.java index 92028b215..17086a66b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/BulkGetUris.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/BulkGetUris.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Column.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Column.java index fabfa4983..ced161e41 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Column.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Column.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -22,16 +22,15 @@ @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME) public class Column extends AbstractObj implements Queryable { - private static final long serialVersionUID = 8235010456787885263L; public static final String TYPE_PK = "pk"; public static final String TYPE_INPUT_PK = "inputpk"; public static final String TYPE_FK = "fk"; public static final String TYPE_FACT = "fact"; public static final String TYPE_DISPLAY_FORM = "displayForm"; - + private static final long serialVersionUID = 8235010456787885263L; private final Content content; - private Column(@JsonProperty("meta") Meta meta, @JsonProperty("content")Content content) { + private Column(@JsonProperty("meta") Meta meta, @JsonProperty("content") Content content) { super(meta); this.content = content; } @@ -107,7 +106,7 @@ private static class Content implements Serializable { @JsonCreator private Content(@JsonProperty("table") String table, @JsonProperty("columnDBName") String columnDBName, - @JsonProperty("columnType") String columnType) { + @JsonProperty("columnType") String columnType) { this.table = table; this.columnDBName = columnDBName; this.columnType = columnType; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DashboardAttachment.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DashboardAttachment.java index 1a59ae25b..49eb19acd 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DashboardAttachment.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DashboardAttachment.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -27,18 +27,24 @@ protected DashboardAttachment( @JsonProperty("allTabs") Integer allTabs, @JsonProperty("executionContext") String executionContext, @JsonProperty("tabs") String... tabs - ) { + ) { super(uri); this.allTabs = allTabs; this.tabs = Arrays.asList(tabs); this.executionContext = executionContext; } - public Integer getAllTabs() { return allTabs; } + public Integer getAllTabs() { + return allTabs; + } - public Collection getTabs() { return tabs; } + public Collection getTabs() { + return tabs; + } - public String getExecutionContext() { return executionContext; } + public String getExecutionContext() { + return executionContext; + } @Override public boolean equals(final Object o) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DataLoadingColumn.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DataLoadingColumn.java index bb2935e72..55f0421e6 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DataLoadingColumn.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DataLoadingColumn.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,9 +11,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.gooddata.sdk.model.gdc.UriResponse; import com.gooddata.sdk.common.util.BooleanDeserializer; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.gdc.UriResponse; import java.io.Serializable; @@ -81,15 +81,15 @@ public boolean isNullable() { } public String getSynchronizeType() { - return content.getColumnSynchronize() != null ? content.getColumnSynchronize().getType() : null; + return content.getColumnSynchronize() != null ? content.getColumnSynchronize().getType() : null; } public Integer getSynchronizeLength() { - return content.getColumnSynchronize() != null ? content.getColumnSynchronize().getLength() : null; + return content.getColumnSynchronize() != null ? content.getColumnSynchronize().getLength() : null; } public Integer getSynchronizePrecision() { - return content.getColumnSynchronize() != null ? content.getColumnSynchronize().getPrecision() : null; + return content.getColumnSynchronize() != null ? content.getColumnSynchronize().getPrecision() : null; } @Override @@ -110,10 +110,10 @@ private static class Content implements Serializable { private final ColumnSynchronize columnSynchronize; private Content(@JsonProperty("column") UriResponse columnUri, @JsonProperty("columnName") String columnName, @JsonProperty("type") String columnType, - @JsonProperty("length") Integer columnLength, @JsonProperty("precision") Integer columnPrecision, - @JsonProperty("columnUnique") @JsonDeserialize(using = BooleanDeserializer.class) boolean columnUnique, - @JsonProperty("columnNull") @JsonDeserialize(using = BooleanDeserializer.class) boolean columnNull, - @JsonProperty("columnSynchronize") ColumnSynchronize columnSynchronize) { + @JsonProperty("length") Integer columnLength, @JsonProperty("precision") Integer columnPrecision, + @JsonProperty("columnUnique") @JsonDeserialize(using = BooleanDeserializer.class) boolean columnUnique, + @JsonProperty("columnNull") @JsonDeserialize(using = BooleanDeserializer.class) boolean columnNull, + @JsonProperty("columnSynchronize") ColumnSynchronize columnSynchronize) { this.columnUri = columnUri; this.columnName = columnName; this.columnType = columnType; @@ -169,7 +169,7 @@ private static class ColumnSynchronize implements Serializable { @JsonCreator private ColumnSynchronize(@JsonProperty("columnType") String type, @JsonProperty("columnLength") Integer length, - @JsonProperty("columnPrecision") Integer precision) { + @JsonProperty("columnPrecision") Integer precision) { this.type = type; this.length = length; this.precision = precision; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Dataset.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Dataset.java index 246581e9c..d320b2c66 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Dataset.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Dataset.java @@ -1,22 +1,20 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md; -import static com.gooddata.sdk.common.util.Validate.notNullState; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gooddata.sdk.common.util.BooleanDeserializer; -import com.gooddata.sdk.common.util.BooleanStringSerializer; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.gooddata.sdk.common.util.BooleanDeserializer; +import com.gooddata.sdk.common.util.BooleanStringSerializer; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.io.Serializable; @@ -24,6 +22,8 @@ import java.util.List; import java.util.Map; +import static com.gooddata.sdk.common.util.Validate.notNullState; + /** * Represents metadata dataset */ @@ -44,7 +44,7 @@ public class Dataset extends AbstractObj implements Queryable, Updatable { @JsonCreator private Dataset(@JsonProperty("meta") Meta meta, @JsonProperty("content") Content content, - @JsonProperty("links") Map links) { + @JsonProperty("links") Map links) { super(meta); this.content = content; this.links = links; @@ -114,11 +114,11 @@ private static class Content implements Serializable { @JsonCreator private Content(@JsonProperty("ties") List ties, - @JsonProperty("mode") String mode, - @JsonProperty("facts") List facts, - @JsonProperty("dataLoadingColumns") List dataLoadingColumns, - @JsonProperty("attributes") List attributes, - @JsonProperty("hasUploadConfiguration") @JsonDeserialize(using = BooleanDeserializer.class) Boolean hasUploadConfiguration) { + @JsonProperty("mode") String mode, + @JsonProperty("facts") List facts, + @JsonProperty("dataLoadingColumns") List dataLoadingColumns, + @JsonProperty("attributes") List attributes, + @JsonProperty("hasUploadConfiguration") @JsonDeserialize(using = BooleanDeserializer.class) Boolean hasUploadConfiguration) { this.ties = ties; this.mode = mode; this.facts = facts; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Dimension.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Dimension.java index fbe3284b4..a8331fee1 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Dimension.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Dimension.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DisplayForm.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DisplayForm.java index 061949229..06c314136 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DisplayForm.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/DisplayForm.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -31,7 +31,7 @@ public class DisplayForm extends AbstractObj { @JsonCreator protected DisplayForm(@JsonProperty("meta") Meta meta, @JsonProperty("content") Content content, - @JsonProperty("links") Links links) { + @JsonProperty("links") Links links) { super(meta); this.content = content; this.links = links; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Entry.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Entry.java index 0300a1e64..0de1741cc 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Entry.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Entry.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -12,14 +12,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.gooddata.sdk.model.util.TagsDeserializer; -import com.gooddata.sdk.model.util.TagsSerializer; -import com.gooddata.sdk.model.util.UriHelper; import com.gooddata.sdk.common.util.BooleanDeserializer; import com.gooddata.sdk.common.util.BooleanIntegerSerializer; import com.gooddata.sdk.common.util.BooleanStringSerializer; import com.gooddata.sdk.common.util.GDZonedDateTime; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.util.TagsDeserializer; +import com.gooddata.sdk.model.util.TagsSerializer; +import com.gooddata.sdk.model.util.UriHelper; import java.time.ZonedDateTime; import java.util.Set; @@ -78,6 +78,7 @@ public Entry(@JsonProperty("link") String uri, /** * Returns internally generated ID of the object (that's part of the object URI). + * * @return internal ID of the object */ @JsonIgnore @@ -125,6 +126,7 @@ public Boolean getDeprecated() { /** * Returns user-specified identifier of the object. + * * @return user-specified object identifier */ public String getIdentifier() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Expression.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Expression.java index a815ee415..a3676f6b2 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Expression.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Expression.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Fact.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Fact.java index 34146b9d8..678ae2e8b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Fact.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Fact.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -50,6 +50,7 @@ public Collection getExpressions() { /** * URIs of folders containing this object + * * @return collection of URIs or null */ @JsonIgnore diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifierAndUri.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifierAndUri.java index 0b47ce677..643dd93c2 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifierAndUri.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifierAndUri.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifierToUri.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifierToUri.java index 915e84db8..db0cd64ab 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifierToUri.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifierToUri.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -15,7 +15,7 @@ /** * Structure with list of symbolic names (identifiers) to be expanded to list of URIs. * Serialization only. - * + *

    * See also {@link UriToIdentifier}. */ public class IdentifierToUri { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifiersAndUris.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifiersAndUris.java index dd4f70cc9..d4fbc6ba7 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifiersAndUris.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/IdentifiersAndUris.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/InUseMany.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/InUseMany.java index 11837aaf4..6886c24d8 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/InUseMany.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/InUseMany.java @@ -1,20 +1,20 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gooddata.sdk.common.util.BooleanDeserializer; -import com.gooddata.sdk.common.util.BooleanStringSerializer; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.gooddata.sdk.common.util.BooleanDeserializer; +import com.gooddata.sdk.common.util.BooleanStringSerializer; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.Collection; @@ -45,8 +45,8 @@ public class InUseMany { @JsonCreator InUseMany(@JsonProperty("uris") Collection uris, - @JsonProperty("nearest") @JsonDeserialize(using = BooleanDeserializer.class) boolean nearest, - @JsonProperty("types") Set types) { + @JsonProperty("nearest") @JsonDeserialize(using = BooleanDeserializer.class) boolean nearest, + @JsonProperty("types") Set types) { this.uris = notEmpty(uris, "uris"); this.types = types; @@ -58,7 +58,7 @@ public InUseMany(Collection uris, boolean nearest, Class. this.uris = notNull(uris, "uris"); noNullElements(type, "type"); this.types = new HashSet<>(); - for (Class t: type) { + for (Class t : type) { this.types.add(decapitalize(t.getSimpleName())); } this.nearest = nearest; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Key.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Key.java index 0bad4af4a..d9c9b2024 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Key.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Key.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/MaqlAst.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/MaqlAst.java index b95b3d3ed..9b9be2384 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/MaqlAst.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/MaqlAst.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Meta.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Meta.java index 34ead8938..790efcf58 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Meta.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Meta.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -12,14 +12,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.gooddata.sdk.model.util.TagsDeserializer; -import com.gooddata.sdk.model.util.TagsSerializer; -import com.gooddata.sdk.model.util.UriHelper; import com.gooddata.sdk.common.util.BooleanDeserializer; import com.gooddata.sdk.common.util.BooleanIntegerSerializer; import com.gooddata.sdk.common.util.BooleanStringSerializer; import com.gooddata.sdk.common.util.GDZonedDateTime; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.util.TagsDeserializer; +import com.gooddata.sdk.model.util.TagsSerializer; +import com.gooddata.sdk.model.util.UriHelper; import java.io.Serializable; import java.time.ZonedDateTime; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Metric.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Metric.java index 59f3693a0..ccea81426 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Metric.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Metric.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -58,6 +58,7 @@ public MaqlAst getMaqlAst() { /** * URIs of folders containing this object + * * @return collection of URIs or null */ @JsonIgnore @@ -75,15 +76,12 @@ private static class Content implements Serializable { private static final long serialVersionUID = 7959588028233637749L; private final String expression; - + private final Collection folders; @JsonProperty("format") private String format; - @JsonProperty("tree") private MaqlAst maqlAst; - private final Collection folders; - @JsonCreator public Content(@JsonProperty("expression") String expression, @JsonProperty("folders") Collection folders) { this.expression = expression; @@ -100,22 +98,22 @@ public String getExpression() { return expression; } - public void setFormat(final String format) { - this.format = format; - } - public String getFormat() { return format; } - public void setMaqlAst(final MaqlAst maqlAst) { - this.maqlAst = maqlAst; + public void setFormat(final String format) { + this.format = format; } public MaqlAst getMaqlAst() { return maqlAst; } + public void setMaqlAst(final MaqlAst maqlAst) { + this.maqlAst = maqlAst; + } + public Collection getFolders() { return folders; } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/NestedAttribute.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/NestedAttribute.java index 1194d72e4..487844dcb 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/NestedAttribute.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/NestedAttribute.java @@ -1,11 +1,15 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.io.Serializable; @@ -131,6 +135,7 @@ public String getLinkedDisplayFormUri() { /** * URIs of folders containing this object + * * @return collection of URIs or null */ @JsonIgnore diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Obj.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Obj.java index 0467a533d..90bf5e414 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Obj.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Obj.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ProjectDashboard.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ProjectDashboard.java index 38f99de83..6db262a7e 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ProjectDashboard.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ProjectDashboard.java @@ -1,13 +1,10 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md; -import static com.gooddata.sdk.common.util.Validate.notNull; -import static java.util.Arrays.asList; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -22,6 +19,9 @@ import java.util.Collections; import java.util.Objects; +import static com.gooddata.sdk.common.util.Validate.notNull; +import static java.util.Arrays.asList; + /** * Project Dashboard of GoodData project.
    * Deserialization only. This object is not complete representation of real 'projectDashboard' object. @@ -55,8 +55,7 @@ public Collection getTabs() { * If tab with such name doesn't exist, returns {@code null}. * * @param name tab name - * @return - *

      + * @return
        *
      • dashboard tab with the given name
      • *
      • {@code null} if tab doesn't exist
      • *
      diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Query.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Query.java index 30d685295..306757d3c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Query.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Query.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Queryable.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Queryable.java index 6e7ed8434..aeb88f367 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Queryable.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Queryable.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ReportAttachment.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ReportAttachment.java index 359d78d51..acca59898 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ReportAttachment.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ReportAttachment.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,8 +7,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.export.ExportFormat; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.export.ExportFormat; import java.util.Arrays; import java.util.Collection; @@ -27,7 +27,7 @@ protected ReportAttachment( @JsonProperty("uri") String uri, @JsonProperty("exportOptions") Map exportOptions, @JsonProperty("formats") String... formats - ) { + ) { super(uri); this.exportOptions = exportOptions; this.formats = Arrays.asList(formats); @@ -38,9 +38,9 @@ protected ReportAttachment(String uri, Map exportOptions, Export } /** - * Options which modify default export behavior. Due to variety of - * export formats options only work for explicitly listed - * format types. + * Options which modify default export behavior. Due to variety of + * export formats options only work for explicitly listed + * format types. * *
        *
      • pageOrientation @@ -98,9 +98,13 @@ protected ReportAttachment(String uri, Map exportOptions, Export * * @return map of export options */ - public Map getExportOptions() { return exportOptions; } + public Map getExportOptions() { + return exportOptions; + } - public Collection getFormats() { return formats; } + public Collection getFormats() { + return formats; + } @Override public boolean equals(Object o) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Restriction.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Restriction.java index acfbcf1d3..9d6aa3972 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Restriction.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Restriction.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -25,14 +25,6 @@ private Restriction(Type type, String value) { this.value = notNull(value, "value"); } - public Type getType() { - return type; - } - - public String getValue() { - return value; - } - /** * Construct a new instance with restriction type identifier and given value. * @@ -63,6 +55,14 @@ public static Restriction summary(String value) { return new Restriction(Type.SUMMARY, value); } + public Type getType() { + return type; + } + + public String getValue() { + return value; + } + @Override public boolean equals(final Object o) { if (this == o) return true; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ScheduledMail.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ScheduledMail.java index 11d524142..9e03136e0 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ScheduledMail.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ScheduledMail.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,9 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.export.ExportFormat; import com.gooddata.sdk.model.md.report.ReportDefinition; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.io.Serializable; import java.time.LocalDate; @@ -62,7 +62,7 @@ private ScheduledMail(String title, String summary, Set tags, boolean de /** * Creates an almost empty instance of the object. It's up to the user's responsibility to call all the necessary setters. * - * @param title the title of the MD object + * @param title the title of the MD object * @param summary the summary of the MD object */ public ScheduledMail(String title, String summary) { @@ -74,16 +74,16 @@ public ScheduledMail(String title, String summary) { /** * Creates full, safe mail schedule object. * - * @param title the title of the MD object - * @param summary the summary of the MD object - * @param recurrency schedule in format defined in schedule - * @param startDate schedule starting date - * @param timeZone time zone of the starting date - * @param toAddresses collection of email addresses to send the mail to + * @param title the title of the MD object + * @param summary the summary of the MD object + * @param recurrency schedule in format defined in schedule + * @param startDate schedule starting date + * @param timeZone time zone of the starting date + * @param toAddresses collection of email addresses to send the mail to * @param bccAddresses collection of blind copy addresses to send the mail to - * @param subject the subject of the scheduled mail - * @param body the text body of the scheduled mail - * @param attachments reports and dashboards to send in the scheduled email + * @param subject the subject of the scheduled mail + * @param body the text body of the scheduled mail + * @param attachments reports and dashboards to send in the scheduled email */ public ScheduledMail(String title, String summary, String recurrency, LocalDate startDate, String timeZone, Collection toAddresses, Collection bccAddresses, String subject, String body, @@ -92,6 +92,109 @@ public ScheduledMail(String title, String summary, String recurrency, LocalDate bccAddresses, subject, body, attachments); } + @JsonIgnore + public ScheduledMailWhen getWhen() { + return content.getScheduledMailWhen(); + } + + @JsonIgnore + public Collection getToAddresses() { + return content.getToAddresses(); + } + + @JsonIgnore + public Collection getBccAddresses() { + return content.getBccAddresses(); + } + + @JsonIgnore + public String getSubject() { + return content.getSubject(); + } + + public ScheduledMail setSubject(String subject) { + this.content.setSubject(subject); + return this; + } + + @JsonIgnore + public String getBody() { + return content.getBody(); + } + + public ScheduledMail setBody(String body) { + this.content.setBody(body); + return this; + } + + @JsonIgnore + public Collection getAttachments() { + return content.getAttachments(); + } + + public ScheduledMail setAttachments(List attachments) { + this.content.setAttachments(attachments); + return this; + } + + public ScheduledMail setRecurrency(String recurrency) { + this.content.getScheduledMailWhen().setRecurrency(recurrency); + return this; + } + + public ScheduledMail setStartDate(LocalDate startDate) { + this.content.getScheduledMailWhen().setStartDate(startDate); + return this; + } + + public ScheduledMail setTimeZone(String timeZone) { + this.content.getScheduledMailWhen().setTimeZone(timeZone); + return this; + } + + public ScheduledMail setTo(Collection toAddresses) { + this.content.setToAddress(toAddresses); + return this; + } + + public ScheduledMail setBcc(Collection bccAddresses) { + this.content.setBccAddress(bccAddresses); + return this; + } + + public ScheduledMail addToAddress(String toAdd) { + this.content.getToAddresses().add(toAdd); + return this; + } + + public ScheduledMail addBccAddress(String bccAdd) { + this.content.getBccAddresses().add(bccAdd); + return this; + } + + public ScheduledMail addReportAttachment(ReportDefinition reportDefinition, Map exportOptions, String... formats) { + notNull(formats, "formats"); + ReportAttachment ra = new ReportAttachment(reportDefinition.getUri(), exportOptions, formats); + this.content.getAttachments().add(ra); + return this; + } + + public ScheduledMail addReportAttachment(ReportDefinition reportDefinition, Map exportOptions, ExportFormat... formats) { + return addReportAttachment(reportDefinition, exportOptions, ExportFormat.arrayToStringArray(formats)); + } + + public ScheduledMail addDashboardAttachment(String uri, Integer allTabs, String executionContext, String... tabs) { + notNull(tabs, "tabs"); + DashboardAttachment da = new DashboardAttachment(uri, allTabs, executionContext, tabs); + this.content.getAttachments().add(da); + return this; + } + + @Override + public String toString() { + return GoodDataToStringBuilder.defaultToString(this); + } + /** * Mail schedule MD object payload. */ @@ -142,138 +245,59 @@ public Content() { } @JsonIgnore - public ScheduledMailWhen getScheduledMailWhen() { return scheduledMailWhen; } - - @JsonIgnore - public Collection getToAddresses() { return toAddress; } - - @JsonIgnore - public Collection getBccAddresses() { return bccAddress; } - - public String getSubject() { return subject; } - - public String getBody() { return body; } - - public Collection getAttachments() { return attachments; } + public ScheduledMailWhen getScheduledMailWhen() { + return scheduledMailWhen; + } public void setScheduledMailWhen(ScheduledMailWhen scheduledMailWhen) { this.scheduledMailWhen = scheduledMailWhen; } - public void setToAddress(Collection toAddress) { - this.toAddress = toAddress; + @JsonIgnore + public Collection getToAddresses() { + return toAddress; } - public void setBccAddress(Collection bccAddress) { - this.bccAddress = bccAddress; + @JsonIgnore + public Collection getBccAddresses() { + return bccAddress; + } + + public String getSubject() { + return subject; } public void setSubject(String subject) { this.subject = subject; } + public String getBody() { + return body; + } + public void setBody(String body) { this.body = body; } + public Collection getAttachments() { + return attachments; + } + public void setAttachments(Collection attachments) { this.attachments = attachments; } + public void setToAddress(Collection toAddress) { + this.toAddress = toAddress; + } + + public void setBccAddress(Collection bccAddress) { + this.bccAddress = bccAddress; + } + @Override public String toString() { return GoodDataToStringBuilder.defaultToString(this); } } - - @JsonIgnore - public ScheduledMailWhen getWhen() { return content.getScheduledMailWhen(); } - - @JsonIgnore - public Collection getToAddresses() { return content.getToAddresses(); } - - @JsonIgnore - public Collection getBccAddresses() { return content.getBccAddresses(); } - - @JsonIgnore - public String getSubject() { return content.getSubject(); } - - @JsonIgnore - public String getBody() { return content.getBody(); } - - @JsonIgnore - public Collection getAttachments() { return content.getAttachments(); } - - public ScheduledMail setRecurrency(String recurrency) { - this.content.getScheduledMailWhen().setRecurrency(recurrency); - return this; - } - - public ScheduledMail setStartDate(LocalDate startDate) { - this.content.getScheduledMailWhen().setStartDate(startDate); - return this; - } - - public ScheduledMail setTimeZone(String timeZone) { - this.content.getScheduledMailWhen().setTimeZone(timeZone); - return this; - } - - public ScheduledMail setTo(Collection toAddresses) { - this.content.setToAddress(toAddresses); - return this; - } - - public ScheduledMail setBcc(Collection bccAddresses) { - this.content.setBccAddress(bccAddresses); - return this; - } - - public ScheduledMail setSubject(String subject) { - this.content.setSubject(subject); - return this; - } - - public ScheduledMail setBody(String body) { - this.content.setBody(body); - return this; - } - - public ScheduledMail setAttachments(List attachments) { - this.content.setAttachments(attachments); - return this; - } - - public ScheduledMail addToAddress(String toAdd) { - this.content.getToAddresses().add(toAdd); - return this; - } - - public ScheduledMail addBccAddress(String bccAdd) { - this.content.getBccAddresses().add(bccAdd); - return this; - } - - public ScheduledMail addReportAttachment(ReportDefinition reportDefinition, Map exportOptions, String... formats) { - notNull(formats, "formats"); - ReportAttachment ra = new ReportAttachment(reportDefinition.getUri(), exportOptions, formats); - this.content.getAttachments().add(ra); - return this; - } - - public ScheduledMail addReportAttachment(ReportDefinition reportDefinition, Map exportOptions, ExportFormat... formats) { - return addReportAttachment(reportDefinition, exportOptions, ExportFormat.arrayToStringArray(formats)); - } - - public ScheduledMail addDashboardAttachment(String uri, Integer allTabs, String executionContext, String... tabs) { - notNull(tabs, "tabs"); - DashboardAttachment da = new DashboardAttachment(uri, allTabs, executionContext, tabs); - this.content.getAttachments().add(da); - return this; - } - - @Override - public String toString() { - return GoodDataToStringBuilder.defaultToString(this); - } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ScheduledMailWhen.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ScheduledMailWhen.java index 32ef2a3d8..106c5e93b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ScheduledMailWhen.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/ScheduledMailWhen.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -40,13 +40,32 @@ protected ScheduledMailWhen(@JsonProperty("recurrency") String recurrency, this.timeZone = timeZone; } - public ScheduledMailWhen() {} + public ScheduledMailWhen() { + } + + public String getRecurrency() { + return recurrency; + } + + public void setRecurrency(String recurrency) { + this.recurrency = recurrency; + } - public String getRecurrency() { return recurrency; } + public LocalDate getStartDate() { + return startDate; + } - public LocalDate getStartDate() { return startDate; } + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } - public String getTimeZone() { return timeZone; } + public String getTimeZone() { + return timeZone; + } + + public void setTimeZone(String timeZone) { + this.timeZone = timeZone; + } @Override public boolean equals(Object o) { @@ -55,8 +74,10 @@ public boolean equals(Object o) { ScheduledMailWhen scheduledMailWhen = (ScheduledMailWhen) o; - if (recurrency != null ? !recurrency.equals(scheduledMailWhen.recurrency) : scheduledMailWhen.recurrency != null) return false; - if (startDate != null ? !startDate.equals(scheduledMailWhen.startDate) : scheduledMailWhen.startDate != null) return false; + if (recurrency != null ? !recurrency.equals(scheduledMailWhen.recurrency) : scheduledMailWhen.recurrency != null) + return false; + if (startDate != null ? !startDate.equals(scheduledMailWhen.startDate) : scheduledMailWhen.startDate != null) + return false; return !(timeZone != null ? !timeZone.equals(scheduledMailWhen.timeZone) : scheduledMailWhen.timeZone != null); } @@ -69,18 +90,6 @@ public int hashCode() { return result; } - public void setRecurrency(String recurrency) { - this.recurrency = recurrency; - } - - public void setStartDate(LocalDate startDate) { - this.startDate = startDate; - } - - public void setTimeZone(String timeZone) { - this.timeZone = timeZone; - } - @Override public String toString() { return GoodDataToStringBuilder.defaultToString(this); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Service.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Service.java new file mode 100644 index 000000000..e5db880b5 --- /dev/null +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Service.java @@ -0,0 +1,49 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.md; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; + +import java.io.Serializable; + +/** + * Represents project/workspace metadata configuration. + */ +@JsonTypeName("service") +@JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME) +@JsonIgnoreProperties(ignoreUnknown = true) +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Service implements Serializable { + + public static final String TIMEZONE_URI = "/gdc/md/{projectId}/service/timezone"; + + private static final long serialVersionUID = -3382672258337809805L; + + private final String timezone; + + @JsonCreator + public Service(@JsonProperty("timezone") String timezone) { + this.timezone = timezone; + } + + /** + * @return string identifier of the timezone (see IANA/Olson tz database for possible values) + */ + public String getTimezone() { + return timezone; + } + + @Override + public String toString() { + return GoodDataToStringBuilder.defaultToString(this); + } +} diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Table.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Table.java index ebea9aee2..514353859 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Table.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Table.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -76,7 +76,7 @@ private static class Content implements Serializable { @JsonCreator private Content(@JsonProperty("tableDBName") String tableDBName, @JsonProperty("activeDataLoad") String activeDataLoad, - @JsonProperty("tableDataLoad") Collection tableDataLoads, @JsonProperty("weight") Integer weight) { + @JsonProperty("tableDataLoad") Collection tableDataLoads, @JsonProperty("weight") Integer weight) { this.tableDBName = tableDBName; this.activeDataLoad = activeDataLoad; this.tableDataLoads = tableDataLoads; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/TableDataLoad.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/TableDataLoad.java index 9dcb0ab3d..f5b9c22c5 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/TableDataLoad.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/TableDataLoad.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -22,10 +22,9 @@ @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME) public class TableDataLoad extends AbstractObj implements Queryable { - private static final long serialVersionUID = -5209417147612785042L; public static final String TYPE_FULL = "full"; public static final String TYPE_INCREMENTAL = "incremental"; - + private static final long serialVersionUID = -5209417147612785042L; private final Content content; @JsonCreator diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Updatable.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Updatable.java index e27b62dcf..13aa0f5c3 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Updatable.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Updatable.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UriToIdentifier.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UriToIdentifier.java index 6ac2dd9f1..f97a97de7 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UriToIdentifier.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UriToIdentifier.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -15,7 +15,7 @@ /** * Structure with list of URIs to be expanded to list of symbolic names (identifiers). * Serialization only. - * + *

        * See also {@link IdentifierToUri}. */ public class UriToIdentifier { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Usage.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Usage.java index fc8169b84..1a68c9746 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Usage.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/Usage.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -20,7 +20,8 @@ public class Usage { /** * Constructs object. - * @param uri object URI + * + * @param uri object URI * @param usedBy using objects */ public Usage(final String uri, final Collection usedBy) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UseMany.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UseMany.java index 8c5ea98d3..5dc8b3175 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UseMany.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UseMany.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UseManyEntries.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UseManyEntries.java index 99ccd2acb..0ae541db6 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UseManyEntries.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/UseManyEntries.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/AnalyticalDashboard.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/AnalyticalDashboard.java index 93b334804..4ef5337f9 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/AnalyticalDashboard.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/AnalyticalDashboard.java @@ -1,13 +1,11 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.dashboard; -import static com.gooddata.sdk.common.util.Validate.notNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -23,6 +21,8 @@ import java.util.Collections; import java.util.List; +import static com.gooddata.sdk.common.util.Validate.notNull; + /** * Represents analytical dashboard configuration. */ @@ -38,8 +38,8 @@ public class AnalyticalDashboard extends AbstractObj implements Queryable, Updat /** * Constructor. * - * @param title dashboard title - * @param widgetUris URIs of widgets located on dashboard + * @param title dashboard title + * @param widgetUris URIs of widgets located on dashboard * @param filtersContextUri URI of filters context applied to this dashboard (optional) */ public AnalyticalDashboard(final String title, final List widgetUris, final String filtersContextUri) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/Kpi.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/Kpi.java index e3b247357..ff8427969 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/Kpi.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/Kpi.java @@ -1,14 +1,11 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.dashboard; -import static com.gooddata.sdk.common.util.Validate.notEmpty; -import static com.gooddata.sdk.common.util.Validate.notNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -26,6 +23,9 @@ import java.util.Collections; import java.util.List; +import static com.gooddata.sdk.common.util.Validate.notEmpty; +import static com.gooddata.sdk.common.util.Validate.notNull; + /** * Represents KPI (key performance indicator) for analytical dashboard. */ @@ -42,15 +42,16 @@ public class Kpi extends AbstractObj implements Queryable, Updatable { /** * Creates new KPI for a given metric with some date filter and comparison - * @param title title of KPI - * @param metricUri URI of the KPI metric - * @param comparisonType KPI comparison type (e.g. {@code "lastYear"}) - * @param comparisonDirection KPI comparison direction (e.g. {@code "growIsGood"}) + * + * @param title title of KPI + * @param metricUri URI of the KPI metric + * @param comparisonType KPI comparison type (e.g. {@code "lastYear"}) + * @param comparisonDirection KPI comparison direction (e.g. {@code "growIsGood"}) * @param ignoreDashboardFilters list of filters which should be ignored for this KPI (can be empty) - * @param dateDatasetUri KPI date filter dataset URI (optional) + * @param dateDatasetUri KPI date filter dataset URI (optional) */ public Kpi(final String title, final String metricUri, final String comparisonType, final String comparisonDirection, - final List ignoreDashboardFilters, final String dateDatasetUri) { + final List ignoreDashboardFilters, final String dateDatasetUri) { this(new Meta(title), new Content( notEmpty(metricUri, "metricUri"), notEmpty(comparisonType, "comparisonType"), @@ -60,6 +61,12 @@ public Kpi(final String title, final String metricUri, final String comparisonTy notNull(ignoreDashboardFilters, "ignoreDashboardFilters"))); } + @JsonCreator + private Kpi(@JsonProperty("meta") final Meta meta, @JsonProperty("content") final Content content) { + super(meta); + this.content = content; + } + private static String checkDirection(final String comparisonType, final String comparisonDirection) { if (NONE_COMPARISON_TYPE.equalsIgnoreCase(notEmpty(comparisonType, "comparisonType"))) { return notEmpty(comparisonDirection, "comparisonDirection"); @@ -68,12 +75,6 @@ private static String checkDirection(final String comparisonType, final String c } } - @JsonCreator - private Kpi(@JsonProperty("meta") final Meta meta, @JsonProperty("content") final Content content) { - super(meta); - this.content = content; - } - /** * @return KPI metric URI string */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/KpiAlert.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/KpiAlert.java index 5a98793ba..91a762dc5 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/KpiAlert.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/KpiAlert.java @@ -1,13 +1,11 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.dashboard; -import static com.gooddata.sdk.common.util.Validate.notEmpty; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -21,6 +19,8 @@ import java.io.Serializable; +import static com.gooddata.sdk.common.util.Validate.notEmpty; + /** * Represents KPI alert set for some KPI on analytical dashboard. */ @@ -36,10 +36,10 @@ public class KpiAlert extends AbstractObj implements Queryable, Updatable { /** * Constructor. * - * @param title KPI alert title - * @param kpiUri URI of the KPI for which the alert is defined - * @param dashboardUri URI of the KPI where the KPI alert is located - * @param threshold KPI alert threshold + * @param title KPI alert title + * @param kpiUri URI of the KPI for which the alert is defined + * @param dashboardUri URI of the KPI where the KPI alert is located + * @param threshold KPI alert threshold * @param triggerCondition condition for triggering KPI alert * @param filterContextUri URI of filter context used for computation of KPI alert (optional) */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/AttributeFilterReference.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/AttributeFilterReference.java index 1c8e2d46f..b56af6159 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/AttributeFilterReference.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/AttributeFilterReference.java @@ -1,19 +1,19 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.dashboard.filter; -import static com.gooddata.sdk.common.util.Validate.notEmpty; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import static com.gooddata.sdk.common.util.Validate.notEmpty; + /** * Reference for attribute filter for ignoring particular filter in {@link com.gooddata.sdk.model.md.dashboard.Kpi}. * Is not standalone metadata object - must be part of {@link com.gooddata.sdk.model.md.dashboard.Kpi}. @@ -23,14 +23,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class AttributeFilterReference implements FilterReference { - private static final long serialVersionUID = -7882622280867466659L; - static final String NAME = "attributeFilterReference"; - + private static final long serialVersionUID = -7882622280867466659L; private final String displayFormUri; /** * Constructor. + * * @param displayFormUri display form URI of filter */ @JsonCreator diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardAttributeFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardAttributeFilter.java index 53b550242..db70fc40c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardAttributeFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardAttributeFilter.java @@ -1,13 +1,11 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.dashboard.filter; -import static com.gooddata.sdk.common.util.Validate.notEmpty; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -19,6 +17,8 @@ import java.util.Collections; import java.util.List; +import static com.gooddata.sdk.common.util.Validate.notEmpty; + /** * Attribute filter located on analytical dashboard. * Is not standalone metadata object - always must be part of {@link DashboardFilterContext}. @@ -37,8 +37,8 @@ public class DashboardAttributeFilter implements DashboardFilter { /** * Constructor. * - * @param displayForm display form of an attribute where this filter is applied - * @param negativeSelection if the negative selection of filter elements is applied + * @param displayForm display form of an attribute where this filter is applied + * @param negativeSelection if the negative selection of filter elements is applied * @param attributeElementUris list of attribute element URIs applied in filter */ @JsonCreator @@ -67,7 +67,6 @@ public boolean isNegativeSelection() { /** * @return list of attribute element URI strings which should be included or excluded in filter - * * @see #isNegativeSelection() */ @JsonIgnore diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardDateFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardDateFilter.java index b21bc9527..7dcf10db1 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardDateFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardDateFilter.java @@ -1,14 +1,11 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.dashboard.filter; -import static com.gooddata.sdk.common.util.Validate.notEmpty; -import static com.gooddata.sdk.common.util.Validate.notNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; @@ -21,6 +18,9 @@ import java.time.LocalDate; import java.time.format.DateTimeFormatter; +import static com.gooddata.sdk.common.util.Validate.notEmpty; +import static com.gooddata.sdk.common.util.Validate.notNull; + /** * Date filter located on analytical dashboard. * Is not standalone metadata object - always must be part of {@link DashboardFilterContext}. @@ -34,11 +34,8 @@ public class DashboardDateFilter implements DashboardFilter { public static final String RELATIVE_FILTER_TYPE = "relative"; public static final String ABSOLUTE_FILTER_TYPE = "absolute"; public static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ISO_LOCAL_DATE; - - private static final String ABSOLUTE_DATE_FILTER_GRANULARITY = "GDC.time.date"; - static final String NAME = "dateFilter"; - + private static final String ABSOLUTE_DATE_FILTER_GRANULARITY = "GDC.time.date"; private final String from; private final String to; private final String granularity; @@ -62,10 +59,10 @@ private DashboardDateFilter( /** * Creates relative date filter with the given interval and granularity. * - * @param from interval from - * @param to interval to + * @param from interval from + * @param to interval to * @param granularity granularity (e.g. {@code GDC.time.year}) - * @param datasetUri date dataset URI (optional) + * @param datasetUri date dataset URI (optional) * @return created filter */ @JsonIgnore @@ -81,8 +78,8 @@ public static DashboardDateFilter relativeDateFilter(final int from, final int t /** * Creates absolute date filter with the given interval * - * @param from interval from - * @param to interval to + * @param from interval from + * @param to interval to * @param datasetUri date dataset URI (optional) * @return created filter */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilter.java index 6ca5ad78b..ad08662b1 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilterContext.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilterContext.java index 90b476ca2..e55ddd92c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilterContext.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilterContext.java @@ -1,29 +1,29 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.dashboard.filter; -import static com.gooddata.sdk.common.util.Validate.notNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.md.AbstractObj; import com.gooddata.sdk.model.md.Meta; import com.gooddata.sdk.model.md.Queryable; import com.gooddata.sdk.model.md.Updatable; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.io.Serializable; import java.util.Collections; import java.util.List; +import static com.gooddata.sdk.common.util.Validate.notNull; + /** * Class encapsulates list of filters on analytical dashboard. * Currently can contain {@link DashboardDateFilter}s and {@link DashboardAttributeFilter}s. @@ -33,10 +33,8 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class DashboardFilterContext extends AbstractObj implements Updatable, Queryable { - private static final long serialVersionUID = -4572881756272497057L; - static final String NAME = "filterContext"; - + private static final long serialVersionUID = -4572881756272497057L; private final Content content; /** diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DateFilterReference.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DateFilterReference.java index 3ae8b894d..34520d7c3 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DateFilterReference.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/DateFilterReference.java @@ -1,19 +1,19 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.dashboard.filter; -import static com.gooddata.sdk.common.util.Validate.notEmpty; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import static com.gooddata.sdk.common.util.Validate.notEmpty; + /** * Reference for date filter for ignoring particular filter in {@link com.gooddata.sdk.model.md.dashboard.Kpi}. * Is not standalone metadata object - must be part of {@link com.gooddata.sdk.model.md.dashboard.Kpi}. @@ -23,14 +23,13 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class DateFilterReference implements FilterReference { - private static final long serialVersionUID = 6016252592161989340L; - static final String NAME = "dateFilterReference"; - + private static final long serialVersionUID = 6016252592161989340L; private final String datasetUri; /** * Constructor. + * * @param datasetUri date dataset URI */ @JsonCreator diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/FilterReference.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/FilterReference.java index 540015365..c2693917f 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/FilterReference.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/dashboard/filter/FilterReference.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProject.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProject.java index 46cd82cc9..0128479e2 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProject.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProject.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -12,12 +12,6 @@ import com.gooddata.sdk.common.util.BooleanStringSerializer; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; -import java.util.Collection; -import java.util.HashSet; - -import static com.gooddata.sdk.common.util.Validate.notEmpty; -import static java.util.Arrays.asList; - /** * Complete project export configuration structure. * Serialization only. @@ -46,11 +40,11 @@ public ExportProject() { /** * Creates new ExportProject. * - * @param exportUsers whether to add necessary data to be able to clone attribute properties - * @param exportData whether to add necessary data to be able to clone attribute properties - * @param excludeSchedules whether to add necessary data to be able to clone attribute properties + * @param exportUsers whether to add necessary data to be able to clone attribute properties + * @param exportData whether to add necessary data to be able to clone attribute properties + * @param excludeSchedules whether to add necessary data to be able to clone attribute properties * @param crossDataCenterExport whether export should be usable in any Data Center - * @param authorizedUsers comma-separated list of email addresses of users authorized to import the project, surround email addresses with double quotes + * @param authorizedUsers comma-separated list of email addresses of users authorized to import the project, surround email addresses with double quotes */ public ExportProject(final boolean exportUsers, final boolean exportData, final boolean excludeSchedules, final boolean crossDataCenterExport, final String authorizedUsers) { this.exportUsers = exportUsers; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProjectArtifact.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProjectArtifact.java index fe573f656..2f756a50f 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProjectArtifact.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProjectArtifact.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProjectToken.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProjectToken.java index dfa4b6c32..3710b44d5 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProjectToken.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/ExportProjectToken.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdArtifact.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdArtifact.java index d66deac45..51338b6c2 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdArtifact.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdArtifact.java @@ -1,13 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.maintenance; -import com.fasterxml.jackson.annotation.*; -import com.gooddata.sdk.model.gdc.UriResponse; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.gdc.UriResponse; /** * Partial metadata export result structure. diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdExport.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdExport.java index 525e0f794..4a65887f4 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdExport.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdExport.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -55,8 +55,8 @@ public PartialMdExport(Collection mdObjectsUris) { * Creates new PartialMdExport. At least one uri should be given. * * @param exportAttributeProperties whether to add necessary data to be able to clone attribute properties - * @param crossDataCenterExport whether export should be usable in any Data Center - * @param mdObjectsUris list of uris to metadata objects which should be exported + * @param crossDataCenterExport whether export should be usable in any Data Center + * @param mdObjectsUris list of uris to metadata objects which should be exported */ public PartialMdExport(boolean exportAttributeProperties, boolean crossDataCenterExport, String... mdObjectsUris) { this(exportAttributeProperties, crossDataCenterExport, new HashSet<>(asList(mdObjectsUris))); @@ -66,8 +66,8 @@ public PartialMdExport(boolean exportAttributeProperties, boolean crossDataCente * Creates new PartialMdExport. At least one uri should be given. * * @param exportAttributeProperties whether to add necessary data to be able to clone attribute properties - * @param crossDataCenterExport whether export should be usable in any Data Center - * @param mdObjectsUris list of uris to metadata objects which should be exported + * @param crossDataCenterExport whether export should be usable in any Data Center + * @param mdObjectsUris list of uris to metadata objects which should be exported */ public PartialMdExport(boolean exportAttributeProperties, boolean crossDataCenterExport, Collection mdObjectsUris) { notEmpty(mdObjectsUris, "uris"); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportToken.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportToken.java index fae6dd429..9f267a6c9 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportToken.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportToken.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -51,7 +51,7 @@ public PartialMdExportToken(String token) { *

      • updateLDMObjects - default false
      • *
      * - * @param token token identifying metadata partially exported from another project + * @param token token identifying metadata partially exported from another project * @param importAttributeProperties see {@link #setImportAttributeProperties(boolean)} */ public PartialMdExportToken(String token, boolean importAttributeProperties) { @@ -69,14 +69,6 @@ public boolean isOverwriteNewer() { return overwriteNewer; } - public boolean isUpdateLDMObjects() { - return updateLDMObjects; - } - - public boolean isImportAttributeProperties() { - return importAttributeProperties; - } - /** * Sets the flag {@code overwriteNewer}. * If {@code true}, UDM/ADM objects are overwritten without checking modification time. @@ -87,6 +79,10 @@ public void setOverwriteNewer(boolean overwriteNewer) { this.overwriteNewer = overwriteNewer; } + public boolean isUpdateLDMObjects() { + return updateLDMObjects; + } + /** * Sets the flag {@code updateLDMObjects}. * If {@code true}, related LDM objects name, description and tags are overwritten @@ -97,6 +93,10 @@ public void setUpdateLDMObjects(boolean updateLDMObjects) { this.updateLDMObjects = updateLDMObjects; } + public boolean isImportAttributeProperties() { + return importAttributeProperties; + } + /** * Sets the flag {@code importAttributeProperties}. * If {@code true}, following attribute properties are cloned: diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/AttributeInGrid.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/AttributeInGrid.java index 06ebdcc99..47a418433 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/AttributeInGrid.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/AttributeInGrid.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -12,9 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.md.Attribute; import com.gooddata.sdk.model.md.DisplayForm; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.io.Serializable; import java.util.ArrayList; @@ -47,7 +47,8 @@ public class AttributeInGrid implements GridElement, Serializable { /** * Creates new instance. - * @param uri uri of displayForm of attribute to be in grid + * + * @param uri uri of displayForm of attribute to be in grid * @param alias alias used to label the attribute */ public AttributeInGrid(String uri, String alias) { @@ -56,8 +57,9 @@ public AttributeInGrid(String uri, String alias) { /** * Creates new instance. - * @param uri uri of displayForm of attribute to be in grid - * @param alias alias used to label the attribute + * + * @param uri uri of displayForm of attribute to be in grid + * @param alias alias used to label the attribute * @param totals totals for metrics used in grid - for each {@link MetricElement} in grid, there can be list * of totals. The totals are evaluated in given order. */ @@ -73,6 +75,7 @@ public AttributeInGrid(String uri, String alias, List> totals) { /** * Creates new AttributeInGrid using given DisplayForm's uri and it's title as alias. + * * @param displayForm displayForm to create AttributeInGrid from */ public AttributeInGrid(final DisplayForm displayForm) { @@ -81,8 +84,9 @@ public AttributeInGrid(final DisplayForm displayForm) { /** * Creates new AttributeInGrid using given DisplayForm's uri and given alias. + * * @param displayForm displayForm to create AttributeInGrid from - * @param alias alias used to label the attribute + * @param alias alias used to label the attribute */ public AttributeInGrid(final DisplayForm displayForm, final String alias) { this(notNull(notNull(displayForm, "displayForm").getUri(), "uri"), alias); @@ -90,6 +94,7 @@ public AttributeInGrid(final DisplayForm displayForm, final String alias) { /** * Creates new AttributeInGrid using given Attribute's default DisplayForm's uri and Attribute's title as alias. + * * @param attribute attribute to create AttributeInGrid from */ public AttributeInGrid(final Attribute attribute) { @@ -98,8 +103,9 @@ public AttributeInGrid(final Attribute attribute) { /** * Creates new AttributeInGrid using given Attribute's default DisplayForm's uri and given alias. + * * @param attribute attribute to create AttributeInGrid from - * @param alias alias used to label the attribute + * @param alias alias used to label the attribute */ public AttributeInGrid(final Attribute attribute, final String alias) { this(notNull(attribute, "attribute").getDefaultDisplayForm(), alias); @@ -107,7 +113,7 @@ public AttributeInGrid(final Attribute attribute, final String alias) { @JsonProperty("totals") public List> getStringTotals() { - return totals; + return totals; } @JsonIgnore diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Filter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Filter.java index 7d8ef572f..d66f42d46 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Filter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Filter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Grid.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Grid.java index da2ca0786..b1da3b11a 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Grid.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Grid.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -36,19 +36,19 @@ public class Grid implements Serializable { /** * Creates new instance. - * @param columns report's definition columns - * @param rows report's definition rows - * @param metrics report's definition metrics - * @param sort report's sort definition - * @param columnWidths report columns' widths definition * + * @param columns report's definition columns + * @param rows report's definition rows + * @param metrics report's definition metrics + * @param sort report's sort definition + * @param columnWidths report columns' widths definition * @since 2.0.0 */ @JsonCreator public Grid(@JsonProperty("columns") @JsonDeserialize(contentUsing = GridElementDeserializer.class) - List columns, - @JsonProperty("rows") @JsonDeserialize(contentUsing = GridElementDeserializer.class) - List rows, + List columns, + @JsonProperty("rows") @JsonDeserialize(contentUsing = GridElementDeserializer.class) + List rows, @JsonProperty("metrics") List metrics, @JsonProperty("sort") Map> sort, @JsonProperty("columnWidths") Collection> columnWidths) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElement.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElement.java index cbb547c1c..7fd1e3b2f 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElement.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElement.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElementDeserializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElementDeserializer.java index a992f4ea3..ec4856d41 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElementDeserializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElementDeserializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElementSerializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElementSerializer.java index abb52245a..58276c1ab 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElementSerializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridElementSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridReportDefinitionContent.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridReportDefinitionContent.java index ca86ebd1b..44a0998eb 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridReportDefinitionContent.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/GridReportDefinitionContent.java @@ -1,14 +1,14 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.report; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gooddata.sdk.model.md.Meta; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.gooddata.sdk.model.md.Meta; import java.util.Collection; import java.util.Collections; @@ -20,8 +20,8 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class GridReportDefinitionContent extends ReportDefinitionContent { - private static final long serialVersionUID = 1296467241365069724L; public static final String FORMAT = "grid"; + private static final long serialVersionUID = 1296467241365069724L; @JsonCreator private GridReportDefinitionContent( @@ -39,10 +39,6 @@ private GridReportDefinitionContent( this(grid, Collections.emptyList()); } - public String getFormat() { - return FORMAT; - } - public static ReportDefinition create(String title, List columns, List rows, List metrics) { return create(title, columns, rows, metrics, Collections.emptyList()); @@ -52,4 +48,8 @@ public static ReportDefinition create(String title, List List metrics, Collection filters) { return new ReportDefinition(new Meta(title), new GridReportDefinitionContent(new Grid(columns, rows, metrics), filters)); } + + public String getFormat() { + return FORMAT; + } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/MetricElement.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/MetricElement.java index 0c51fc205..b2889f52f 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/MetricElement.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/MetricElement.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,8 +9,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.gooddata.sdk.model.md.Metric; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.Metric; import java.io.Serializable; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/MetricGroup.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/MetricGroup.java index ea3765235..398f06b50 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/MetricGroup.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/MetricGroup.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -15,19 +15,13 @@ public final class MetricGroup implements GridElement, Serializable { private static final long serialVersionUID = -2971228185501817988L; private static final String JSON_VALUE = "metricGroup"; - - private final String value; - public static final MetricGroup METRIC_GROUP = new MetricGroup(JSON_VALUE); + private final String value; private MetricGroup(String value) { this.value = value; } - public String getValue() { - return value; - } - /** * @param string string to compare whether is metricGroup * @return true when the {@link #METRIC_GROUP}'s string value equals to the argument, false otherwise @@ -36,6 +30,10 @@ public static boolean equals(String string) { return METRIC_GROUP.getValue().equals(string); } + public String getValue() { + return value; + } + @Override public boolean equals(Object o) { return this == o; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/OneNumberReportDefinitionContent.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/OneNumberReportDefinitionContent.java index 55cd91e26..543535218 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/OneNumberReportDefinitionContent.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/OneNumberReportDefinitionContent.java @@ -1,14 +1,14 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.report; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gooddata.sdk.model.md.Meta; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.gooddata.sdk.model.md.Meta; import java.io.Serializable; import java.util.Collection; @@ -21,9 +21,8 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class OneNumberReportDefinitionContent extends ReportDefinitionContent { - private static final long serialVersionUID = 5479509323034916986L; public static final String FORMAT = "oneNumber"; - + private static final long serialVersionUID = 5479509323034916986L; private final OneNumberVisualization oneNumber; @JsonCreator @@ -40,6 +39,17 @@ private OneNumberReportDefinitionContent(@JsonProperty("format") String format, oneNumber = new OneNumberVisualization(new OneNumberLabels(description)); } + public static ReportDefinition create(String title, List columns, List rows, + List metrics) { + return create(title, columns, rows, metrics, Collections.emptyList()); + } + + public static ReportDefinition create(String title, List columns, List rows, + List metrics, Collection filters) { + return new ReportDefinition(new Meta(title), new OneNumberReportDefinitionContent( + new Grid(columns, rows, metrics), title, filters)); + } + public String getFormat() { return FORMAT; } @@ -79,15 +89,4 @@ public String getDescription() { return description; } } - - public static ReportDefinition create(String title, List columns, List rows, - List metrics) { - return create(title, columns, rows, metrics, Collections.emptyList()); - } - - public static ReportDefinition create(String title, List columns, List rows, - List metrics, Collection filters) { - return new ReportDefinition(new Meta(title), new OneNumberReportDefinitionContent( - new Grid(columns, rows, metrics), title, filters)); - } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Report.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Report.java index 99fea65e5..a1b4ff81c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Report.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Report.java @@ -1,21 +1,21 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.report; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gooddata.sdk.model.md.AbstractObj; -import com.gooddata.sdk.model.md.Meta; -import com.gooddata.sdk.model.md.Queryable; -import com.gooddata.sdk.model.md.Updatable; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.AbstractObj; +import com.gooddata.sdk.model.md.Meta; +import com.gooddata.sdk.model.md.Queryable; +import com.gooddata.sdk.model.md.Updatable; import java.io.Serializable; import java.util.Arrays; @@ -44,7 +44,8 @@ private Report(@JsonProperty("meta") Meta meta, @JsonProperty("content") Content /** * Creates new report with given title and definitions - * @param title report title + * + * @param title report title * @param definitions report definitions */ public Report(String title, ReportDefinition... definitions) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/ReportDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/ReportDefinition.java index 3e2f6c525..9ab2ed74c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/ReportDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/ReportDefinition.java @@ -1,26 +1,26 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.report; -import static com.gooddata.sdk.common.util.Validate.notNullState; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gooddata.sdk.model.md.AbstractObj; -import com.gooddata.sdk.model.md.Meta; -import com.gooddata.sdk.model.md.Queryable; -import com.gooddata.sdk.model.md.Updatable; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.AbstractObj; +import com.gooddata.sdk.model.md.Meta; +import com.gooddata.sdk.model.md.Queryable; +import com.gooddata.sdk.model.md.Updatable; import java.util.Map; +import static com.gooddata.sdk.common.util.Validate.notNullState; + /** * Report definition */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/ReportDefinitionContent.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/ReportDefinitionContent.java index 94df1d9f0..4a993006f 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/ReportDefinitionContent.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/ReportDefinitionContent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Total.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Total.java index 6c058d057..04ee28a92 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Total.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/report/Total.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -27,12 +27,6 @@ public enum Total { NAT, MED; - @JsonValue - @Override - public String toString() { - return name().toLowerCase(); - } - @JsonCreator public static Total of(String total) { notNull(total, "total"); @@ -54,4 +48,10 @@ total, stream(Total.values()).map(Enum::name).collect(joining(","))), public static List orderedValues() { return Arrays.asList(SUM, MAX, MIN, AVG, MED, NAT); } + + @JsonValue + @Override + public String toString() { + return name().toLowerCase(); + } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/Bucket.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/Bucket.java index 5e3dc5c13..0757f9fdd 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/Bucket.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/Bucket.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,6 +11,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.gooddata.sdk.model.executeafm.afm.LocallyIdentifiable; +import com.gooddata.sdk.model.executeafm.resultspec.TotalItem; import java.io.Serializable; import java.util.List; @@ -26,17 +27,33 @@ public class Bucket implements Serializable, LocallyIdentifiable { private static final long serialVersionUID = -7718720886547680021L; private final String localIdentifier; private final List items; + private final List totals; + + /** + * Creates new instance of bucket without totals + * + * @param localIdentifier local identifier of bucket + * @param items list of {@link BucketItem}s for this bucket + */ + public Bucket(@JsonProperty("localIdentifier") final String localIdentifier, + @JsonProperty("items") final List items) { + this(localIdentifier, items, null); + } /** * Creates new instance of bucket + * * @param localIdentifier local identifier of bucket - * @param items list of {@link BucketItem}s for this bucket + * @param items list of {@link BucketItem}s for this bucket + * @param totals list of {@link TotalItem}s for this bucket */ @JsonCreator public Bucket(@JsonProperty("localIdentifier") final String localIdentifier, - @JsonProperty("items") final List items) { + @JsonProperty("items") final List items, + @JsonProperty("totals") List totals) { this.localIdentifier = localIdentifier; this.items = items; + this.totals = totals; } /** @@ -53,6 +70,13 @@ public List getItems() { return items; } + /** + * @return list of defined {@link TotalItem}s + */ + public List getTotals() { + return totals; + } + @JsonIgnore VisualizationAttribute getOnlyAttribute() { if (getItems() != null && getItems().size() == 1) { @@ -67,15 +91,18 @@ VisualizationAttribute getOnlyAttribute() { @Override public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; Bucket bucket = (Bucket) o; - return Objects.equals(localIdentifier, bucket.localIdentifier) && - Objects.equals(items, bucket.items); + return Objects.equals(localIdentifier, bucket.localIdentifier) + && Objects.equals(items, bucket.items) + && Objects.equals(totals, bucket.totals); } @Override public int hashCode() { - return Objects.hash(localIdentifier, items); + return Objects.hash(localIdentifier, items, totals); } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/BucketItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/BucketItem.java index 479d92953..c61170c3c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/BucketItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/BucketItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -20,5 +20,6 @@ }) @JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) -public interface BucketItem {} +public interface BucketItem { +} diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/CollectionType.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/CollectionType.java index 3f08ad751..fc6d05502 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/CollectionType.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/CollectionType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/Measure.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/Measure.java index b165dbac2..0c396cd75 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/Measure.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/Measure.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -20,14 +20,14 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class Measure extends MeasureItem implements BucketItem { - private static final long serialVersionUID = -6311373783004640731L; static final String NAME = "measure"; - + private static final long serialVersionUID = -6311373783004640731L; private String title; /** * Creates new instance of measure for use in {@link VisualizationObject} - * @param definition measure definition + * + * @param definition measure definition * @param localIdentifier local identifier */ public Measure(final MeasureDefinition definition, final String localIdentifier) { @@ -36,11 +36,12 @@ public Measure(final MeasureDefinition definition, final String localIdentifier) /** * Creates new instance of measure for use in {@link VisualizationObject} - * @param definition measure definition + * + * @param definition measure definition * @param localIdentifier local identifier - * @param alias alias for measure title - * @param title default name given to measure - * @param format format of measure to be computed + * @param alias alias for measure title + * @param title default name given to measure + * @param format format of measure to be computed */ @JsonCreator public Measure(@JsonProperty("definition") final MeasureDefinition definition, diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VOPopMeasureDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VOPopMeasureDefinition.java index a9dc7f894..63a53e4cd 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VOPopMeasureDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VOPopMeasureDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -25,8 +25,8 @@ @JsonRootName(NAME) public class VOPopMeasureDefinition extends PopMeasureDefinition { - private static final long serialVersionUID = -2727004914980057124L; public static final String NAME = "popMeasureDefinition"; + private static final long serialVersionUID = -2727004914980057124L; /** * Creates instance of Period over Period measure definition to be used in {@link VisualizationObject} diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VOSimpleMeasureDefinition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VOSimpleMeasureDefinition.java index 18ef3aa4f..3b117b507 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VOSimpleMeasureDefinition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VOSimpleMeasureDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,9 +11,9 @@ import com.fasterxml.jackson.annotation.JsonRootName; import com.gooddata.sdk.model.executeafm.ObjQualifier; import com.gooddata.sdk.model.executeafm.afm.Aggregation; -import com.gooddata.sdk.model.executeafm.afm.filter.FilterItem; import com.gooddata.sdk.model.executeafm.afm.MeasureDefinition; import com.gooddata.sdk.model.executeafm.afm.SimpleMeasureDefinition; +import com.gooddata.sdk.model.executeafm.afm.filter.FilterItem; import java.util.List; @@ -30,8 +30,8 @@ @JsonRootName(NAME) public class VOSimpleMeasureDefinition extends SimpleMeasureDefinition { - private static final long serialVersionUID = 8467311354259963694L; public static final String NAME = "measureDefinition"; + private static final long serialVersionUID = 8467311354259963694L; /** * Creates instance of simple measure definition to be used in {@link VisualizationObject} diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationAttribute.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationAttribute.java index afd88aade..d0b74a437 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationAttribute.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationAttribute.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -19,13 +19,13 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class VisualizationAttribute extends AttributeItem implements BucketItem { - private static final long serialVersionUID = -5144496152695494774L; static final String NAME = "visualizationAttribute"; + private static final long serialVersionUID = -5144496152695494774L; /** * Creates new instance of visualization attribute for use in {@link Bucket} * - * @param displayForm display form of attribute + * @param displayForm display form of attribute * @param localIdentifier local identifier of attribute */ public VisualizationAttribute(final UriObjQualifier displayForm, final String localIdentifier) { @@ -35,9 +35,9 @@ public VisualizationAttribute(final UriObjQualifier displayForm, final String lo /** * Creates new instance of visualization attribute for use in {@link Bucket} * - * @param displayForm display form of attribute + * @param displayForm display form of attribute * @param localIdentifier local identifier of attribute - * @param alias alias of attribute + * @param alias alias of attribute */ @JsonCreator public VisualizationAttribute(@JsonProperty("displayForm") final UriObjQualifier displayForm, diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationClass.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationClass.java index 40f939833..497c37195 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationClass.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationClass.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -32,12 +32,11 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class VisualizationClass extends AbstractObj implements Queryable, Updatable { - private static final long serialVersionUID = -72785788784079208L; static final String NAME = "visualizationClass"; - + private static final long serialVersionUID = -72785788784079208L; private Content content; - private VisualizationClass(@JsonProperty("content") final Content content, @JsonProperty("meta") final Meta meta ) { + private VisualizationClass(@JsonProperty("content") final Content content, @JsonProperty("meta") final Meta meta) { super(meta); this.content = notNull(content); } @@ -92,7 +91,7 @@ public VisualizationType getVisualizationType() { String uriParts[] = getContent().getUrl().split(":"); if (uriParts.length > 0 && isLocal()) { - String derivedType = uriParts[uriParts.length-1]; + String derivedType = uriParts[uriParts.length - 1]; visualizationType = VisualizationType.of(derivedType); } @@ -105,7 +104,7 @@ private boolean isLocal() { return getContent().getChecksum().equals("local"); } - private Content getContent() { + private Content getContent() { return content; } @@ -118,10 +117,10 @@ private static class Content implements Serializable { @JsonCreator private Content(@JsonProperty("url") String url, - @JsonProperty("icon") String icon, - @JsonProperty("iconSelected") String iconSelected, - @JsonProperty("checksum") String checksum, - @JsonProperty("orderIndex") Float orderIndex) { + @JsonProperty("icon") String icon, + @JsonProperty("iconSelected") String iconSelected, + @JsonProperty("checksum") String checksum, + @JsonProperty("orderIndex") Float orderIndex) { this.url = notNull(url); this.icon = notNull(icon); this.iconSelected = notNull(iconSelected); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationConverter.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationConverter.java index 97babe385..b02e5b7aa 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationConverter.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationConverter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,28 +11,32 @@ import com.gooddata.sdk.model.executeafm.Execution; import com.gooddata.sdk.model.executeafm.afm.Afm; import com.gooddata.sdk.model.executeafm.afm.AttributeItem; +import com.gooddata.sdk.model.executeafm.afm.MeasureItem; +import com.gooddata.sdk.model.executeafm.afm.NativeTotalItem; +import com.gooddata.sdk.model.executeafm.afm.SimpleMeasureDefinition; import com.gooddata.sdk.model.executeafm.afm.filter.CompatibilityFilter; import com.gooddata.sdk.model.executeafm.afm.filter.DateFilter; import com.gooddata.sdk.model.executeafm.afm.filter.ExtendedFilter; import com.gooddata.sdk.model.executeafm.afm.filter.FilterItem; -import com.gooddata.sdk.model.executeafm.afm.MeasureItem; import com.gooddata.sdk.model.executeafm.afm.filter.MeasureValueFilter; import com.gooddata.sdk.model.executeafm.afm.filter.NegativeAttributeFilter; import com.gooddata.sdk.model.executeafm.afm.filter.PositiveAttributeFilter; -import com.gooddata.sdk.model.executeafm.afm.SimpleMeasureDefinition; import com.gooddata.sdk.model.executeafm.afm.filter.RankingFilter; import com.gooddata.sdk.model.executeafm.resultspec.Dimension; import com.gooddata.sdk.model.executeafm.resultspec.ResultSpec; import com.gooddata.sdk.model.executeafm.resultspec.SortItem; +import com.gooddata.sdk.model.executeafm.resultspec.TotalItem; +import com.gooddata.sdk.model.md.report.Total; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.function.Function; import java.util.stream.Collectors; -import static com.gooddata.sdk.model.executeafm.resultspec.Dimension.MEASURE_GROUP; import static com.gooddata.sdk.common.util.Validate.isTrue; import static com.gooddata.sdk.common.util.Validate.notNull; +import static com.gooddata.sdk.model.executeafm.resultspec.Dimension.MEASURE_GROUP; import static java.util.stream.Collectors.toList; /** @@ -43,14 +47,17 @@ public abstract class VisualizationConverter { /** * Generate Execution from Visualization object. + *

      + * NOTE: totals are not included in this conversion * - * @param visualizationObject which will be converted to {@link Execution} - * @param visualizationClassGetter {@link Function} for fetching VisualizationClass, which is necessary for correct generation of {@link ResultSpec} + * @param visualizationObject which will be converted to {@link Execution} + * @param visualizationClassGetter {@link Function} for fetching VisualizationClass, + * which is necessary for correct generation of {@link ResultSpec} * @return {@link Execution} object * @see #convertToExecution(VisualizationObject, VisualizationClass) */ public static Execution convertToExecution(final VisualizationObject visualizationObject, - final Function visualizationClassGetter) { + final Function visualizationClassGetter) { notNull(visualizationObject, "visualizationObject"); notNull(visualizationClassGetter, "visualizationClassGetter"); return convertToExecution(visualizationObject, @@ -59,15 +66,17 @@ public static Execution convertToExecution(final VisualizationObject visualizati /** * Generate Execution from Visualization object. + *

      + * NOTE: totals are not included in this conversion * * @param visualizationObject which will be converted to {@link Execution} - * @param visualizationClass visualizationClass, which is necessary for correct generation of {@link ResultSpec} + * @param visualizationClass visualizationClass, which is necessary for correct generation of {@link ResultSpec} * @return {@link Execution} object * @see #convertToAfm(VisualizationObject) * @see #convertToResultSpec(VisualizationObject, VisualizationClass) */ public static Execution convertToExecution(final VisualizationObject visualizationObject, - final VisualizationClass visualizationClass) { + final VisualizationClass visualizationClass) { notNull(visualizationObject, "visualizationObject"); notNull(visualizationClass, "visualizationClass"); ResultSpec resultSpec = convertToResultSpec(visualizationObject, visualizationClass); @@ -75,31 +84,84 @@ public static Execution convertToExecution(final VisualizationObject visualizati return new Execution(afm, resultSpec); } + /** + * Generate Execution from Visualization object with totals included. + * + * @param visualizationObject which will be converted to {@link Execution} + * @param visualizationClassGetter {@link Function} for fetching VisualizationClass, + * which is necessary for correct generation of {@link ResultSpec} + * @return {@link Execution} object + * @see #convertToExecutionWithTotals(VisualizationObject, VisualizationClass) + */ + public static Execution convertToExecutionWithTotals(final VisualizationObject visualizationObject, + final Function visualizationClassGetter) { + notNull(visualizationObject, "visualizationObject"); + notNull(visualizationClassGetter, "visualizationClassGetter"); + return convertToExecutionWithTotals(visualizationObject, + visualizationClassGetter.apply(visualizationObject.getVisualizationClassUri())); + } + + /** + * Generate Execution from Visualization object with totals included. + * + * @param visualizationObject which will be converted to {@link Execution} + * @param visualizationClass visualizationClass, which is necessary for correct generation of {@link ResultSpec} + * @return {@link Execution} object + * @see #convertToAfmWithNativeTotals(VisualizationObject) + * @see #convertToResultSpecWithTotals(VisualizationObject, VisualizationClass) + */ + public static Execution convertToExecutionWithTotals(final VisualizationObject visualizationObject, + final VisualizationClass visualizationClass) { + notNull(visualizationObject, "visualizationObject"); + notNull(visualizationClass, "visualizationClass"); + ResultSpec resultSpec = convertToResultSpecWithTotals(visualizationObject, visualizationClass); + Afm afm = convertToAfmWithNativeTotals(visualizationObject); + return new Execution(afm, resultSpec); + } + /** * Generate Afm from Visualization object. + *

      + * NOTE: native totals are not included in this conversion * * @param visualizationObject which will be converted to {@link Execution} * @return {@link Afm} object */ public static Afm convertToAfm(final VisualizationObject visualizationObject) { + notNull(visualizationObject, "visualizationObject"); + final VisualizationObject visualizationObjectWithoutTotals = removeTotals(visualizationObject); + return convertToAfmWithNativeTotals(visualizationObjectWithoutTotals); + } + + /** + * Generate Afm from Visualization object with native totals included. + * + * @param visualizationObject which will be converted to {@link Execution} + * @return {@link Afm} object + */ + public static Afm convertToAfmWithNativeTotals(final VisualizationObject visualizationObject) { notNull(visualizationObject, "visualizationObject"); final List attributes = convertAttributes(visualizationObject.getAttributes()); final List filters = convertFilters(visualizationObject.getFilters()); final List measures = convertMeasures(visualizationObject.getMeasures()); + final List totals = convertNativeTotals(visualizationObject); - return new Afm(attributes, filters, measures, null); + return new Afm(attributes, filters, measures, totals); } /** * Generate ResultSpec from Visualization object. Currently {@link ResultSpec}'s {@link Dimension}s can be generated * for table and four types of chart: bar, column, line and pie. + *

      + * NOTE: totals are not included in this conversion * - * @param visualizationObject which will be converted to {@link Execution} - * @param visualizationClassGetter {@link Function} for fetching VisualizationClass, which is necessary for correct generation of {@link ResultSpec} + * @param visualizationObject which will be converted to {@link Execution} + * @param visualizationClassGetter {@link Function} for fetching VisualizationClass, + * which is necessary for correct generation of {@link ResultSpec} * @return {@link Execution} object */ public static ResultSpec convertToResultSpec(final VisualizationObject visualizationObject, - final Function visualizationClassGetter) { + final Function visualizationClassGetter) { notNull(visualizationObject, "visualizationObject"); notNull(visualizationClassGetter, "visualizationClassGetter"); return convertToResultSpec(visualizationObject, @@ -109,13 +171,48 @@ public static ResultSpec convertToResultSpec(final VisualizationObject visualiza /** * Generate ResultSpec from Visualization object. Currently {@link ResultSpec}'s {@link Dimension}s can be generated * for table and four types of chart: bar, column, line and pie. + *

      + * NOTE: totals are not included in this conversion * * @param visualizationObject which will be converted to {@link Execution} - * @param visualizationClass VisualizationClass, which is necessary for correct generation of {@link ResultSpec} + * @param visualizationClass VisualizationClass, which is necessary for correct generation of {@link ResultSpec} * @return {@link Execution} object */ public static ResultSpec convertToResultSpec(final VisualizationObject visualizationObject, - final VisualizationClass visualizationClass) { + final VisualizationClass visualizationClass) { + notNull(visualizationObject, "visualizationObject"); + notNull(visualizationClass, "visualizationClass"); + final VisualizationObject visualizationObjectWithoutTotals = removeTotals(visualizationObject); + return convertToResultSpecWithTotals(visualizationObjectWithoutTotals, visualizationClass); + } + + /** + * Generate ResultSpec from Visualization object with totals included. Currently {@link ResultSpec}'s {@link Dimension}s + * can be generated for table and four types of chart: bar, column, line and pie. + * + * @param visualizationObject which will be converted to {@link Execution} + * @param visualizationClassGetter {@link Function} for fetching VisualizationClass, + * which is necessary for correct generation of {@link ResultSpec} + * @return {@link Execution} object + */ + public static ResultSpec convertToResultSpecWithTotals(final VisualizationObject visualizationObject, + final Function visualizationClassGetter) { + notNull(visualizationObject, "visualizationObject"); + notNull(visualizationClassGetter, "visualizationClassGetter"); + return convertToResultSpecWithTotals(visualizationObject, + visualizationClassGetter.apply(visualizationObject.getVisualizationClassUri())); + } + + /** + * Generate ResultSpec from Visualization object with totals included. Currently {@link ResultSpec}'s {@link Dimension}s + * can be generated for table and four types of chart: bar, column, line and pie. + * + * @param visualizationObject which will be converted to {@link Execution} + * @param visualizationClass VisualizationClass, which is necessary for correct generation of {@link ResultSpec} + * @return {@link Execution} object + */ + public static ResultSpec convertToResultSpecWithTotals(final VisualizationObject visualizationObject, + final VisualizationClass visualizationClass) { notNull(visualizationObject, "visualizationObject"); notNull(visualizationClass, "visualizationClass"); isTrue(visualizationObject.getVisualizationClassUri().equals(visualizationClass.getUri()), @@ -128,11 +225,12 @@ public static ResultSpec convertToResultSpec(final VisualizationObject visualiza static List getSorting(final VisualizationObject visualizationObject) { try { - List sorts = parseSorting(visualizationObject.getProperties()); - if (sorts != null) { - return sorts; - } - } catch (Exception ignored) {} + List sorts = parseSorting(visualizationObject.getProperties()); + if (sorts != null) { + return sorts; + } + } catch (Exception ignored) { + } return null; } @@ -140,10 +238,26 @@ static List getSorting(final VisualizationObject visualizationObject) static List parseSorting(final String properties) throws Exception { JsonNode jsonProperties = parseProperties(properties); JsonNode nodeSortItems = jsonProperties.get("sortItems"); - TypeReference> mapType = new TypeReference>() {}; + TypeReference> mapType = new TypeReference>() { + }; return MAPPER.convertValue(nodeSortItems, mapType); } + /** + * Creates a new {@link VisualizationObject} derived from the original one, with all "totals" removed from its buckets. + * This is to ensure backward compatibility in cases where totals were not previously handled. + * + * @param visualizationObject original {@link VisualizationObject} + * @return a new VisualizationObject derived from the original but without any totals in the buckets. + */ + private static VisualizationObject removeTotals(final VisualizationObject visualizationObject) { + final List bucketsWithoutTotals = visualizationObject.getBuckets().stream() + // create buckets without totals + .map(bucket -> new Bucket(bucket.getLocalIdentifier(), bucket.getItems())) + .collect(toList()); + return visualizationObject.withBuckets(bucketsWithoutTotals); + } + private static List getDimensions(final VisualizationObject visualizationObject, final VisualizationType visualizationType) { switch (visualizationType) { @@ -216,12 +330,16 @@ private static List getDimensionsForTable(final VisualizationObject v List dimensions = new ArrayList<>(); List attributes = visualizationObject.getAttributes(); + List totals = visualizationObject.getTotals(); if (!attributes.isEmpty()) { - dimensions.add(new Dimension(attributes.stream() + final Dimension attributeDimension = new Dimension(attributes.stream() .map(VisualizationAttribute::getLocalIdentifier) - .collect(toList()) - )); + .collect(toList())); + if (!totals.isEmpty()) { + attributeDimension.setTotals(new HashSet<>(totals)); + } + dimensions.add(attributeDimension); } else { dimensions.add(new Dimension(new ArrayList<>())); } @@ -271,7 +389,7 @@ private static Measure removeFormat(final Measure measure) { private static MeasureItem getAfmMeasure(final Measure measure) { String alias = measure.getAlias(); String usedTitle = alias; - if(alias == null || alias.isEmpty()) { + if (alias == null || alias.isEmpty()) { if (measure.getTitle() != null) { usedTitle = measure.getTitle(); } @@ -298,8 +416,8 @@ private static MeasureItem convertMeasureFilters(final MeasureItem measure) { private static List getCompatibilityFilters(final List filters) { return filters.stream() - .map(CompatibilityFilter.class::cast) - .collect(toList()); + .map(CompatibilityFilter.class::cast) + .collect(toList()); } private static List removeIrrelevantFilters(final List filters) { @@ -316,4 +434,43 @@ private static List removeIrrelevantFilters(final List filters) { }) .collect(Collectors.toList()); } + + private static List convertNativeTotals(final VisualizationObject visualizationObject) { + final List attributeBuckets = getAttributeBuckets(visualizationObject); + final List attributeIds = getIdsFromAttributeBuckets(attributeBuckets); + return attributeBuckets.stream() + .filter(bucket -> bucket.getTotals() != null) + .flatMap(bucket -> bucket.getTotals().stream()) + .filter(totalItem -> isNativeTotal(totalItem) && attributeIds.contains(totalItem.getAttributeIdentifier())) + .map(totalItem -> convertToNativeTotalItem(totalItem, attributeIds)) + .collect(toList()); + } + + private static NativeTotalItem convertToNativeTotalItem(TotalItem totalItem, List attributeIds) { + final int attributeIdx = attributeIds.indexOf(totalItem.getAttributeIdentifier()); + return new NativeTotalItem( + totalItem.getMeasureIdentifier(), + new ArrayList<>(attributeIds.subList(0, attributeIdx)) + ); + } + + private static List getAttributeBuckets(final VisualizationObject visualizationObject) { + return visualizationObject.getBuckets().stream() + .filter(bucket -> bucket.getItems().stream().allMatch(AttributeItem.class::isInstance)) + .collect(toList()); + } + + private static List getIdsFromAttributeBuckets(final List attributeBuckets) { + return attributeBuckets.stream() + .flatMap(bucket -> + bucket.getItems().stream() + .map(AttributeItem.class::cast) + .map(AttributeItem::getLocalIdentifier) + ) + .collect(toList()); + } + + private static boolean isNativeTotal(TotalItem totalItem) { + return totalItem.getType() != null && Total.NAT.name().equals(totalItem.getType().toUpperCase()); + } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationObject.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationObject.java index 0111c44bb..dea99a829 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationObject.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationObject.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -12,30 +12,32 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -import static com.fasterxml.jackson.annotation.JsonTypeInfo.As.WRAPPER_OBJECT; -import static com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME; -import static java.util.Collections.emptyList; -import static java.util.stream.Collectors.toList; -import static org.apache.commons.lang3.Validate.notEmpty; -import static org.apache.commons.lang3.Validate.notNull; - +import com.gooddata.sdk.model.executeafm.Execution; import com.gooddata.sdk.model.executeafm.UriObjQualifier; import com.gooddata.sdk.model.executeafm.afm.Afm; -import com.gooddata.sdk.model.executeafm.Execution; import com.gooddata.sdk.model.executeafm.afm.filter.ExtendedFilter; import com.gooddata.sdk.model.executeafm.resultspec.ResultSpec; +import com.gooddata.sdk.model.executeafm.resultspec.TotalItem; import com.gooddata.sdk.model.md.AbstractObj; import com.gooddata.sdk.model.md.Meta; +import com.gooddata.sdk.model.md.Obj; import com.gooddata.sdk.model.md.Queryable; import com.gooddata.sdk.model.md.Updatable; -import com.gooddata.sdk.model.md.*; import java.io.Serializable; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.function.Function; +import static com.fasterxml.jackson.annotation.JsonTypeInfo.As.WRAPPER_OBJECT; +import static com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME; +import static java.util.Collections.emptyList; +import static java.util.stream.Collectors.toList; +import static org.apache.commons.lang3.Validate.notEmpty; +import static org.apache.commons.lang3.Validate.notNull; + /** * Complete information about new visualization object that can be stored as MD object (see {@link Obj}) * to md server. @@ -56,7 +58,7 @@ public class VisualizationObject extends AbstractObj implements Queryable, Updat /** * Constructor. * - * @param title title of visualization object + * @param title title of visualization object * @param visualizationClassUri uri to the {@link VisualizationClass} */ public VisualizationObject(final String title, final String visualizationClassUri) { @@ -77,8 +79,17 @@ public List getMeasures() { return content.getMeasures(); } + /** + * @return all totals from all buckets in visualization object + */ + @JsonIgnore + public List getTotals() { + return content.getTotals(); + } + /** * Get measure by local identifier or null if not found + * * @param localIdentifier of measure * @return measure or null */ @@ -120,6 +131,7 @@ public VisualizationAttribute getAttribute(final String localIdentifier) { /** * Returns attribute from collection bucket, if and only if bucket contains exactly one item of type * {@link VisualizationAttribute}, null otherwise + * * @param type of collection which we want to get, stored as local identifier in each bucket * @return attribute from collection bucket */ @@ -147,6 +159,7 @@ public boolean hasDerivedMeasure() { /** * Method to get uri to requested local identifier from reference items + * * @param id of item * @return uri of requested item */ @@ -216,6 +229,14 @@ public void setBuckets(List buckets) { content.setBuckets(buckets); } + /** + * @return a new copy of this {@link VisualizationObject} with the specified buckets + */ + @JsonIgnore + public VisualizationObject withBuckets(List buckets) { + return new VisualizationObject(content.withBuckets(buckets), meta); + } + /** * @return filters from visualization object */ @@ -337,10 +358,10 @@ private Content(final String visualizationClassUri, final List buckets) @JsonCreator private Content(@JsonProperty("visualizationClass") final UriObjQualifier visualizationClass, - @JsonProperty("buckets") final List buckets, - @JsonProperty("filters") final List filters, - @JsonProperty("properties") final String properties, - @JsonProperty("references") final Map referenceItems) { + @JsonProperty("buckets") final List buckets, + @JsonProperty("filters") final List filters, + @JsonProperty("properties") final String properties, + @JsonProperty("references") final Map referenceItems) { this.visualizationClass = notNull(visualizationClass); this.buckets = notNull(buckets); @@ -353,6 +374,10 @@ public List getBuckets() { return buckets; } + public void setBuckets(List buckets) { + this.buckets = buckets; + } + @JsonIgnore public List getAttributes() { return buckets.stream() @@ -362,26 +387,6 @@ public List getAttributes() { .collect(toList()); } - public void setVisualizationClass(UriObjQualifier visualizationClass) { - this.visualizationClass = visualizationClass; - } - - public void setBuckets(List buckets) { - this.buckets = buckets; - } - - public void setFilters(List filters) { - this.filters = filters; - } - - public void setProperties(String properties) { - this.properties = properties; - } - - public void setReferenceItems(Map referenceItems) { - this.referenceItems = referenceItems; - } - @JsonIgnore public List getMeasures() { return buckets.stream() @@ -391,6 +396,14 @@ public List getMeasures() { .collect(toList()); } + @JsonIgnore + public List getTotals() { + return buckets.stream() + .filter(bucket -> bucket.getTotals() != null) + .flatMap(bucket -> bucket.getTotals().stream()) + .collect(toList()); + } + @JsonIgnore public String getVisualizationClassUri() { return visualizationClass.getUri(); @@ -404,17 +417,47 @@ public List getFilters() { return filters; } + public void setFilters(List filters) { + this.filters = filters; + } + public String getProperties() { return properties; } + public void setProperties(String properties) { + this.properties = properties; + } + public UriObjQualifier getVisualizationClass() { return visualizationClass; } + public void setVisualizationClass(UriObjQualifier visualizationClass) { + this.visualizationClass = visualizationClass; + } + @JsonProperty("references") public Map getReferenceItems() { return referenceItems; } + + public void setReferenceItems(Map referenceItems) { + this.referenceItems = referenceItems; + } + + /** + * @return a new copy of this {@link Content} with the specified buckets + */ + @JsonIgnore + public Content withBuckets(List buckets) { + return new Content( + visualizationClass, + buckets, + filters != null ? new ArrayList<>(filters) : null, + properties, + referenceItems != null ? new HashMap<>(referenceItems) : null + ); + } } } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationType.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationType.java index ed023e541..c9d9794ee 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationType.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/md/visualization/VisualizationType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Channel.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Channel.java index 9ae764ced..73c98949d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Channel.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Channel.java @@ -1,14 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.account.Account; import com.gooddata.sdk.model.md.Meta; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Configuration.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Configuration.java index 658cc4684..e470fa1c1 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Configuration.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Configuration.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,10 +11,10 @@ /** * Interface for configurations of channel */ -@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, - include=JsonTypeInfo.As.WRAPPER_OBJECT) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.WRAPPER_OBJECT) @JsonSubTypes({ - @JsonSubTypes.Type(value=EmailConfiguration.class, name="emailConfiguration"), + @JsonSubTypes.Type(value = EmailConfiguration.class, name = "emailConfiguration"), }) public interface Configuration { } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/EmailConfiguration.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/EmailConfiguration.java index 172b17e0a..3828c2e9a 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/EmailConfiguration.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/EmailConfiguration.java @@ -1,12 +1,10 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; -import static com.gooddata.sdk.common.util.Validate.notEmpty; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,6 +12,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import static com.gooddata.sdk.common.util.Validate.notEmpty; + /** * Email configuration of channel */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/MessageTemplate.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/MessageTemplate.java index 818956642..b7141cb1b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/MessageTemplate.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/MessageTemplate.java @@ -1,12 +1,10 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; -import static com.gooddata.sdk.common.util.Validate.notEmpty; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,6 +12,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import static com.gooddata.sdk.common.util.Validate.notEmpty; + /** * Template of notification message */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/ProjectEvent.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/ProjectEvent.java index 78a397b82..2cad800a0 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/ProjectEvent.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/ProjectEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -18,7 +18,7 @@ /** * Project event. - * + *

      * Serialization only. */ @JsonTypeName("projectEvent") @@ -43,7 +43,8 @@ public ProjectEvent(final String type, final Map parameters) { /** * Set the parameter with given key and value, overwriting the preceding value of the same key (if any). - * @param key parameter key + * + * @param key parameter key * @param value parameter value */ public void setParameter(final String key, final String value) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Subscription.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Subscription.java index 076331378..456b08a4b 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Subscription.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Subscription.java @@ -1,26 +1,26 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; -import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; -import static org.apache.commons.lang3.Validate.notEmpty; -import static org.apache.commons.lang3.Validate.notNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -import com.gooddata.sdk.model.md.Meta; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.Meta; import java.util.List; import java.util.stream.Collectors; +import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; +import static org.apache.commons.lang3.Validate.notEmpty; +import static org.apache.commons.lang3.Validate.notNull; + /** * Subscription for notifications */ @@ -43,11 +43,11 @@ public class Subscription { /** * Creates Subscription * - * @param triggers triggers of subscription - * @param channels list of {@link Channel} - * @param condition condition under which this subscription activates + * @param triggers triggers of subscription + * @param channels list of {@link Channel} + * @param condition condition under which this subscription activates * @param messageTemplate of message - * @param title name of subscription + * @param title name of subscription */ public Subscription(final List triggers, final List channels, @@ -60,12 +60,12 @@ public Subscription(final List triggers, /** * Creates Subscription * - * @param triggers triggers of subscription - * @param channels list of {@link Channel} - * @param condition condition under which this subscription activates + * @param triggers triggers of subscription + * @param channels list of {@link Channel} + * @param condition condition under which this subscription activates * @param messageTemplate of message * @param subjectTemplate of message - * @param title name of subscription + * @param title name of subscription */ public Subscription(final List triggers, final List channels, diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/TimerEvent.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/TimerEvent.java index 539e8b1d6..3c42b9eee 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/TimerEvent.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/TimerEvent.java @@ -1,12 +1,10 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; -import static com.gooddata.sdk.common.util.Validate.notEmpty; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,6 +12,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import static com.gooddata.sdk.common.util.Validate.notEmpty; + /** * Time based trigger */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Trigger.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Trigger.java index eed7023ae..42da4afd4 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Trigger.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/Trigger.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/TriggerCondition.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/TriggerCondition.java index 354a69aaa..5bfe26932 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/TriggerCondition.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/notification/TriggerCondition.java @@ -1,18 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; -import static com.gooddata.sdk.common.util.Validate.notEmpty; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import static com.gooddata.sdk.common.util.Validate.notEmpty; + /** * Condition of trigger */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/CreatedInvitations.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/CreatedInvitations.java index c7609935f..aa2f7e613 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/CreatedInvitations.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/CreatedInvitations.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -38,6 +38,7 @@ private CreatedInvitations(@JsonProperty("uri") List invitationUris, /** * List of successful invitations + * * @return list of URIs (never null) */ public List getInvitationUris() { @@ -46,6 +47,7 @@ public List getInvitationUris() { /** * List of emails which can't be invited to the project because their users belongs to a different domain + * * @return list of emails (never null) */ public List getDomainMismatchEmails() { @@ -54,6 +56,7 @@ public List getDomainMismatchEmails() { /** * List of emails which can't be invited to the project because they are already members of the project + * * @return list of emails (never null) */ public List getAlreadyInProjectEmails() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Environment.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Environment.java index 2acab64fd..a30b12a5c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Environment.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Environment.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,10 +10,16 @@ * Default value is {@link #PRODUCTION} which is also environment for all currently existing projects or warehouses. */ public enum Environment { - /** Default value, projects or warehouses are backed-up and archived. */ + /** + * Default value, projects or warehouses are backed-up and archived. + */ PRODUCTION, - /** no meaning yet and behavior is the same as for {@link #PRODUCTION} projects or warehouses. */ + /** + * no meaning yet and behavior is the same as for {@link #PRODUCTION} projects or warehouses. + */ DEVELOPMENT, - /** 'TESTING' projects or warehouses are not backed-up and archived. */ + /** + * 'TESTING' projects or warehouses are not backed-up and archived. + */ TESTING } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Invitation.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Invitation.java index 7559843ac..d496ba39c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Invitation.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Invitation.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,8 +11,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -import com.gooddata.sdk.model.md.Meta; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.Meta; import static com.gooddata.sdk.common.util.Validate.notEmpty; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Invitations.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Invitations.java index 99904446a..d53621f37 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Invitations.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Invitations.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Project.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Project.java index f2d5a96ec..65e870ef0 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Project.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Project.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -13,11 +13,11 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.gooddata.sdk.model.md.Meta; -import com.gooddata.sdk.model.util.UriHelper; import com.gooddata.sdk.common.util.BooleanDeserializer; import com.gooddata.sdk.common.util.GDZonedDateTimeDeserializer; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.Meta; +import com.gooddata.sdk.model.util.UriHelper; import java.time.ZonedDateTime; import java.util.HashSet; @@ -91,6 +91,16 @@ public String getDriver() { return content.getDriver(); } + public void setDriver(String driver) { + notEmpty(driver, "driver"); + content.setDriver(driver); + } + + public void setDriver(ProjectDriver driver) { + notNull(driver, "driver"); + setDriver(driver.getValue()); + } + @JsonIgnore public String getGuidedNavigation() { return content.getGuidedNavigation(); @@ -206,7 +216,11 @@ public String getExecuteUri() { return notNullState(links, "links").getExecute(); } + /** + * @deprecated This service has been removed from platform long time ago. + */ @JsonIgnore + @Deprecated public String getEventStoresUri() { return notNullState(links, "links").getEventStores(); } @@ -231,16 +245,6 @@ public boolean isEnabled() { return "ENABLED".equals(getState()); } - public void setDriver(String driver) { - notEmpty(driver, "driver"); - content.setDriver(driver); - } - - public void setDriver(ProjectDriver driver) { - notNull(driver, "driver"); - setDriver(driver.getValue()); - } - @JsonIgnore public String getEnvironment() { return content.getEnvironment(); @@ -272,13 +276,10 @@ private static class ProjectContent { @JsonProperty("authorizationToken") private final String authorizationToken; - - @JsonProperty("driver") - private String driver; - @JsonProperty("guidedNavigation") private final String guidedNavigation; - + @JsonProperty("driver") + private String driver; @JsonIgnore private String cluster; @@ -326,6 +327,10 @@ public String getDriver() { return driver; } + public void setDriver(String driver) { + this.driver = driver; + } + public String getGuidedNavigation() { return guidedNavigation; } @@ -338,10 +343,6 @@ public String getIsPublic() { return isPublic; } - public void setDriver(String driver) { - this.driver = driver; - } - public String getEnvironment() { return environment; } @@ -469,6 +470,10 @@ public String getExecute() { return execute; } + /** + * @deprecated This service has been removed from platform long time ago. + */ + @Deprecated public String getEventStores() { return eventStores; } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectDriver.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectDriver.java index 6c2ab2279..cea08b357 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectDriver.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectDriver.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectEnvironment.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectEnvironment.java index 9124548fa..f12a4ec4c 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectEnvironment.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,10 +11,16 @@ * Preffer {@link Environment} if possible. */ public enum ProjectEnvironment { - /** Default value, projects are backed-up and archived. */ + /** + * Default value, projects are backed-up and archived. + */ PRODUCTION, - /** no meaning yet and behavior is the same as for {@link #PRODUCTION} projects*/ + /** + * no meaning yet and behavior is the same as for {@link #PRODUCTION} projects + */ DEVELOPMENT, - /** 'TESTING' projects are not backed-up and archived. */ + /** + * 'TESTING' projects are not backed-up and archived. + */ TESTING } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectTemplate.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectTemplate.java index 903fe3ca6..c1b877d09 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectTemplate.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectTemplates.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectTemplates.java index 6eadfad94..5a85c1932 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectTemplates.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectTemplates.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectUsersUpdateResult.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectUsersUpdateResult.java index b3c534326..a3ff57711 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectUsersUpdateResult.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectUsersUpdateResult.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResult.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResult.java index d7b9756ce..a7bb18a28 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResult.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResult.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -19,14 +19,12 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class ProjectValidationResult { + private static final String LEVEL_WARNING = "WARN"; + private static final String LEVEL_ERROR = "ERROR"; private final String category; private final String level; private final String message; private final List params; - - private static final String LEVEL_WARNING = "WARN"; - private static final String LEVEL_ERROR = "ERROR"; - private ProjectValidationType validation; @JsonCreator diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultGdcTimeElParam.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultGdcTimeElParam.java index 48a49562d..a9e8056ee 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultGdcTimeElParam.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultGdcTimeElParam.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultItem.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultItem.java index 667f8a2e6..82410caa6 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultItem.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultItem.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultObjectParam.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultObjectParam.java index 004514364..aca9cb899 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultObjectParam.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultObjectParam.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultParam.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultParam.java index a6ffdb6ff..cd8dc6a38 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultParam.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultParam.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultSliElParam.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultSliElParam.java index d71026680..9849fa8fc 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultSliElParam.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultSliElParam.java @@ -1,12 +1,10 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.project; -import static java.lang.String.format; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,6 +15,8 @@ import java.util.List; import java.util.Map; +import static java.lang.String.format; + @JsonTypeName("sli_el") @JsonIgnoreProperties(ignoreUnknown = true) public class ProjectValidationResultSliElParam extends ProjectValidationResultParam { @@ -43,7 +43,6 @@ public List getIds() { /** * @return list of values. Values have only informative character and are connected to IDs. - * * @see #getIds() */ public List getVals() { @@ -58,14 +57,13 @@ public List getVals() { *

    • ID and it's corresponding value are on the same index.
    • *
    * - * @see #getIds() - * @see #getVals() - * * @return {@code null} when ids are {@code null} or map of tuples * @throws IllegalStateException
      - *
    • when ids are not {@code null} and vals are {@code null}
    • - *
    • when sizes of ids and vals lists are not equal
    • - *
    + *
  • when ids are not {@code null} and vals are {@code null}
  • + *
  • when sizes of ids and vals lists are not equal
  • + * + * @see #getIds() + * @see #getVals() */ public Map asMap() { if (ids == null) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultStringParam.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultStringParam.java index a7635df0e..7be9c85cb 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultStringParam.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResultStringParam.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResults.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResults.java index 74fc0af4b..ce8515b56 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResults.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationResults.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.project; -import com.gooddata.sdk.common.util.BooleanDeserializer; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.gooddata.sdk.common.util.BooleanDeserializer; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.LinkedList; @@ -19,7 +19,7 @@ /** * Results of project validation. - * + *

    * Deserialization only. */ @JsonTypeName("projectValidateResult") @@ -57,6 +57,7 @@ private ProjectValidationResults(@JsonProperty("error_found") @JsonDeserialize(u /** * True if validation found some error + * * @return true in case of validation error, false otherwise */ public boolean isError() { @@ -65,6 +66,7 @@ public boolean isError() { /** * True in case some part of validation crashed (not executed at all) + * * @return true if validation crashed, false otherwise */ public boolean isFatalError() { @@ -73,6 +75,7 @@ public boolean isFatalError() { /** * True if some warning was found during validation. + * * @return true if some warning was found during validation, false otherwise */ public boolean isWarning() { @@ -81,15 +84,17 @@ public boolean isWarning() { /** * True if no warning or error is in the validation results. + * * @return true if no warning or error is in the validation results, false otherwise */ public boolean isValid() { - return ! (error || fatalError || warning); + return !(error || fatalError || warning); } /** * Get validation results, describing output of all validations executed. * Can return empty list, in case the validation had no error or warning (is valid)- + * * @return validation results list */ public List getResults() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationType.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationType.java index 8828814b5..45c2e94aa 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationType.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidationType.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -14,8 +14,6 @@ */ public class ProjectValidationType { - private final String value; - public static final ProjectValidationType PDM_VS_DWH = new ProjectValidationType("pdm::pdm_vs_dwh"); public static final ProjectValidationType METRIC_FILTER = new ProjectValidationType("metric_filter"); public static final ProjectValidationType PDM_TRANSITIVITY = new ProjectValidationType("pdm::transitivity"); @@ -23,6 +21,7 @@ public class ProjectValidationType { public static final ProjectValidationType INVALID_OBJECTS = new ProjectValidationType("invalid_objects"); public static final ProjectValidationType PDM_ELEM = new ProjectValidationType("pdm::elem_validation"); public static final ProjectValidationType PDM_PK_FK_CONSISTENCY = new ProjectValidationType("pdm::pk_fk_consistency"); + private final String value; @JsonCreator public ProjectValidationType(String value) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidations.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidations.java index 9f26cfbb5..e9c2e5ecc 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidations.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/ProjectValidations.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Projects.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Projects.java index f22ca5f83..f0dec6442 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Projects.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Projects.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -36,18 +36,6 @@ public class Projects extends Page { static final String ROOT_NODE = "projects"; - static class Deserializer extends PageDeserializer { - - protected Deserializer() { - super(Project.class); - } - - @Override - protected Projects createPage(final List items, final Paging paging, final Map links) { - return new Projects(items, paging); - } - } - public Projects(List items, Paging paging) { super(items, paging); } @@ -67,4 +55,16 @@ public String toString() { return GoodDataToStringBuilder.defaultToString(this); } + static class Deserializer extends PageDeserializer { + + protected Deserializer() { + super(Project.class); + } + + @Override + protected Projects createPage(final List items, final Paging paging, final Map links) { + return new Projects(items, paging); + } + } + } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Role.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Role.java index 4261aff96..b10e3639a 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Role.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Role.java @@ -1,17 +1,23 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.project; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.gooddata.sdk.model.md.Meta; import com.gooddata.sdk.common.util.BooleanDeserializer; import com.gooddata.sdk.common.util.BooleanStringSerializer; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.md.Meta; import java.util.Collections; import java.util.HashMap; @@ -85,6 +91,11 @@ public String getIdentifier() { return meta.getIdentifier(); } + @JsonIgnore + public String getUri() { + return links.get(SELF_LINK); + } + /** * Allows service to set self link as it is not provided by REST API. *

    @@ -94,11 +105,6 @@ public void setUri(final String uri) { links.put(SELF_LINK, uri); } - @JsonIgnore - public String getUri() { - return links.get(SELF_LINK); - } - @Override public boolean equals(final Object o) { if (this == o) return true; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Roles.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Roles.java index 3567be8e2..03b4aeda4 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Roles.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Roles.java @@ -1,11 +1,15 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.project; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.Set; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/User.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/User.java index f0b53d583..d94da7aa0 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/User.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/User.java @@ -1,13 +1,19 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.project; -import com.fasterxml.jackson.annotation.*; -import com.gooddata.sdk.model.account.Account; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.model.account.Account; import java.util.Arrays; import java.util.List; @@ -15,6 +21,7 @@ /** * User in project + * * @see Account */ @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME) @@ -55,6 +62,10 @@ public String getStatus() { return content.getStatus(); } + public void setStatus(final String status) { + this.content.status = status; + } + @JsonIgnore public String getLastName() { return content.getLastName(); @@ -84,10 +95,6 @@ public Links getLinks() { return links; } - public void setStatus(final String status) { - this.content.status = status; - } - @Override public String toString() { return GoodDataToStringBuilder.defaultToString(this); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Users.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Users.java index 97bc98819..43c33ab88 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Users.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/Users.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -16,13 +16,14 @@ import java.util.List; +import static com.gooddata.sdk.model.project.Users.ROOT_NODE; import static java.util.Arrays.asList; /** - * List of users. Deserialization only. + * List of users. */ @JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = Id.NONE) -@JsonTypeName("users") +@JsonTypeName(ROOT_NODE) @JsonIgnoreProperties(ignoreUnknown = true) @JsonDeserialize(using = UsersDeserializer.class) @JsonSerialize(using = UsersSerializer.class) diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/UsersDeserializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/UsersDeserializer.java index 9d33a8cf2..a30318c9d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/UsersDeserializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/UsersDeserializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -14,7 +14,7 @@ class UsersDeserializer extends PageDeserializer { protected UsersDeserializer() { - super(User.class, "users"); + super(User.class, Users.ROOT_NODE); } @Override diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/UsersSerializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/UsersSerializer.java index b4322c212..5eb007cf8 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/UsersSerializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/UsersSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,7 +7,6 @@ import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.ObjectCodec; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; @@ -20,13 +19,13 @@ class UsersSerializer extends JsonSerializer { @Override - public void serialize(final Users users, final JsonGenerator jgen, final SerializerProvider serializerProvider) throws IOException, JsonProcessingException { + public void serialize(final Users users, final JsonGenerator jgen, final SerializerProvider serializerProvider) throws IOException { jgen.writeStartObject(); jgen.writeFieldName(Users.ROOT_NODE); jgen.writeStartArray(); final ObjectCodec codec = jgen.getCodec(); - for (Object item: users.getPageItems()) { + for (Object item : users.getPageItems()) { codec.writeValue(jgen, item); } jgen.writeEndArray(); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/DiffRequest.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/DiffRequest.java index a914899a1..230ada541 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/DiffRequest.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/DiffRequest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -40,6 +40,7 @@ public DiffRequest(String targetModel) { /** * Returns desired target state of project model + * * @return desired target state of project model */ public String getTargetModel() { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/MaqlDdl.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/MaqlDdl.java index 3fa91618e..dcd4a6342 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/MaqlDdl.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/MaqlDdl.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/MaqlDdlLinks.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/MaqlDdlLinks.java index 3e3f41a5d..4cd3c7caf 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/MaqlDdlLinks.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/MaqlDdlLinks.java @@ -1,15 +1,15 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.project.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.gooddata.sdk.model.gdc.LinkEntries; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.gooddata.sdk.model.gdc.LinkEntries; import java.util.List; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/ModelDiff.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/ModelDiff.java index e50e80c34..9f8d2601f 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/ModelDiff.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/project/model/ModelDiff.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -124,7 +124,7 @@ public static class UpdateScript { * * @param preserveData true if data should be preserved, false if they should be truncated * @param cascadeDrops true if related objects should be also dropped, false if not - * @param maqlChunks MAQL strings + * @param maqlChunks MAQL strings */ @JsonCreator UpdateScript(@JsonProperty("preserveData") Boolean preserveData, @@ -140,7 +140,7 @@ public static class UpdateScript { * * @param preserveData true if data should be preserved, false if they should be truncated * @param cascadeDrops true if related objects should be also dropped, false if not - * @param maqlChunks MAQL strings + * @param maqlChunks MAQL strings */ UpdateScript(boolean preserveData, boolean cascadeDrops, String... maqlChunks) { this(preserveData, cascadeDrops, asList(maqlChunks)); diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/projecttemplate/Template.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/projecttemplate/Template.java index 3ecf99ba4..87ac0b942 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/projecttemplate/Template.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/projecttemplate/Template.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -39,8 +39,8 @@ public class Template { @JsonCreator private Template(@JsonProperty("link") String uri, @JsonProperty("urn") String urn, @JsonProperty("version") String version, - @JsonProperty("hidden") @JsonDeserialize(using = BooleanDeserializer.class) Boolean hidden, - @JsonProperty("content") Content content, @JsonProperty("meta") Meta meta) { + @JsonProperty("hidden") @JsonDeserialize(using = BooleanDeserializer.class) Boolean hidden, + @JsonProperty("content") Content content, @JsonProperty("meta") Meta meta) { this.uri = uri; this.urn = urn; this.version = version; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/projecttemplate/Templates.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/projecttemplate/Templates.java index e3044f8b5..a23116889 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/projecttemplate/Templates.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/projecttemplate/Templates.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/TagsDeserializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/TagsDeserializer.java index 6d67f82f7..d0472e1bc 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/TagsDeserializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/TagsDeserializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/TagsSerializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/TagsSerializer.java index 9dedb2afe..83ea3a19a 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/TagsSerializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/TagsSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/UriHelper.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/UriHelper.java index 738223919..96aaa021d 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/UriHelper.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/util/UriHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -12,6 +12,7 @@ public abstract class UriHelper { /** * Parses the last part of the URI (substring after last '/' sign). + * * @param uri uri to get the last part form * @return last part of the uri */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/Warehouse.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/Warehouse.java index 83f4fcd54..b3b17b1e0 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/Warehouse.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/Warehouse.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -12,10 +12,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -import com.gooddata.sdk.model.project.Environment; -import com.gooddata.sdk.model.util.UriHelper; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.common.util.ISOZonedDateTime; +import com.gooddata.sdk.model.project.Environment; +import com.gooddata.sdk.model.util.UriHelper; import java.time.ZonedDateTime; import java.util.Map; @@ -37,11 +37,9 @@ public class Warehouse { private static final String SELF_LINK = "self"; private static final String STATUS_ENABLED = "ENABLED"; - + private final String authorizationToken; private String title; private String description; - - private final String authorizationToken; @ISOZonedDateTime private ZonedDateTime created; @ISOZonedDateTime @@ -89,7 +87,7 @@ public Warehouse(@JsonProperty("title") String title, @JsonProperty("authorizati @JsonProperty("links") Map links, @JsonProperty("license") String license) { this(title, authToken, description, created, updated, createdBy, updatedBy, status, environment, connectionUrl, - links); + links); this.license = license; } @@ -97,6 +95,10 @@ public String getTitle() { return title; } + public void setTitle(String title) { + this.title = title; + } + public String getAuthorizationToken() { return authorizationToken; } @@ -105,19 +107,17 @@ public String getDescription() { return description; } + public void setDescription(String description) { + this.description = description; + } + /** * Gets the JDBC connection string. * * @return JDBC connection string */ - public String getConnectionUrl() { return connectionUrl; } - - public void setTitle(String title) { - this.title = title; - } - - public void setDescription(String description) { - this.description = description; + public String getConnectionUrl() { + return connectionUrl; } public ZonedDateTime getCreated() { @@ -148,14 +148,16 @@ public void setEnvironment(final String environment) { this.environment = environment; } - public String getLicense() { return license; } - @JsonIgnore public void setEnvironment(final Environment environment) { notNull(environment, "environment"); setEnvironment(environment.name()); } + public String getLicense() { + return license; + } + public Map getLinks() { return links; } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchema.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchema.java index 4179e8607..ce13a3e07 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchema.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchema.java @@ -1,11 +1,16 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.warehouse; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.Map; @@ -21,11 +26,9 @@ @JsonIgnoreProperties(ignoreUnknown = true) public class WarehouseSchema { + public static final String URI = WarehouseSchemas.URI + "/{name}"; private static final String SELF_LINK = "self"; private static final String INSTANCE_LINK = "instance"; - - public static final String URI = WarehouseSchemas.URI + "/{name}"; - private final String name; private final String description; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchemas.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchemas.java index ff8da5a17..cde33d8e7 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchemas.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchemas.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchemasDeserializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchemasDeserializer.java index d074852a9..846d0f867 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchemasDeserializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseSchemasDeserializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseTask.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseTask.java index 52da7ac66..548b63434 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseTask.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseTask.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -25,7 +25,7 @@ public class WarehouseTask { private static final String WAREHOUSE_LINK = "instance"; private static final String WAREHOUSE_USER_LINK = "user"; - private final Map links; + private final Map links; @JsonCreator private WarehouseTask(@JsonProperty("links") Map links) { diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUser.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUser.java index f89c0cf0f..ab950e96e 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUser.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUser.java @@ -1,14 +1,20 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.warehouse; -import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import com.gooddata.sdk.model.account.Account; import com.gooddata.sdk.model.util.UriHelper; -import com.gooddata.sdk.common.util.GoodDataToStringBuilder; import java.util.Map; @@ -54,6 +60,13 @@ public WarehouseUser(final String role, final String profile, final String login this.login = login; } + @JsonCreator + public WarehouseUser(@JsonProperty("role") String role, @JsonProperty("profile") String profile, + @JsonProperty("login") String login, @JsonProperty("links") Map links) { + this(role, profile, login); + this.links = links; + } + /** * Creates a new {@link WarehouseUser} with role and profileUri set */ @@ -79,13 +92,6 @@ public static WarehouseUser createWithlogin(final String login, final WarehouseU return new WarehouseUser(role.getRoleName(), null, login); } - @JsonCreator - public WarehouseUser(@JsonProperty("role") String role, @JsonProperty("profile") String profile, - @JsonProperty("login") String login, @JsonProperty("links") Map links) { - this(role, profile, login); - this.links = links; - } - public String getRole() { return role; } diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUserRole.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUserRole.java index 985979411..f1f9b0280 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUserRole.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUserRole.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsers.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsers.java index 6485c136e..9bd883773 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsers.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsers.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsersDeserializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsersDeserializer.java index e1593a3b6..c243b26ed 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsersDeserializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsersDeserializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsersSerializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsersSerializer.java index 6b9127d1b..aad1d4d59 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsersSerializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehouseUsersSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/Warehouses.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/Warehouses.java index afc2dcec9..7f08df130 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/Warehouses.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/Warehouses.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.warehouse; -import com.gooddata.sdk.common.collections.Page; -import com.gooddata.sdk.common.collections.Paging; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.gooddata.sdk.common.collections.Page; +import com.gooddata.sdk.common.collections.Paging; import java.util.List; import java.util.Map; diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehousesDeserializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehousesDeserializer.java index 557362657..cb9c18a63 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehousesDeserializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehousesDeserializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehousesSerializer.java b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehousesSerializer.java index 5a833bd0c..5831244c3 100644 --- a/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehousesSerializer.java +++ b/gooddata-java-model/src/main/java/com/gooddata/sdk/model/warehouse/WarehousesSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/account/SeparatorSettingsTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/account/SeparatorSettingsTest.groovy index 8d35a2b51..14d6751b8 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/account/SeparatorSettingsTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/account/SeparatorSettingsTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ExecutionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ExecutionTest.groovy index d09458ea5..7f23b9d1a 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ExecutionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ExecutionTest.groovy @@ -1,24 +1,13 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.executeafm -import com.gooddata.sdk.model.executeafm.afm.Afm -import com.gooddata.sdk.model.executeafm.afm.AttributeItem +import com.gooddata.sdk.model.executeafm.afm.* import com.gooddata.sdk.model.executeafm.afm.filter.ExpressionFilter -import com.gooddata.sdk.model.executeafm.afm.MeasureItem -import com.gooddata.sdk.model.executeafm.afm.NativeTotalItem -import com.gooddata.sdk.model.executeafm.afm.SimpleMeasureDefinition -import com.gooddata.sdk.model.executeafm.resultspec.AttributeLocatorItem -import com.gooddata.sdk.model.executeafm.resultspec.AttributeSortItem -import com.gooddata.sdk.model.executeafm.resultspec.Dimension -import com.gooddata.sdk.model.executeafm.resultspec.Direction -import com.gooddata.sdk.model.executeafm.resultspec.MeasureLocatorItem -import com.gooddata.sdk.model.executeafm.resultspec.MeasureSortItem -import com.gooddata.sdk.model.executeafm.resultspec.ResultSpec -import com.gooddata.sdk.model.executeafm.resultspec.TotalItem +import com.gooddata.sdk.model.executeafm.resultspec.* import com.gooddata.sdk.model.md.report.Total import spock.lang.Specification diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/IdentifierObjQualifierTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/IdentifierObjQualifierTest.groovy index c9164004b..c0108f15f 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/IdentifierObjQualifierTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/IdentifierObjQualifierTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/LocalIdentifierQualifierTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/LocalIdentifierQualifierTest.groovy index 87bb37832..df4d953f6 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/LocalIdentifierQualifierTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/LocalIdentifierQualifierTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ObjQualifierTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ObjQualifierTest.groovy index 08019fade..6cbc40caa 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ObjQualifierTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ObjQualifierTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/QualifierTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/QualifierTest.groovy index d42030b39..34df1d842 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/QualifierTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/QualifierTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ResultPageTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ResultPageTest.groovy index 07021d213..6321d91d9 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ResultPageTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/ResultPageTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/UriObjQualifierTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/UriObjQualifierTest.groovy index 77b74f0b9..f2039ceef 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/UriObjQualifierTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/UriObjQualifierTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/VisualizationExecutionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/VisualizationExecutionTest.groovy index 557e3098a..4a5e03410 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/VisualizationExecutionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/VisualizationExecutionTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -41,7 +41,7 @@ class VisualizationExecutionTest extends Specification { '/gdc/md/PROJECT/vizObjUri', [new ExpressionFilter('some expression')], new ResultSpec([new Dimension(['i1'], [new TotalItem('mId', Total.AVG, 'a1')].toSet())], - [new AttributeSortItem('asc', 'aId')]) + [new AttributeSortItem('asc', 'aId')]) ), jsonEquals(resource(VIZ_EXECUTION_FULL_JSON)) } diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/AfmTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/AfmTest.groovy index 7c9d54c09..896b48d0d 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/AfmTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/AfmTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/ArithmeticMeasureDefinitionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/ArithmeticMeasureDefinitionTest.groovy index ed7e0e258..77e662765 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/ArithmeticMeasureDefinitionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/ArithmeticMeasureDefinitionTest.groovy @@ -1,11 +1,11 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.executeafm.afm -import com.gooddata.sdk.model.executeafm.UriObjQualifier + import net.javacrumbs.jsonunit.JsonMatchers import spock.lang.Specification diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/AttributeItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/AttributeItemTest.groovy index 904ade73c..4ddb937a5 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/AttributeItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/AttributeItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/MeasureDefinitionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/MeasureDefinitionTest.groovy index 0fbe0d1d4..37a5fc141 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/MeasureDefinitionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/MeasureDefinitionTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/MeasureItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/MeasureItemTest.groovy index 76fc2a2e6..68b881dcc 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/MeasureItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/MeasureItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/NativeTotalItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/NativeTotalItemTest.groovy index a4a38a9ed..9cf416919 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/NativeTotalItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/NativeTotalItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/ObjIdentifierUtilitiesTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/ObjIdentifierUtilitiesTest.groovy index 55a5efc28..5fb5dab81 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/ObjIdentifierUtilitiesTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/ObjIdentifierUtilitiesTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/OverPeriodDateAttributeTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/OverPeriodDateAttributeTest.groovy index c23701a35..118760ae4 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/OverPeriodDateAttributeTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/OverPeriodDateAttributeTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/OverPeriodMeasureDefinitionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/OverPeriodMeasureDefinitionTest.groovy index 77b664e0c..202ce1d3b 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/OverPeriodMeasureDefinitionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/OverPeriodMeasureDefinitionTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PopMeasureDefinitionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PopMeasureDefinitionTest.groovy index 11e6f201e..fd6699c7b 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PopMeasureDefinitionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PopMeasureDefinitionTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodDateDataSetTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodDateDataSetTest.groovy index 136fd1171..88aaf0806 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodDateDataSetTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodDateDataSetTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodMeasureDefinitionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodMeasureDefinitionTest.groovy index 1bdcc151d..ecebc90a8 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodMeasureDefinitionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/PreviousPeriodMeasureDefinitionTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/SimpleMeasureDefinitionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/SimpleMeasureDefinitionTest.groovy index 944d355f4..6d59451e0 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/SimpleMeasureDefinitionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/SimpleMeasureDefinitionTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/AbsoluteDateFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/AbsoluteDateFilterTest.groovy index ad32ae3d6..7c30cf639 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/AbsoluteDateFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/AbsoluteDateFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonConditionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonConditionTest.groovy index 2b8b583d4..4d6094a05 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonConditionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ComparisonConditionTest.groovy @@ -1,22 +1,18 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.executeafm.afm.filter import nl.jqno.equalsverifier.EqualsVerifier +import nl.jqno.equalsverifier.Warning import org.apache.commons.lang3.SerializationUtils import spock.lang.Specification import spock.lang.Unroll -import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.EQUAL_TO -import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.GREATER_THAN -import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.GREATER_THAN_OR_EQUAL_TO -import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.LESS_THAN -import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.LESS_THAN_OR_EQUAL_TO -import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.NOT_EQUAL_TO import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource +import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.* import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource import static spock.util.matcher.HamcrestSupport.that @@ -124,6 +120,6 @@ class ComparisonConditionTest extends Specification { def "should verify equals"() { expect: - EqualsVerifier.forClass(ComparisonCondition).usingGetClass().verify() + EqualsVerifier.forClass(ComparisonCondition).usingGetClass().suppress(Warning.BIGDECIMAL_EQUALITY).verify() } } diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/CompatibilityFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/CompatibilityFilterTest.groovy index 7fe0086d6..aeaa3d4a4 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/CompatibilityFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/CompatibilityFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ExpressionFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ExpressionFilterTest.groovy index a9c173912..247b05d67 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ExpressionFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ExpressionFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ExtendedFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ExtendedFilterTest.groovy index a3e454813..adac38282 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ExtendedFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ExtendedFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/FilterItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/FilterItemTest.groovy index 83305eb4c..05421ecdd 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/FilterItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/FilterItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterConditionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterConditionTest.groovy index ee490d10e..15263ea0f 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterConditionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterConditionTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterTest.groovy index 5bc46298e..70dc4130b 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/MeasureValueFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -12,8 +12,8 @@ import nl.jqno.equalsverifier.EqualsVerifier import spock.lang.Specification import spock.lang.Unroll -import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.GREATER_THAN import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource +import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.GREATER_THAN class MeasureValueFilterTest extends Specification { diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/NegativeAttributeFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/NegativeAttributeFilterTest.groovy index 77997756d..a33bb4b20 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/NegativeAttributeFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/NegativeAttributeFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/PositiveAttributeFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/PositiveAttributeFilterTest.groovy index b94251f06..7eedd579a 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/PositiveAttributeFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/PositiveAttributeFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -44,8 +44,8 @@ class PositiveAttributeFilterTest extends Specification { then: with(filter) { displayForm == QUALIFIER - in.class == clazz - in.elements == ['a', 'b'] + in.class == clazz + in.elements == ['a', 'b'] } filter.toString() diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RangeConditionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RangeConditionTest.groovy index 09246cd67..505f0c8fe 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RangeConditionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RangeConditionTest.groovy @@ -1,11 +1,12 @@ /* - * Copyright (C) 2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.executeafm.afm.filter import nl.jqno.equalsverifier.EqualsVerifier +import nl.jqno.equalsverifier.Warning import org.apache.commons.lang3.SerializationUtils import spock.lang.Specification import spock.lang.Unroll @@ -112,6 +113,6 @@ class RangeConditionTest extends Specification { def "should verify equals"() { expect: - EqualsVerifier.forClass(RangeCondition).usingGetClass().verify() + EqualsVerifier.forClass(RangeCondition).usingGetClass().suppress(Warning.BIGDECIMAL_EQUALITY).verify() } } diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterOperatorTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterOperatorTest.groovy index 79c60ce5a..661741ea6 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterOperatorTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterOperatorTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterTest.groovy index 4ce836e57..286e2d402 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RankingFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RelativeDateFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RelativeDateFilterTest.groovy index c0a640167..5799d4a9f 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RelativeDateFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/RelativeDateFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/UriAttributeFilterElementsTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/UriAttributeFilterElementsTest.groovy index b8d18e917..b8b0076f0 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/UriAttributeFilterElementsTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/UriAttributeFilterElementsTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ValueAttributeFilterElementsTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ValueAttributeFilterElementsTest.groovy index 98faac675..3dc993431 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ValueAttributeFilterElementsTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/afm/filter/ValueAttributeFilterElementsTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/AttributeHeaderTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/AttributeHeaderTest.groovy index 5a8693c07..d1d0b7b0a 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/AttributeHeaderTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/AttributeHeaderTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/AttributeInHeaderTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/AttributeInHeaderTest.groovy index ae1f82e7b..cb3ab4a52 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/AttributeInHeaderTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/AttributeInHeaderTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/ExecutionResponseTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/ExecutionResponseTest.groovy index 0e711e2f6..d8bd879bc 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/ExecutionResponseTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/ExecutionResponseTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/HeaderTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/HeaderTest.groovy index 96f34962c..fc2b807ea 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/HeaderTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/HeaderTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/MeasureGroupHeaderTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/MeasureGroupHeaderTest.groovy index 5d3067a60..4639daf6f 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/MeasureGroupHeaderTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/MeasureGroupHeaderTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/MeasureHeaderItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/MeasureHeaderItemTest.groovy index 0ab321411..2012ad37c 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/MeasureHeaderItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/MeasureHeaderItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -25,7 +25,7 @@ class MeasureHeaderItemTest extends Specification { def "should serialize"() { expect: - that new MeasureHeaderItem('Name', '#,##0.00', 'm1'), + that new MeasureHeaderItem('Name', '#,##0.00', 'm1'), jsonEquals(resource(MEASURE_HEADER_ITEM_JSON)) } diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/ResultDimensionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/ResultDimensionTest.groovy index fd29e527f..6f7163bc3 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/ResultDimensionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/ResultDimensionTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/TotalHeaderItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/TotalHeaderItemTest.groovy index d0d52aa53..14e9e199e 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/TotalHeaderItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/response/TotalHeaderItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/AttributeHeaderItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/AttributeHeaderItemTest.groovy index 58e227227..542d8e5f9 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/AttributeHeaderItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/AttributeHeaderItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataListTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataListTest.groovy index f6a9db066..149eb6190 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataListTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataListTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataTest.groovy index 775fdb880..4d12e3814 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataValueTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataValueTest.groovy index 0fbed21f9..b5b16b6d2 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataValueTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/DataValueTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ExecutionResultTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ExecutionResultTest.groovy index d78152ffc..54038c75e 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ExecutionResultTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ExecutionResultTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -41,10 +41,10 @@ class ExecutionResultTest extends Specification { def "should serialize full"() { expect: - that new ExecutionResult(new DataList(DATA.collect{ - def values = it.collect { new DataValue(it) } - new DataList(values) - }), + that new ExecutionResult(new DataList(DATA.collect { + def values = it.collect { new DataValue(it) } + new DataList(values) + }), new Paging([2, 4], [0, 0], [2, 4]), [ [[new AttributeHeaderItem('Employee1', '/gdc/md/FoodMartDemo/obj/122/elements?id=123'), diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/PagingTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/PagingTest.groovy index 6f2ad7bb0..4f3710d03 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/PagingTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/PagingTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultHeaderItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultHeaderItemTest.groovy index b3ca7bc71..98699e1f8 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultHeaderItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultHeaderItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultMeasureHeaderItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultMeasureHeaderItemTest.groovy index 40593c7e5..fe307245b 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultMeasureHeaderItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultMeasureHeaderItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultTotalHeaderItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultTotalHeaderItemTest.groovy index 6dc643a24..8afffcfd8 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultTotalHeaderItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/ResultTotalHeaderItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/WarningTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/WarningTest.groovy index 8a292f927..c87b9d024 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/WarningTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/result/WarningTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/AttributeLocatorItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/AttributeLocatorItemTest.groovy index 31f594545..5b43a49c8 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/AttributeLocatorItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/AttributeLocatorItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortItemTest.groovy index 9b561c214..c7316cb29 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/AttributeSortItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/DimensionTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/DimensionTest.groovy index 719c55cfe..bf7538f50 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/DimensionTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/DimensionTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -30,7 +30,7 @@ class DimensionTest extends Specification { expect: that new Dimension('i1', 'i2') .addTotal(TOTAL), - jsonEquals(resource(DIMENSION_FULL_JSON)) + jsonEquals(resource(DIMENSION_FULL_JSON)) } def "should deserialize"() { @@ -59,7 +59,7 @@ class DimensionTest extends Specification { when: dimension.addTotal(TOTAL) - .addTotal(new TotalItem('m1', Total.AVG, 'i2')) + .addTotal(new TotalItem('m1', Total.AVG, 'i2')) then: dimension.totals.size() == 2 diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/MeasureLocatorItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/MeasureLocatorItemTest.groovy index 14d07392d..5cad59f94 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/MeasureLocatorItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/MeasureLocatorItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/MeasureSortItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/MeasureSortItemTest.groovy index ccc95f987..0db6f41e7 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/MeasureSortItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/MeasureSortItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/ResultSpecTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/ResultSpecTest.groovy index 8fd2d02ff..b6fc8b3f7 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/ResultSpecTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/ResultSpecTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -76,8 +76,8 @@ class ResultSpecTest extends Specification { def "should add items"() { when: def resultSpec = new ResultSpec() - .addDimension(new Dimension([])) - .addSort(new MeasureSortItem(Direction.ASC)) + .addDimension(new Dimension([])) + .addSort(new MeasureSortItem(Direction.ASC)) then: with(resultSpec) { diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/TotalItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/TotalItemTest.groovy index 8ab2b1198..5b6f4c4ef 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/TotalItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/TotalItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/TotalLocatorItemTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/TotalLocatorItemTest.groovy index 4a7475d50..8bde56a5f 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/TotalLocatorItemTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/executeafm/resultspec/TotalLocatorItemTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntitiesTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntitiesTest.groovy index d4ba9c090..e07c8fb46 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntitiesTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntitiesTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntityFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntityFilterTest.groovy index b9657907a..baf6a0d10 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntityFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntityFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntityTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntityTest.groovy index 353a61dcd..45bc28d7e 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntityTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/lcm/LcmEntityTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -28,9 +28,9 @@ class LcmEntityTest extends Specification { expect: that new LcmEntity('PROJECT_ID', 'PROJECT_TITLE', 'CLIENT', 'SEGMENT', 'DATA_PRODUCT', [ - project: '/gdc/projects/PROJECT_ID', - client: '/gdc/domains/default/dataproducts/DATA_PRODUCT/clients/CLIENT', - segment: '/gdc/domains/default/dataproducts/DATA_PRODUCT/segments/SEGMENT', + project : '/gdc/projects/PROJECT_ID', + client : '/gdc/domains/default/dataproducts/DATA_PRODUCT/clients/CLIENT', + segment : '/gdc/domains/default/dataproducts/DATA_PRODUCT/segments/SEGMENT', dataProduct: '/gdc/domains/default/dataproducts/DATA_PRODUCT' ]), jsonEquals(resource(LCM_ENTITY_FULL_JSON)) diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/IdentifiersAndUrisTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/IdentifiersAndUrisTest.groovy index c6e801e62..a14b7e99e 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/IdentifiersAndUrisTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/IdentifiersAndUrisTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/UriToIdentifierTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/UriToIdentifierTest.groovy index c553de083..9690027ba 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/UriToIdentifierTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/UriToIdentifierTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/AnalyticalDashboardTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/AnalyticalDashboardTest.groovy index 7ac52bd6e..379b2a0bb 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/AnalyticalDashboardTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/AnalyticalDashboardTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/KpiAlertTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/KpiAlertTest.groovy index c7fbb69a2..0ad9a3715 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/KpiAlertTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/KpiAlertTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/KpiTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/KpiTest.groovy index 4837468b1..882b36665 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/KpiTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/KpiTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -27,12 +27,12 @@ class KpiTest extends Specification { kpi.comparisonType == 'lastYear' kpi.comparisonDirection == 'growIsGood' kpi.title == 'Avg. Salary (CSV)' - kpi.ignoreDashboardFilters*.datasetUri == [ '/date/dataset/1' ] + kpi.ignoreDashboardFilters*.datasetUri == ['/date/dataset/1'] } def "creates new kpi and serializes to JSON"() { when: - def kpi = new Kpi('KPI 1', '/metric/1', 'lastYear', 'growIsGood', [ new DateFilterReference('/date/dataset/1') ], '/dateDs/1') + def kpi = new Kpi('KPI 1', '/metric/1', 'lastYear', 'growIsGood', [new DateFilterReference('/date/dataset/1')], '/dateDs/1') then: that kpi, jsonEquals(readStringFromResource('/md/dashboard/kpi-new.json')) diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/AttributeFilterReferenceTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/AttributeFilterReferenceTest.groovy index 16e968430..1e87c204d 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/AttributeFilterReferenceTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/AttributeFilterReferenceTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardAttributeFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardAttributeFilterTest.groovy index 85431cf80..b21ef7697 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardAttributeFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardAttributeFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -25,12 +25,12 @@ class DashboardAttributeFilterTest extends Specification { filter filter.displayForm == '/df/1' filter.negativeSelection - filter.attributeElementUris == [ '/elem/1', '/elem/2' ] + filter.attributeElementUris == ['/elem/1', '/elem/2'] } def "creates new and serializes to JSON"() { when: - def filter = new DashboardAttributeFilter('/df/1', true, [ '/elem/1', '/elem/2' ]) + def filter = new DashboardAttributeFilter('/df/1', true, ['/elem/1', '/elem/2']) then: that filter, jsonEquals(readStringFromResource(FILTER_JSON)) diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardDateFilterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardDateFilterTest.groovy index 37b9ae4e5..35f7e4d7d 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardDateFilterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardDateFilterTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -11,12 +11,9 @@ import spock.lang.Unroll import java.time.LocalDate -import static com.gooddata.sdk.model.md.dashboard.filter.DashboardDateFilter.ABSOLUTE_FILTER_TYPE -import static com.gooddata.sdk.model.md.dashboard.filter.DashboardDateFilter.RELATIVE_FILTER_TYPE -import static com.gooddata.sdk.model.md.dashboard.filter.DashboardDateFilter.absoluteDateFilter -import static com.gooddata.sdk.model.md.dashboard.filter.DashboardDateFilter.relativeDateFilter import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource import static com.gooddata.sdk.common.util.ResourceUtils.readStringFromResource +import static com.gooddata.sdk.model.md.dashboard.filter.DashboardDateFilter.* import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals import static spock.util.matcher.HamcrestSupport.that diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilterContextTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilterContextTest.groovy index b5bd21aa2..465b2acaf 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilterContextTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DashboardFilterContextTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -22,13 +22,13 @@ class DashboardFilterContextTest extends Specification { then: context context.title == 'filterContext' - context.filters*.class == [ DashboardDateFilter, DashboardAttributeFilter ] + context.filters*.class == [DashboardDateFilter, DashboardAttributeFilter] } def "creates new and serializes to JSON"() { given: def dateFilter = DashboardDateFilter.relativeDateFilter(-1, -1, 'GDC.time.year', null) - def attributeFilter = new DashboardAttributeFilter('/df/1', false, [ '/elem/1' ]) + def attributeFilter = new DashboardAttributeFilter('/df/1', false, ['/elem/1']) when: def context = new DashboardFilterContext([dateFilter, attributeFilter]) diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DateFilterReferenceTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DateFilterReferenceTest.groovy index a8a5fd168..6bc004dbf 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DateFilterReferenceTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/dashboard/filter/DateFilterReferenceTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/report/TotalTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/report/TotalTest.groovy index d1bf48dd6..39dae2742 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/report/TotalTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/report/TotalTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,12 +7,7 @@ package com.gooddata.sdk.model.md.report import spock.lang.Specification -import static Total.AVG -import static Total.MAX -import static Total.MED -import static Total.MIN -import static Total.NAT -import static Total.SUM +import static Total.* class TotalTest extends Specification { def "should throw exception for invalid total name"() { diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/BucketTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/BucketTest.groovy index 10d19eb3d..26b0f5053 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/BucketTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/BucketTest.groovy @@ -1,11 +1,13 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.visualization import com.gooddata.sdk.model.executeafm.UriObjQualifier +import com.gooddata.sdk.model.executeafm.resultspec.TotalItem +import com.gooddata.sdk.model.md.report.Total import nl.jqno.equalsverifier.EqualsVerifier import org.apache.commons.lang3.SerializationUtils import spock.lang.Shared @@ -18,6 +20,7 @@ import static spock.util.matcher.HamcrestSupport.that class BucketTest extends Specification { private static final String NO_ITEMS_BUCKET = "md/visualization/noItemsBucket.json" private static final String MIXED_BUCKET = "md/visualization/mixedBucket.json" + private static final String MIXED_BUCKET_WITH_TOTALS = "md/visualization/mixedBucketWithTotals.json" private static final String ATTRIBUTE_BUCKET = "md/visualization/attributeBucket.json" private static final String MEASURE_BUCKET = "md/visualization/measureBucket.json" private static final String MULTIPLE_ATTRIBUTES_BUCKET = "md/visualization/multipleAttributesBucket.json" @@ -32,19 +35,41 @@ class BucketTest extends Specification { that new Bucket("noItems", new ArrayList()), jsonEquals(noItemsBucket) } - @SuppressWarnings("GrDeprecatedAPIUsage") def "should serialize full"() { expect: - that new Bucket("attributeBucket", [ - new VisualizationAttribute(new UriObjQualifier("/uri/to/displayForm"), "attribute", "Attribute Alias"), - new Measure( - new VOSimpleMeasureDefinition(new UriObjQualifier("/uri/to/measure"), "sum", false, []), - "measure", - "Measure Alias", - "Measure", - null - ) - ]), jsonEquals(mixedBucket) + that new Bucket( + "attributeBucket", + [ + new VisualizationAttribute(new UriObjQualifier("/uri/to/displayForm"), "attribute", "Attribute Alias"), + new Measure( + new VOSimpleMeasureDefinition(new UriObjQualifier("/uri/to/measure"), "sum", false, []), + "measure", + "Measure Alias", + "Measure", + null + ) + ] as List + ), jsonEquals(mixedBucket) + } + + def "should serialize full with totals"() { + expect: + that new Bucket( + "attributeBucket", + [ + new VisualizationAttribute(new UriObjQualifier("/uri/to/displayForm"), "attribute", "Attribute Alias"), + new Measure( + new VOSimpleMeasureDefinition(new UriObjQualifier("/uri/to/measure"), "sum", false, []), + "measure", + "Measure Alias", + "Measure", + null + ) + ] as List, + [ + new TotalItem("measure", Total.NAT, "attribute") + ] + ), jsonEquals(readObjectFromResource("/$MIXED_BUCKET_WITH_TOTALS", Bucket.class)) } def "should return only attribute from bucket"() { diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/MeasureTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/MeasureTest.groovy index 0d47a17e7..4a7432fad 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/MeasureTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/MeasureTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationAttributeTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationAttributeTest.groovy index 8e2e12145..37ee48465 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationAttributeTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationAttributeTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationClassTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationClassTest.groovy index 3d21251a6..0c7a59823 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationClassTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationClassTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationConverterTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationConverterTest.groovy index 9e11be22c..12831534d 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationConverterTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationConverterTest.groovy @@ -1,42 +1,28 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.visualization import com.fasterxml.jackson.core.JsonParseException +import com.gooddata.sdk.model.executeafm.Execution import com.gooddata.sdk.model.executeafm.LocalIdentifierQualifier import com.gooddata.sdk.model.executeafm.UriObjQualifier -import com.gooddata.sdk.model.executeafm.afm.filter.AbsoluteDateFilter import com.gooddata.sdk.model.executeafm.afm.Afm import com.gooddata.sdk.model.executeafm.afm.AttributeItem -import com.gooddata.sdk.model.executeafm.afm.filter.ComparisonCondition -import com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator import com.gooddata.sdk.model.executeafm.afm.MeasureItem -import com.gooddata.sdk.model.executeafm.afm.filter.MeasureValueFilter -import com.gooddata.sdk.model.executeafm.afm.filter.NegativeAttributeFilter -import com.gooddata.sdk.model.executeafm.afm.filter.PositiveAttributeFilter -import com.gooddata.sdk.model.executeafm.afm.filter.RankingFilter -import com.gooddata.sdk.model.executeafm.afm.filter.RelativeDateFilter -import com.gooddata.sdk.model.executeafm.afm.filter.UriAttributeFilterElements -import com.gooddata.sdk.model.executeafm.resultspec.AttributeSortItem -import com.gooddata.sdk.model.executeafm.resultspec.Dimension -import com.gooddata.sdk.model.executeafm.resultspec.MeasureLocatorItem -import com.gooddata.sdk.model.executeafm.resultspec.MeasureSortItem -import com.gooddata.sdk.model.executeafm.resultspec.ResultSpec -import com.gooddata.sdk.model.executeafm.resultspec.SortItem +import com.gooddata.sdk.model.executeafm.afm.filter.* +import com.gooddata.sdk.model.executeafm.resultspec.* import spock.lang.Specification import spock.lang.Unroll import java.time.LocalDate import java.util.function.Function -import static VisualizationConverter.convertToAfm -import static VisualizationConverter.convertToResultSpec -import static VisualizationConverter.parseSorting -import static com.gooddata.sdk.model.md.visualization.VisualizationConverter.convertToExecution +import static VisualizationConverter.* import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource +import static com.gooddata.sdk.model.md.visualization.VisualizationConverter.* import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals import static spock.util.matcher.HamcrestSupport.that @@ -48,6 +34,9 @@ class VisualizationConverterTest extends Specification { private static final String MULTIPLE_ATTRIBUTE_BUCKETS = "md/visualization/multipleAttributeBucketsVisualization.json" private static final String STACKED_COLUMN_CHART = "md/visualization/stackedColumnChart.json" private static final String LINE_CHART = "md/visualization/lineChart.json" + private static final String TABLE_WITH_TOTALS = "md/visualization/complexTableWithTotals.json" + private static final String AFM_FROM_TABLE_WITH_TOTALS = "executeafm/afm/complextTableWithTotalsConvertedAfm.json" + private static final String EXECUTION_FROM_TABLE_WITH_TOTALS = "executeafm/executionComplexTableConverted.json" @SuppressWarnings("GrDeprecatedAPIUsage") def "should convert complex"() { @@ -72,7 +61,7 @@ class VisualizationConverterTest extends Specification { ), "measure1", "Measure 1 alias", null) ], - null + [] ) VisualizationObject visualizationObject = readObjectFromResource("/$COMPLEX_VISUALIZATION", VisualizationObject) Afm converted = convertToAfm(visualizationObject) @@ -83,7 +72,7 @@ class VisualizationConverterTest extends Specification { def "should convert simple"() { given: - Afm expectedAfm = new Afm([], [], [], null) + Afm expectedAfm = new Afm([], [], [], []) VisualizationObject visualizationObject = readObjectFromResource("/$SIMPLE_VISUALIZATION", VisualizationObject) Afm converted = convertToAfm(visualizationObject) @@ -91,6 +80,15 @@ class VisualizationConverterTest extends Specification { that converted, jsonEquals(expectedAfm) } + def "should convert AFM of complex pivot table with totals"() { + given: + Afm expectedAfm = readObjectFromResource("/$AFM_FROM_TABLE_WITH_TOTALS", Afm) + VisualizationObject visualizationObject = readObjectFromResource("/$TABLE_WITH_TOTALS", VisualizationObject) + Afm converted = convertToAfmWithNativeTotals(visualizationObject) + + expect: + that converted, jsonEquals(expectedAfm) + } @Unroll def "should generate result spec for table with default sorting from #name"() { @@ -119,6 +117,58 @@ class VisualizationConverterTest extends Specification { ) } + def "should generate result spec for complex table with totals"() { + when: + VisualizationObject vo = readObjectFromResource("/$TABLE_WITH_TOTALS", VisualizationObject) + Function getter = { vizObject -> + Stub(VisualizationClass) { + getVisualizationType() >> VisualizationType.TABLE + getUri() >> vo.getVisualizationClassUri() + } + } + ResultSpec converted = convertToResultSpecWithTotals(vo, getter) + then: + that converted, jsonEquals( + // pivot table is simplified to a basic table (2 dimensions: measureGroup and attributes) + new ResultSpec([ + new Dimension( + [ + "e4bb25477bca4fb2a29a4b80d94568d4", + "9008f5d33b3e41279402a25e2f05d0c9", + "023641d306f84921be39d0aa1d6464db", + "a22843f5d77f48b4938ccfb460eb8be4", + "a77983fcc9574f6bad6be1d3cb08bf71" + ], + [ + new TotalItem("fd0164f14ec2444b9b5a7140ce059036", "nat", "e4bb25477bca4fb2a29a4b80d94568d4"), + new TotalItem("fd0164f14ec2444b9b5a7140ce059036", "nat", "9008f5d33b3e41279402a25e2f05d0c9"), + new TotalItem("fd0164f14ec2444b9b5a7140ce059036", "nat", "a22843f5d77f48b4938ccfb460eb8be4"), + new TotalItem("fd0164f14ec2444b9b5a7140ce059036", "nat", "a77983fcc9574f6bad6be1d3cb08bf71"), + new TotalItem("fd0164f14ec2444b9b5a7140ce059036", "sum", "e4bb25477bca4fb2a29a4b80d94568d4"), + new TotalItem("fd0164f14ec2444b9b5a7140ce059036", "nat", "023641d306f84921be39d0aa1d6464db") + ] as Set + ), + new Dimension(["measureGroup"], null) + ], [new AttributeSortItem("asc", "e4bb25477bca4fb2a29a4b80d94568d4", null)]) + ) + } + + def "should generate execution for complex table with totals"() { + given: + Execution expectedExecution = readObjectFromResource("/$EXECUTION_FROM_TABLE_WITH_TOTALS", Execution) + VisualizationObject vo = readObjectFromResource("/$TABLE_WITH_TOTALS", VisualizationObject) + Function getter = { vizObject -> + Stub(VisualizationClass) { + getVisualizationType() >> VisualizationType.TABLE + getUri() >> vo.getVisualizationClassUri() + } + } + Execution converted = VisualizationConverter.convertToExecutionWithTotals(vo, getter) + + expect: + that converted, jsonEquals(expectedExecution) + } + @Unroll def "should generate result spec for #type"() { given: @@ -158,7 +208,7 @@ class VisualizationConverterTest extends Specification { that sorts, jsonEquals(expectedSorts) where: - value << [ "attribute sorting", "measure sorting"] + value << ["attribute sorting", "measure sorting"] properties << [ '{"sortItems":[{"attributeSortItem":{"direction":"desc","attributeIdentifier":"id"}}]}', '{"sortItems":[{"measureSortItem":{"direction":"desc","locators":[{"measureLocatorItem":{"measureIdentifier":"id"}}]}}]}' @@ -184,8 +234,8 @@ class VisualizationConverterTest extends Specification { def "should fail when incorrect visualization class is provided"() { when: convertToResultSpec( - Stub(VisualizationObject) { getVisualizationClassUri() >> 'visClassUri'}, - Stub(VisualizationClass) { getUri() >> 'nonMatchingVisClassUri'} + Stub(VisualizationObject) { getVisualizationClassUri() >> 'visClassUri' }, + Stub(VisualizationClass) { getUri() >> 'nonMatchingVisClassUri' } ) then: diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationObjectTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationObjectTest.groovy index e3a05b466..d200f4394 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationObjectTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/md/visualization/VisualizationObjectTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,13 +7,7 @@ package com.gooddata.sdk.model.md.visualization import com.gooddata.sdk.model.executeafm.LocalIdentifierQualifier import com.gooddata.sdk.model.executeafm.UriObjQualifier -import com.gooddata.sdk.model.executeafm.afm.filter.AbsoluteDateFilter -import com.gooddata.sdk.model.executeafm.afm.filter.ComparisonCondition -import com.gooddata.sdk.model.executeafm.afm.filter.MeasureValueFilter -import com.gooddata.sdk.model.executeafm.afm.filter.NegativeAttributeFilter -import com.gooddata.sdk.model.executeafm.afm.filter.PositiveAttributeFilter -import com.gooddata.sdk.model.executeafm.afm.filter.RankingFilter -import com.gooddata.sdk.model.executeafm.afm.filter.RelativeDateFilter +import com.gooddata.sdk.model.executeafm.afm.filter.* import org.apache.commons.lang3.SerializationUtils import spock.lang.Shared import spock.lang.Specification @@ -21,8 +15,8 @@ import spock.lang.Unroll import java.time.LocalDate -import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.GREATER_THAN import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource +import static com.gooddata.sdk.model.executeafm.afm.filter.ComparisonConditionOperator.GREATER_THAN import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource import static spock.util.matcher.HamcrestSupport.that diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/project/ProjectsTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/project/ProjectsTest.groovy index 20ed17184..3f0db391a 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/project/ProjectsTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/project/ProjectsTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/util/UriHelperTest.groovy b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/util/UriHelperTest.groovy index 5a957791f..f1d18f572 100644 --- a/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/util/UriHelperTest.groovy +++ b/gooddata-java-model/src/test/groovy/com/gooddata/sdk/model/util/UriHelperTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/account/AccountTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/account/AccountTest.java index b735d0291..59b83cce2 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/account/AccountTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/account/AccountTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,23 +7,26 @@ import org.testng.annotations.Test; +import java.util.Collections; + +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static com.gooddata.sdk.model.account.Account.AuthenticationMode.SSO; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; import static org.hamcrest.text.MatchesPattern.matchesPattern; -import java.util.Arrays; - public class AccountTest { private static final String MAIL = "fake@gooddata.com"; private static final String FIRST_NAME = "Blah"; private static final String LAST_NAME = "Muhehe"; private static final String IP = "1.2.3.4/32"; + private static final String TEST_LOGIN = "testLogin"; + private static final String TEST_PASSWORD = "testPassword"; @SuppressWarnings("deprecation") @Test @@ -37,12 +40,14 @@ public void testDeserialize() throws Exception { assertThat(account.getUri(), is("/gdc/account/profile/ID")); assertThat(account.getProjectsUri(), is("/gdc/account/profile/ID/projects")); assertThat(account.getIpWhitelist(), contains(IP)); + assertThat(account.getAuthenticationModes(), contains(SSO.toString())); } @Test public void testSerialization() { final Account account = new Account(FIRST_NAME, LAST_NAME, null); - account.setIpWhitelist(Arrays.asList("1.2.3.4/32")); + account.setIpWhitelist(Collections.singletonList("1.2.3.4/32")); + account.setAuthenticationModes(Collections.singletonList(SSO.toString())); assertThat(account, jsonEquals(resource("account/account-input.json"))); } @@ -59,4 +64,23 @@ public void testToStringFormat() { assertThat(account.toString(), matchesPattern(Account.class.getSimpleName() + "\\[.*\\]")); } + + @Test + public void testAllParametersConstructor() { + + final Account account = new Account(TEST_LOGIN, MAIL, TEST_PASSWORD, FIRST_NAME, LAST_NAME, + Collections.singletonList(IP), Collections.singletonList(SSO.toString())); + + assertThat(account.getLogin(), is(TEST_LOGIN)); + assertThat(account.getEmail(), is(MAIL)); + assertThat(account.getPassword(), is(TEST_PASSWORD)); + assertThat(account.getVerifyPassword(), is(TEST_PASSWORD)); + assertThat(account.getFirstName(), is(FIRST_NAME)); + assertThat(account.getLastName(), is(LAST_NAME)); + assertThat(account.getIpWhitelist(), contains(IP)); + assertThat(account.getAuthenticationModes(), contains(SSO.toString())); + + + } + } diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/account/AccountsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/account/AccountsTest.java new file mode 100644 index 000000000..b2fd60bdc --- /dev/null +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/account/AccountsTest.java @@ -0,0 +1,40 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.account; + +import org.hamcrest.Matchers; +import org.testng.annotations.Test; + +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.collection.IsCollectionWithSize.hasSize; + +public class AccountsTest { + + private static final String EMAIL = "example@company.com"; + private static final String FIRST_NAME = "Blah"; + private static final String LAST_NAME = "Muhehe"; + private static final String IP = "1.2.3.4/32"; + + private final Accounts accounts = readObjectFromResource("/account/accounts.json", Accounts.class); + + + @Test + public void testDeserialization() throws Exception { + assertThat(accounts, Matchers.notNullValue()); + assertThat(accounts.getPageItems(), hasSize(1)); + final Account account = accounts.getPageItems().get(0); + assertThat(account.getFirstName(), is(FIRST_NAME)); + assertThat(account.getLastName(), is(LAST_NAME)); + assertThat(account.getId(), is("ID")); + assertThat(account.getUri(), is("/gdc/account/profile/ID")); + assertThat(account.getProjectsUri(), is("/gdc/account/profile/ID/projects")); + assertThat(account.getIpWhitelist(), contains(IP)); + assertThat(account.getEmail(), is(EMAIL)); + } +} diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AccessLogTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AccessLogTest.java new file mode 100644 index 000000000..36a3310fa --- /dev/null +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AccessLogTest.java @@ -0,0 +1,47 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.auditevent; + +import org.testng.annotations.Test; + +import java.time.LocalDate; +import java.time.ZonedDateTime; + +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static java.time.ZoneOffset.UTC; +import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; +import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.MatcherAssert.assertThat; + +public class AccessLogTest { + + private static final ZonedDateTime DATE = ZonedDateTime.of(LocalDate.of(1993, 3, 9).atStartOfDay(), UTC); + + private final AccessLog ACCESS_LOG = new AccessLog("123", "visa.gooddata.com", "/gdc/ping", "GET", "200", "2231", "127.0.0.1", DATE, DATE); + + @Test + public void testSerialize() throws Exception { + assertThat(ACCESS_LOG, jsonEquals(resource("auditevents/accessLog.json"))); + } + + @Test + public void testDeserialize() throws Exception { + final AccessLog deserializedObject = readObjectFromResource("/auditevents/accessLog.json", AccessLog.class); + assertThat(deserializedObject, notNullValue()); + assertThat(deserializedObject.getId(), is(ACCESS_LOG.getId())); + assertThat(deserializedObject.getHost(), is(ACCESS_LOG.getHost())); + assertThat(deserializedObject.getPath(), is(ACCESS_LOG.getPath())); + assertThat(deserializedObject.getMethod(), is(ACCESS_LOG.getMethod())); + assertThat(deserializedObject.getCode(), is(ACCESS_LOG.getCode())); + assertThat(deserializedObject.getSize(), is(ACCESS_LOG.getSize())); + assertThat(deserializedObject.getUserIp(), is(ACCESS_LOG.getUserIp())); + assertThat(deserializedObject.getOccurred(), is(ACCESS_LOG.getOccurred())); + assertThat(deserializedObject.getRecorded(), is(ACCESS_LOG.getRecorded())); + } + +} diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AccessLogsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AccessLogsTest.java new file mode 100644 index 000000000..4b2aa2916 --- /dev/null +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AccessLogsTest.java @@ -0,0 +1,75 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.auditevent; + +import com.gooddata.sdk.common.collections.Paging; +import org.springframework.web.util.UriTemplate; +import org.testng.annotations.Test; + +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.Collections; +import java.util.List; + +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static java.time.ZoneOffset.UTC; +import static java.util.Arrays.asList; +import static java.util.Collections.singletonMap; +import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; +import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.hasSize; + +public class AccessLogsTest { + + private static final ZonedDateTime DATE = ZonedDateTime.of(LocalDate.of(1993, 3, 9).atStartOfDay(), UTC); + private static final String DOMAIN = "default"; + private static final String RESOURCE_URI = new UriTemplate(AccessLog.RESOURCE_URI).expand(DOMAIN).toString(); + private static final String RESOURCE_NEXT_URI = RESOURCE_URI + "?offset=456"; + private final AccessLog ACCESS_LOG_1 = new AccessLog("123", "visa.gooddata.com", "/gdc/ping", "GET", "200", "2231", "127.0.0.1", DATE, DATE); + private final AccessLog ACCESS_LOG_2 = new AccessLog("456", "mastercard.gooddata.com", "/gdc/ping", "GET", "200", "2231", "127.0.0.1", DATE, DATE); + private final AccessLogs ACCESS_LOGS = new AccessLogs( + asList(ACCESS_LOG_1, ACCESS_LOG_2), + new Paging(RESOURCE_NEXT_URI), + singletonMap("self", RESOURCE_URI) + ); + + private final AccessLogs EMPTY_ACCESS_LOGS = new AccessLogs( + Collections.emptyList(), + new Paging(null), + singletonMap("self", RESOURCE_URI) + ); + + @Test + public void shouldSerialize() throws Exception { + assertThat(ACCESS_LOGS, jsonEquals(resource("auditevents/accessLogs.json"))); + } + + @Test + public void shouldDeserialize() throws Exception { + final AccessLogs deserialized = readObjectFromResource("/auditevents/accessLogs.json", AccessLogs.class); + assertThat(deserialized.getPaging().getNextUri(), is(RESOURCE_NEXT_URI)); + final List pageItems = deserialized.getPageItems(); + assertThat(pageItems, hasSize(2)); + assertThat(pageItems.get(0).getId(), is(ACCESS_LOG_1.getId())); + assertThat(pageItems.get(1).getId(), is(ACCESS_LOG_2.getId())); + } + + @Test + public void testSerializeEmptyAccessLogs() throws Exception { + assertThat(EMPTY_ACCESS_LOGS, jsonEquals(resource("auditevents/emptyAccessLogs.json"))); + } + + @Test + public void testDeserializeEmptyEvents() throws Exception { + final AccessLogs deserialized = readObjectFromResource("/auditevents/emptyAccessLogs.json", AccessLogs.class); + assertThat(deserialized.getPaging().getNextUri(), nullValue()); + assertThat(deserialized.getPageItems(), hasSize(0)); + } + +} diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AuditEventTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AuditEventTest.java index 8a2bf1d5d..c9abdf134 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AuditEventTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AuditEventTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AuditEventsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AuditEventsTest.java index bff23adc9..49d8e2da6 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AuditEventsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/auditevent/AuditEventsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -45,22 +45,19 @@ public class AuditEventsTest { private static final AuditEvent EVENT_2 = new AuditEvent("456", USER2_LOGIN, DATE, DATE, IP, SUCCESS, TYPE, emptyMap(), emptyMap()); private static final String ADMIN_URI = new UriTemplate(AuditEvent.ADMIN_URI).expand(DOMAIN).toString(); - private static final String USER_URI = new UriTemplate(AuditEvent.USER_URI).expand(USER1_ID).toString(); private static final String ADMIN_NEXT_URI = ADMIN_URI + "?offset=456"; - private static final String USER_NEXT_URI = USER_URI + "?offset=456&limit=1"; - private static final AuditEvents EVENTS = new AuditEvents( asList(EVENT_1, EVENT_2), new Paging(ADMIN_NEXT_URI), singletonMap("self", ADMIN_URI) ); - private static final AuditEvents EMPTY_EVENTS = new AuditEvents( Collections.emptyList(), new Paging(null), singletonMap("self", ADMIN_URI) ); - + private static final String USER_URI = new UriTemplate(AuditEvent.USER_URI).expand(USER1_ID).toString(); + private static final String USER_NEXT_URI = USER_URI + "?offset=456&limit=1"; private static final AuditEvents USER_EVENTS = new AuditEvents( singletonList(EVENT_1), new Paging(USER_NEXT_URI), diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/IntegrationProcessStatusTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/IntegrationProcessStatusTest.java index 05eb2b227..5aa5bfd18 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/IntegrationProcessStatusTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/IntegrationProcessStatusTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,11 +10,11 @@ import java.time.LocalDateTime; import java.util.Collections; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static com.gooddata.sdk.model.connector.Status.Code.ERROR; import static com.gooddata.sdk.model.connector.Status.Code.SYNCHRONIZED; import static com.gooddata.sdk.model.connector.Status.Code.UPLOADING; import static com.gooddata.sdk.model.connector.Status.Code.USER_ERROR; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static java.time.ZoneOffset.UTC; import static java.time.ZonedDateTime.now; import static org.hamcrest.CoreMatchers.is; @@ -104,7 +104,7 @@ public void testIsFailedOnUnknownCode() throws Exception { public void testToStringFormat() { final IntegrationProcessStatus process = new IntegrationProcessStatus(new Status("unknown code", "", ""), now(), now(), Collections.emptyMap()); - assertThat(process.toString(), matchesPattern(IntegrationProcessStatus.class.getSimpleName() + "\\[.*\\]")); + assertThat(process.toString(), matchesPattern(IntegrationProcessStatus.class.getSimpleName() + "\\[.*\\]")); } } diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/IntegrationTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/IntegrationTest.java index 2962a358a..4447eb159 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/IntegrationTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/IntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,9 +7,9 @@ import org.testng.annotations.Test; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ProcessExecutionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ProcessExecutionTest.java index 0457133d4..f61e45322 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ProcessExecutionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ProcessExecutionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ProcessStatusTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ProcessStatusTest.java index c5a6dec33..bd55c7053 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ProcessStatusTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ProcessStatusTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,8 +7,8 @@ import org.testng.annotations.Test; -import static com.gooddata.sdk.model.connector.Status.Code.ERROR; import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static com.gooddata.sdk.model.connector.Status.Code.ERROR; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ReloadTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ReloadTest.java index eaf98de69..8fa59cf3f 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ReloadTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/ReloadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/StatusTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/StatusTest.java index 9f4e1fdf4..729be526f 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/StatusTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/StatusTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/Zendesk4ProcessExecutionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/Zendesk4ProcessExecutionTest.java index c111f25e6..48f6b902b 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/Zendesk4ProcessExecutionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/Zendesk4ProcessExecutionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/Zendesk4SettingsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/Zendesk4SettingsTest.java index c679645b5..dcaba2062 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/Zendesk4SettingsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/connector/Zendesk4SettingsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,9 +7,9 @@ import org.testng.annotations.Test; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static com.gooddata.sdk.model.connector.ConnectorType.ZENDESK4; import static com.gooddata.sdk.model.connector.Zendesk4Settings.Zendesk4Type.plus; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.CoreMatchers.is; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/OutputStageTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/OutputStageTest.java index 34d11bd02..60e7510e6 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/OutputStageTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/OutputStageTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import java.util.LinkedHashMap; import java.util.Map; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.nullValue; import static org.hamcrest.MatcherAssert.assertThat; @@ -23,7 +23,7 @@ public class OutputStageTest { private static final String SCHEMA_URI = "/gdc/datawarehouse/instances/instanceId/schemas/default"; private static final String SELF_LINK = "/gdc/dataload/projects/projectId/outputStage"; - private static final String SQL_DIFF = "/gdc/dataload/projects/projectId/outputStage/sqlDiff"; + private static final String SQL_DIFF = "/gdc/dataload/projects/projectId/outputStage/sqlDiff"; private static final String PROCESS_URI = "/gdc/projects/projectId/dataload/processes/processId"; private static final String CLIENT_ID = "clientId"; private static final String OUTPUT_STAGE_PREFIX = "outputStagePrefix"; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/DataloadProcessTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/DataloadProcessTest.java index 778c6a7e3..024069cc2 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/DataloadProcessTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/DataloadProcessTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,9 +7,9 @@ import org.testng.annotations.Test; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/DataloadProcessesTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/DataloadProcessesTest.java index 191ed9a8c..66861e446 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/DataloadProcessesTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/DataloadProcessesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionDetailTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionDetailTest.java index bfc03dfec..c64e05621 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionDetailTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionDetailTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTaskTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTaskTest.java index f3b5d922a..b590663bd 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTaskTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTaskTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTest.java index 1fb0ba441..50ef9e7f2 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ProcessExecutionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -20,8 +20,8 @@ public class ProcessExecutionTest { @Test public void testSerialization() throws Exception { - final Map params = new HashMap<>(); - final Map hidden = new HashMap<>(); + final Map params = new HashMap<>(); + final Map hidden = new HashMap<>(); params.put("PARAM1", "VALUE1"); params.put("PARAM2", "VALUE2"); hidden.put("HIDDEN_PARAM1", "SENSITIVE_VALUE1"); diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ScheduleExecutionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ScheduleExecutionTest.java index 670767c92..fcd0d0bfa 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ScheduleExecutionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ScheduleExecutionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ScheduleTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ScheduleTest.java index 40e44395a..35c852983 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ScheduleTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/ScheduleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -112,10 +112,10 @@ public void testSerializationWithAllFields() { @DataProvider(name = "scheduleParams") public Object[][] scheduleParams() { - return new Object[][] { - new Object[] {null, EXECUTABLE, "0 0 * * *", "process"}, - new Object[] {process, "garbage", "0 0 * * *", "wrong executable"}, - new Object[] {process, EXECUTABLE, "", "cron can't be empty"} + return new Object[][]{ + new Object[]{null, EXECUTABLE, "0 0 * * *", "process"}, + new Object[]{process, "garbage", "0 0 * * *", "wrong executable"}, + new Object[]{process, EXECUTABLE, "", "cron can't be empty"} }; } diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/SchedulesTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/SchedulesTest.java index fe18ef031..417b97c9a 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/SchedulesTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataload/processes/SchedulesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/DatasetLinksTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/DatasetLinksTest.java index 4f8dcc3c0..8f81c2fe7 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/DatasetLinksTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/DatasetLinksTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/DatasetManifestTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/DatasetManifestTest.java index 5526d481c..8719b7b26 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/DatasetManifestTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/DatasetManifestTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/MaqlDmlTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/MaqlDmlTest.java index 19ccc3476..ade2d50a5 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/MaqlDmlTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/MaqlDmlTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/PullTaskTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/PullTaskTest.java index 7166b20cc..3d3daf343 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/PullTaskTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/PullTaskTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/PullTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/PullTest.java index 26eb13a5c..41c523efe 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/PullTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/PullTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/TaskStateTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/TaskStateTest.java index aeceaaf2e..6d2887deb 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/TaskStateTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/TaskStateTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadStatisticsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadStatisticsTest.java index 41496469d..cef898164 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadStatisticsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadStatisticsTest.java @@ -1,18 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.dataset; +import org.testng.annotations.Test; + import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.text.MatchesPattern.matchesPattern; -import org.testng.annotations.Test; - public class UploadStatisticsTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadTest.java index 5e5ef4ed0..b97e7cfb7 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadsInfoTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadsInfoTest.java index 6074edc8d..cd5dc9bc6 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadsInfoTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadsInfoTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadsTest.java index c361aff7d..4ada9e230 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/dataset/UploadsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ClientExportTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ClientExportTest.java index fb3269825..8ef3dd77b 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ClientExportTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ClientExportTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExecuteReportDefinitionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExecuteReportDefinitionTest.java index 7c213ec91..4c2445426 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExecuteReportDefinitionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExecuteReportDefinitionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExecuteReportTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExecuteReportTest.java index 6557f1b64..fab52630f 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExecuteReportTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExecuteReportTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExportFormatTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExportFormatTest.java index 1ff85c6fc..5b980fa55 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExportFormatTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/export/ExportFormatTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/FeatureFlagTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/FeatureFlagTest.java index d461063c2..30e677aa5 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/FeatureFlagTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/FeatureFlagTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/FeatureFlagsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/FeatureFlagsTest.java index 7162dc762..4fc3bbed5 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/FeatureFlagsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/FeatureFlagsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlagTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlagTest.java index 4119824c2..152ccdd43 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlagTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlagTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlagsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlagsTest.java index 7d6470ec8..eed110229 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlagsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/featureflag/ProjectFeatureFlagsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -63,8 +63,8 @@ public void shouldIterateThroughFlagsInForeach() throws Exception { @Test public void isEnabledShouldReturnCorrectBoolean() throws Exception { final ProjectFeatureFlags flags = new ProjectFeatureFlags(asList( - new ProjectFeatureFlag("enabledFlag", true), - new ProjectFeatureFlag("disabledFlag", false) + new ProjectFeatureFlag("enabledFlag", true), + new ProjectFeatureFlag("disabledFlag", false) )); assertThat(flags.isEnabled("enabledFlag"), is(true)); diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/AboutLinksTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/AboutLinksTest.java index 820bc9adf..178e1b672 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/AboutLinksTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/AboutLinksTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/AsyncTaskTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/AsyncTaskTest.java index a1a17578d..31d0801e1 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/AsyncTaskTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/AsyncTaskTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/LinkEntriesTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/LinkEntriesTest.java index b986431b3..13dad7a64 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/LinkEntriesTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/LinkEntriesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/RootLinksTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/RootLinksTest.java index 31bafb4a6..024362ca2 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/RootLinksTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/RootLinksTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/TaskStatusTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/TaskStatusTest.java index 4d67fbabc..0245da876 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/TaskStatusTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/TaskStatusTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,8 +10,9 @@ import static com.gooddata.sdk.common.util.ResourceUtils.OBJECT_MAPPER; import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; -import static org.hamcrest.Matchers.*; -import static org.hamcrest.MatcherAssert.*; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; public class TaskStatusTest { diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/UriResponseTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/UriResponseTest.java index 25513caa7..efb58c706 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/UriResponseTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/gdc/UriResponseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,9 +8,9 @@ import org.apache.commons.lang3.SerializationUtils; import org.testng.annotations.Test; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItemTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItemTest.java index 53dfa69ac..68dfeb8d9 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItemTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItemTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2021, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItemsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItemsTest.java index d935a161f..caac47a07 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItemsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/hierarchicalconfig/ConfigItemsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2021, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttachmentTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttachmentTest.java index 62ff416d9..04d5769d4 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttachmentTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttachmentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeDisplayFormTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeDisplayFormTest.java index 3ca6ea9b3..bfa4b38ef 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeDisplayFormTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeDisplayFormTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,9 +8,9 @@ import org.apache.commons.lang3.SerializationUtils; import org.testng.annotations.Test; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeElementTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeElementTest.java index c84e4e1d2..461224123 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeElementTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeElementTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeElementsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeElementsTest.java index 2c349a592..1796c7f63 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeElementsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeElementsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeSortTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeSortTest.java index 4e33bc762..a512cc31e 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeSortTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeSortTest.java @@ -1,23 +1,22 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md; -import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; -import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.text.MatchesPattern.matchesPattern; - import com.fasterxml.jackson.databind.JsonMappingException; import org.apache.commons.lang3.SerializationUtils; import org.testng.annotations.Test; import static com.gooddata.sdk.common.util.ResourceUtils.OBJECT_MAPPER; import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; +import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.text.MatchesPattern.matchesPattern; public class AttributeSortTest { diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeTest.java index ef0595073..593e773b5 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/AttributeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import java.util.Collection; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/BulkGetUrisTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/BulkGetUrisTest.java index 05a023599..7208acd8b 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/BulkGetUrisTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/BulkGetUrisTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ColumnTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ColumnTest.java index 44af173b2..ef9ef4866 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ColumnTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ColumnTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DashboardAttachmentTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DashboardAttachmentTest.java index 6fa78b918..1d74a6dd1 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DashboardAttachmentTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DashboardAttachmentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DataLoadingColumnTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DataLoadingColumnTest.java index 06292db96..9547665e0 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DataLoadingColumnTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DataLoadingColumnTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DatasetTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DatasetTest.java index 2e4f6bb9a..2921f52ae 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DatasetTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DatasetTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import java.util.List; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.CoreMatchers.nullValue; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DimensionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DimensionTest.java index 2863ca5a1..50d23ae44 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DimensionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DimensionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import java.util.Collection; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DisplayFormTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DisplayFormTest.java index 132f6c685..ad7a0ceb8 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DisplayFormTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/DisplayFormTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,9 +8,9 @@ import org.apache.commons.lang3.SerializationUtils; import org.testng.annotations.Test; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.CoreMatchers.nullValue; @@ -39,7 +39,7 @@ public void shouldDeserialize() throws Exception { @Test public void testSerialization() throws Exception { final DisplayForm displayForm = new DisplayForm(new Meta("Person Name"), - new DisplayForm.Content(FORM_OF, EXPRESSION, LDM_EXPRESSION, null), new DisplayForm.Links(ELEMENTS_LINK)); + new DisplayForm.Content(FORM_OF, EXPRESSION, LDM_EXPRESSION, null), new DisplayForm.Links(ELEMENTS_LINK)); assertThat(displayForm, jsonEquals(resource("md/displayForm-input.json"))); } @@ -47,7 +47,7 @@ public void testSerialization() throws Exception { @Test public void testToStringFormat() { final DisplayForm displayForm = new DisplayForm(new Meta("Person Name"), - new DisplayForm.Content(FORM_OF, EXPRESSION, LDM_EXPRESSION, null), new DisplayForm.Links(ELEMENTS_LINK)); + new DisplayForm.Content(FORM_OF, EXPRESSION, LDM_EXPRESSION, null), new DisplayForm.Links(ELEMENTS_LINK)); assertThat(displayForm.toString(), matchesPattern(DisplayForm.class.getSimpleName() + "\\[.*\\]")); } @@ -55,7 +55,7 @@ public void testToStringFormat() { @Test public void testSerializable() throws Exception { final DisplayForm displayForm = new DisplayForm(new Meta("Person Name"), - new DisplayForm.Content(FORM_OF, EXPRESSION, LDM_EXPRESSION, null), new DisplayForm.Links(ELEMENTS_LINK)); + new DisplayForm.Content(FORM_OF, EXPRESSION, LDM_EXPRESSION, null), new DisplayForm.Links(ELEMENTS_LINK)); final DisplayForm deserialized = SerializationUtils.roundtrip(displayForm); assertThat(deserialized, jsonEquals(displayForm)); diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/EntryTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/EntryTest.java index e6fc3e654..10cbf96df 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/EntryTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/EntryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ExpressionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ExpressionTest.java index bc9f1fa8c..0b8fa510e 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ExpressionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ExpressionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/FactTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/FactTest.java index 89acf5f11..431f4c1dd 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/FactTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/FactTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,9 +8,9 @@ import org.apache.commons.lang3.SerializationUtils; import org.testng.annotations.Test; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/IdentifierToUriTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/IdentifierToUriTest.java index ab2d83af3..c3331b06e 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/IdentifierToUriTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/IdentifierToUriTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/InUseManyTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/InUseManyTest.java index 0119526f8..f93f4548c 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/InUseManyTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/InUseManyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/KeyTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/KeyTest.java index 09b232f1e..b423a005c 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/KeyTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/KeyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/MetaTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/MetaTest.java index 58935d879..1920c8e70 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/MetaTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/MetaTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/MetricTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/MetricTest.java index 536983acd..61c7edd13 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/MetricTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/MetricTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,8 +8,8 @@ import org.apache.commons.lang3.SerializationUtils; import org.testng.annotations.Test; -import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.JsonMatchers.jsonNodeAbsent; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.CoreMatchers.is; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/NestedAttributeTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/NestedAttributeTest.java index d52198906..46ba3ce6b 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/NestedAttributeTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/NestedAttributeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ObjTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ObjTest.java index 6fe422704..2ac4c306d 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ObjTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ObjTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ProjectDashboardTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ProjectDashboardTest.java index a3aca00b5..8291e94b1 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ProjectDashboardTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ProjectDashboardTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/QueryTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/QueryTest.java index a81e0e1e0..5f570c85d 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/QueryTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/QueryTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ReportAttachmentTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ReportAttachmentTest.java index 68de4fdd5..599bb8edd 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ReportAttachmentTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ReportAttachmentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/RestrictionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/RestrictionTest.java index d09993b03..d11fc2ac7 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/RestrictionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/RestrictionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ScheduledMailTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ScheduledMailTest.java index bbcb73bd2..b24c0c623 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ScheduledMailTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ScheduledMailTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ScheduledMailWhenTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ScheduledMailWhenTest.java index a2722133f..4eeb6f65a 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ScheduledMailWhenTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ScheduledMailWhenTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ServiceTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ServiceTest.java new file mode 100644 index 000000000..5a0612d5b --- /dev/null +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/ServiceTest.java @@ -0,0 +1,32 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.model.md; + +import org.testng.annotations.Test; + +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.MatcherAssert.assertThat; + +public class ServiceTest { + + @Test + public void shouldDeserialize() throws Exception { + final Service service = readObjectFromResource("/md/service-timezone.json", Service.class); + + assertThat(service, is(notNullValue())); + assertThat(service.getTimezone(), is("UTC")); + } + + @Test + public void testToStringFormat() throws Exception { + final Service service = readObjectFromResource("/md/service-timezone.json", Service.class); + + assertThat(service.toString(), is("Service[timezone=UTC]")); + } + +} \ No newline at end of file diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/TableDataLoadTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/TableDataLoadTest.java index b727d39fa..fc358b02f 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/TableDataLoadTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/TableDataLoadTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/TableTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/TableTest.java index 83fb12486..f7a2d651c 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/TableTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/TableTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -26,8 +26,8 @@ public void shouldDeserialize() throws Exception { assertThat(table.getDBName(), is("d_zendesktickets_vehicleview")); assertThat(table.getActiveDataLoad(), is("/gdc/md/PROJECT_ID/obj/625412")); assertThat(table.getDataLoads(), hasItems( - "/gdc/md/PROJECT_ID/obj/625283", - "/gdc/md/PROJECT_ID/obj/625412")); + "/gdc/md/PROJECT_ID/obj/625283", + "/gdc/md/PROJECT_ID/obj/625412")); } @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectArtifactTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectArtifactTest.java index 9de2028d0..6f17a69ad 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectArtifactTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectArtifactTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectTest.java index 5f7f9677a..c329a658c 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectTokenTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectTokenTest.java index e2f9cfb23..b48f30c14 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectTokenTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/ExportProjectTokenTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdArtifactTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdArtifactTest.java index de3bc429f..ed8005815 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdArtifactTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdArtifactTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,9 +8,9 @@ import com.gooddata.sdk.model.gdc.UriResponse; import org.testng.annotations.Test; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.text.MatchesPattern.matchesPattern; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportTest.java index 6b29513e5..a6a821021 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.maintenance; +import org.testng.annotations.Test; + import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.text.MatchesPattern.matchesPattern; -import org.testng.annotations.Test; - public class PartialMdExportTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportTokenTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportTokenTest.java index 895db8225..47ddeade1 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportTokenTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/maintenance/PartialMdExportTokenTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.md.maintenance; +import org.testng.annotations.Test; + import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.text.MatchesPattern.matchesPattern; -import org.testng.annotations.Test; - public class PartialMdExportTokenTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/AttributeInGridTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/AttributeInGridTest.java index 88d6f5489..569a63436 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/AttributeInGridTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/AttributeInGridTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridElementDeserializerTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridElementDeserializerTest.java index 884b27ce0..2a2d223b5 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridElementDeserializerTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridElementDeserializerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -42,6 +42,7 @@ public void testDeserializerWithUnknownType() throws Exception { } @JsonDeserialize(contentUsing = GridElementDeserializer.class) - private static class GridElements extends ArrayList {} + private static class GridElements extends ArrayList { + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridElementSerializerTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridElementSerializerTest.java index 734a1ab2f..edbdbc787 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridElementSerializerTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridElementSerializerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -26,6 +26,7 @@ public void testSerializer() throws Exception { } @JsonSerialize(contentUsing = GridElementSerializer.class) - private static class GridElements extends ArrayList {} + private static class GridElements extends ArrayList { + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridReportDefinitionContentTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridReportDefinitionContentTest.java index 1840d4c09..5074ac4b8 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridReportDefinitionContentTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridReportDefinitionContentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import java.util.Collections; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridTest.java index 4d41d1820..bb8c16e10 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/GridTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -15,8 +15,8 @@ import java.util.List; import java.util.Map; -import static com.gooddata.sdk.model.md.report.MetricGroup.METRIC_GROUP; import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static com.gooddata.sdk.model.md.report.MetricGroup.METRIC_GROUP; import static java.util.Arrays.asList; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/MetricElementTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/MetricElementTest.java index 849377e37..cf0dad539 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/MetricElementTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/MetricElementTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,9 +9,9 @@ import org.apache.commons.lang3.SerializationUtils; import org.testng.annotations.Test; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/OneNumberReportDefinitionContentTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/OneNumberReportDefinitionContentTest.java index c778bfe46..deb07156a 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/OneNumberReportDefinitionContentTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/OneNumberReportDefinitionContentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import java.util.Collections; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; @@ -22,7 +22,7 @@ public class OneNumberReportDefinitionContentTest { @Test public void testDeserialization() throws Exception { final OneNumberReportDefinitionContent def = (OneNumberReportDefinitionContent) - readObjectFromResource("/md/report/oneNumberReportDefinitionContent.json", ReportDefinitionContent.class); + readObjectFromResource("/md/report/oneNumberReportDefinitionContent.json", ReportDefinitionContent.class); assertThat(def, is(notNullValue())); assertThat(def.getFormat(), is("oneNumber")); assertThat(def.getGrid(), is(notNullValue())); diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportDefinitionContentTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportDefinitionContentTest.java index a4b2e05b3..787e92611 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportDefinitionContentTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportDefinitionContentTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import java.util.Collections; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportDefinitionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportDefinitionTest.java index 9e9b5069d..747c32163 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportDefinitionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportDefinitionTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,8 +9,8 @@ import java.util.Collections; -import static java.util.Arrays.asList; import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static java.util.Arrays.asList; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.CoreMatchers.is; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportTest.java index 562da79e8..e93cc3057 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/md/report/ReportTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,9 +8,9 @@ import org.apache.commons.lang3.SerializationUtils; import org.testng.annotations.Test; +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ChannelTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ChannelTest.java index 8d0447b11..f8336d880 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ChannelTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ChannelTest.java @@ -1,10 +1,12 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; +import org.testng.annotations.Test; + import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; @@ -13,8 +15,6 @@ import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.MatcherAssert.assertThat; -import org.testng.annotations.Test; - public class ChannelTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ConditionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ConditionTest.java index 681545dde..eab63ea81 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ConditionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ConditionTest.java @@ -1,18 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; +import org.testng.annotations.Test; + import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -import org.testng.annotations.Test; - public class ConditionTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/EmailConfigurationTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/EmailConfigurationTest.java index eea60ba99..b0a299dd9 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/EmailConfigurationTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/EmailConfigurationTest.java @@ -1,18 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; +import org.testng.annotations.Test; + import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -import org.testng.annotations.Test; - public class EmailConfigurationTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/MessageTemplateTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/MessageTemplateTest.java index df102da41..7d3d7dab8 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/MessageTemplateTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/MessageTemplateTest.java @@ -1,18 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; +import org.testng.annotations.Test; + import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -import org.testng.annotations.Test; - public class MessageTemplateTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ProjectEventTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ProjectEventTest.java index 21a1fdb97..bd110d7d9 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ProjectEventTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/ProjectEventTest.java @@ -1,18 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; +import nl.jqno.equalsverifier.EqualsVerifier; +import org.testng.annotations.Test; + import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.text.MatchesPattern.matchesPattern; -import nl.jqno.equalsverifier.EqualsVerifier; -import org.testng.annotations.Test; - public class ProjectEventTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/SubscriptionTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/SubscriptionTest.java index dceb4082a..95b9305b1 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/SubscriptionTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/SubscriptionTest.java @@ -1,10 +1,15 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; +import com.gooddata.sdk.model.md.Meta; +import org.testng.annotations.Test; + +import java.util.Arrays; + import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static java.util.Collections.singletonList; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; @@ -15,11 +20,6 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.hasSize; -import com.gooddata.sdk.model.md.Meta; -import org.testng.annotations.Test; - -import java.util.Arrays; - public class SubscriptionTest { @Test @@ -69,10 +69,10 @@ public void testDeserializationWithSubject() { assertThat(subscription.getTemplate().getExpression(), is("test message")); assertThat(subscription.getCondition().getExpression(), is("true")); assertThat(subscription.getChannels().get(0), is("/gdc/account/profile/876ec68f5630b38de65852ed5d6236ff/channelConfigurations/59dca62e60b2c601f3c72e18")); - assertThat(subscription.getMeta().getTitle(), is ("test subscription")); + assertThat(subscription.getMeta().getTitle(), is("test subscription")); Trigger trigger = subscription.getTriggers().get(0); assertThat(trigger, instanceOf(TimerEvent.class)); - assertThat(((TimerEvent)trigger).getCronExpression(), is("0 * * * * *")); + assertThat(((TimerEvent) trigger).getCronExpression(), is("0 * * * * *")); } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/TimerEventTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/TimerEventTest.java index 746027cb2..f7b32beaa 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/TimerEventTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/notification/TimerEventTest.java @@ -1,18 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.notification; +import org.testng.annotations.Test; + import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -import org.testng.annotations.Test; - public class TimerEventTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/CreatedInvitationsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/CreatedInvitationsTest.java index 32bc7841c..df74f33ee 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/CreatedInvitationsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/CreatedInvitationsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/InvitationsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/InvitationsTest.java index 9d1e4d24b..fde652a1b 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/InvitationsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/InvitationsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTemplateTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTemplateTest.java index 9336c2e6f..2b35c3067 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTemplateTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTemplateTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTemplatesTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTemplatesTest.java index 6eebcbaee..5b300e068 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTemplatesTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTemplatesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTest.java index 3ce547c9b..d9b6f86bc 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -58,7 +58,6 @@ public void testDeserialize() throws Exception { assertThat(project.getExecuteUri(), is("/gdc/projects/PROJECT_ID/execute")); assertThat(project.getSchedulesUri(), is("/gdc/projects/PROJECT_ID/schedules")); assertThat(project.getTemplatesUri(), is("/gdc/md/PROJECT_ID/templates")); - assertThat(project.getEventStoresUri(), is("/gdc/projects/PROJECT_ID/dataload/eventstore/stores")); } @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectUsersUpdateResultTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectUsersUpdateResultTest.java index f3ddb752c..daf362fa9 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectUsersUpdateResultTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectUsersUpdateResultTest.java @@ -1,20 +1,19 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.project; -import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import org.testng.annotations.Test; +import java.util.Arrays; + +import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static java.util.Collections.emptyList; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -import org.testng.annotations.Test; - -import java.util.Arrays; - public class ProjectUsersUpdateResultTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultGdcTimeElParamTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultGdcTimeElParamTest.java index a0ed9e7c5..cb8ecfa67 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultGdcTimeElParamTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultGdcTimeElParamTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultItemTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultItemTest.java index 0b8863ff7..e33896da7 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultItemTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultItemTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultObjectParamTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultObjectParamTest.java index 9c245938f..1724ce2a5 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultObjectParamTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultObjectParamTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultParamTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultParamTest.java index acaac41a7..c6d9bdd91 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultParamTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultParamTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -23,7 +23,8 @@ public class ProjectValidationResultParamTest { public void testDeser() throws Exception { final List result = OBJECT_MAPPER .readValue(readFromResource("/project/project-validationResultParam.json"), - new TypeReference>() { }); + new TypeReference>() { + }); assertThat(result, hasItem(sameBeanAs(new ProjectValidationResultStringParam("report")))); assertThat(result, hasItem(sameBeanAs(new ProjectValidationResultObjectParam("Historical backlog", "/gdc/md/d45dlwq6fixqsgbukrlnir1qsw8y44q6/obj/41886")))); diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultSliElParamTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultSliElParamTest.java index 2548c32ef..b9d0a8831 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultSliElParamTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultSliElParamTest.java @@ -1,22 +1,22 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.project; -import static java.util.Arrays.asList; -import static java.util.Collections.singletonList; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.nullValue; - import nl.jqno.equalsverifier.EqualsVerifier; import org.testng.annotations.Test; import java.util.HashMap; import java.util.Map; +import static java.util.Arrays.asList; +import static java.util.Collections.singletonList; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.nullValue; + public class ProjectValidationResultSliElParamTest { @Test diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultStringParamTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultStringParamTest.java index a53a2845b..a6695abd5 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultStringParamTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultStringParamTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultTest.java index 10cb682f7..70f70623e 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultsTest.java index 55a7b8939..947095ee2 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationResultsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationTypeTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationTypeTest.java index 1b502a7a6..4a82aad2b 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationTypeTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationTypeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationsTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationsTest.java index 2e9e98dad..49bda7746 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationsTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/ProjectValidationsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,13 +7,21 @@ import org.testng.annotations.Test; -import static com.gooddata.sdk.model.project.ProjectValidationType.*; import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static com.gooddata.sdk.model.project.ProjectValidationType.INVALID_OBJECTS; +import static com.gooddata.sdk.model.project.ProjectValidationType.LDM; +import static com.gooddata.sdk.model.project.ProjectValidationType.METRIC_FILTER; +import static com.gooddata.sdk.model.project.ProjectValidationType.PDM_ELEM; +import static com.gooddata.sdk.model.project.ProjectValidationType.PDM_PK_FK_CONSISTENCY; +import static com.gooddata.sdk.model.project.ProjectValidationType.PDM_TRANSITIVITY; +import static com.gooddata.sdk.model.project.ProjectValidationType.PDM_VS_DWH; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.Option.IGNORING_ARRAY_ORDER; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.hasItems; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; public class ProjectValidationsTest { diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/RoleTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/RoleTest.java index 97a8e3c45..df619c827 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/RoleTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/RoleTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/RolesTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/RolesTest.java index caf05fd09..73d16dc30 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/RolesTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/RolesTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/UserTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/UserTest.java index 8f95942e8..87f33bd17 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/UserTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/UserTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/UsersTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/UsersTest.java index 9a1376c33..c501c319d 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/UsersTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/UsersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/DiffRequestTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/DiffRequestTest.java index 4b6b4dd4e..0e18affc9 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/DiffRequestTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/DiffRequestTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/MaqlDdlLinksTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/MaqlDdlLinksTest.java index 77cea6065..789aa74ab 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/MaqlDdlLinksTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/MaqlDdlLinksTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/MaqlDdlTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/MaqlDdlTest.java index 3a3cbb5fd..b752ecf3b 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/MaqlDdlTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/MaqlDdlTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/ModelDiffTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/ModelDiffTest.java index 8ecfe194f..7e59ea677 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/ModelDiffTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/project/model/ModelDiffTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,8 +9,8 @@ import java.util.Collections; -import static com.gooddata.sdk.model.project.model.ModelDiff.UpdateScript; import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; +import static com.gooddata.sdk.model.project.model.ModelDiff.UpdateScript; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.contains; diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/projecttemplate/TemplateTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/projecttemplate/TemplateTest.java index b077ed44b..bce1cebfa 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/projecttemplate/TemplateTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/projecttemplate/TemplateTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsDeserializerTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsDeserializerTest.java index c7c3df7c5..09e3eed85 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsDeserializerTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsDeserializerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsSerializerTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsSerializerTest.java index 892b19dd4..6e16274e9 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsSerializerTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsSerializerTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsTestClass.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsTestClass.java index 1b82b66ed..e22f02ec3 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsTestClass.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/util/TagsTestClass.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseSchemaTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseSchemaTest.java index 7d8aee6e9..9cbead865 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseSchemaTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseSchemaTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseSchemasTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseSchemasTest.java index 292bd8ac5..e9852ff71 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseSchemasTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseSchemasTest.java @@ -1,18 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.warehouse; +import org.testng.annotations.Test; + import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.collection.IsCollectionWithSize.hasSize; import static org.hamcrest.core.Is.is; -import org.testng.annotations.Test; - public class WarehouseSchemasTest { private final WarehouseSchemas warehouseSchemas = readObjectFromResource("/warehouse/schemas.json", WarehouseSchemas.class); diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseTaskTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseTaskTest.java index 06ce3dac0..893118126 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseTaskTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseTaskTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseTest.java index dc24cd046..3cfb61271 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -27,7 +27,6 @@ public class WarehouseTest { public static final String TITLE = "Test"; public static final String TOKEN = "{Token}"; public static final String DESCRIPTION = "Storage"; - private static final String ENVIRONMENT = "TESTING"; public static final ZonedDateTime CREATED = LocalDateTime.of(2014, 5, 5, 8, 27, 33).atZone(UTC); public static final ZonedDateTime UPDATED = LocalDateTime.of(2014, 5, 5, 8, 27, 34).atZone(UTC); public static final String CREATED_BY = "/gdc/account/profile/createdBy"; @@ -41,6 +40,7 @@ public class WarehouseTest { put("users", "/gdc/datawarehouse/instances/instanceId/users"); put("jdbc", "/gdc/datawarehouse/instances/instanceId/jdbc"); }}; + private static final String ENVIRONMENT = "TESTING"; @Test public void testSerializationForInstanceCreation() throws Exception { diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseUserTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseUserTest.java index 428bd0848..a0b33d95b 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseUserTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseUserTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseUsersTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseUsersTest.java index 960500044..82679ff17 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseUsersTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehouseUsersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehousesTest.java b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehousesTest.java index b9c88d291..a62919f72 100644 --- a/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehousesTest.java +++ b/gooddata-java-model/src/test/java/com/gooddata/sdk/model/warehouse/WarehousesTest.java @@ -1,21 +1,21 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.model.warehouse; +import org.testng.annotations.Test; + +import java.util.Collections; + import static com.gooddata.sdk.common.util.ResourceUtils.readObjectFromResource; import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals; import static net.javacrumbs.jsonunit.core.util.ResourceUtils.resource; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.collection.IsCollectionWithSize.hasSize; import static org.hamcrest.core.Is.is; -import static org.hamcrest.MatcherAssert.*; - -import org.testng.annotations.Test; - -import java.util.Collections; public class WarehousesTest { diff --git a/gooddata-java-model/src/test/resources/account/account-input.json b/gooddata-java-model/src/test/resources/account/account-input.json index a14eee3c3..51aa35828 100644 --- a/gooddata-java-model/src/test/resources/account/account-input.json +++ b/gooddata-java-model/src/test/resources/account/account-input.json @@ -1,7 +1,12 @@ { - "accountSetting" : { - "firstName" : "Blah", - "lastName" : "Muhehe", - "ipWhitelist" : ["1.2.3.4/32"] - } + "accountSetting": { + "firstName": "Blah", + "lastName": "Muhehe", + "ipWhitelist": [ + "1.2.3.4/32" + ], + "authenticationModes": [ + "SSO" + ] + } } diff --git a/gooddata-java-model/src/test/resources/account/account.json b/gooddata-java-model/src/test/resources/account/account.json index 27c7e9d42..bfa940f0c 100644 --- a/gooddata-java-model/src/test/resources/account/account.json +++ b/gooddata-java-model/src/test/resources/account/account.json @@ -1,22 +1,26 @@ { - "accountSetting" : { - "country" : null, - "firstName" : "Blah", - "ssoProvider" : null, - "timezone" : null, - "position" : null, - "authenticationModes" : [], - "companyName" : "gdc", - "login" : "fake@gooddata.com", - "email" : "fake@gooddata.com", - "created" : "2013-12-17 19:08:20", - "updated" : "2013-12-17 19:16:09", - "lastName" : "Muhehe", - "phoneNumber" : "123", - "ipWhitelist" : ["1.2.3.4/32"], - "links" : { - "self" : "/gdc/account/profile/ID", - "projects" : "/gdc/account/profile/ID/projects" - } + "accountSetting": { + "country": null, + "firstName": "Blah", + "ssoProvider": null, + "timezone": null, + "position": null, + "authenticationModes": [ + "SSO" + ], + "companyName": "gdc", + "login": "fake@gooddata.com", + "email": "fake@gooddata.com", + "created": "2013-12-17 19:08:20", + "updated": "2013-12-17 19:16:09", + "lastName": "Muhehe", + "phoneNumber": "123", + "ipWhitelist": [ + "1.2.3.4/32" + ], + "links": { + "self": "/gdc/account/profile/ID", + "projects": "/gdc/account/profile/ID/projects" } + } } diff --git a/gooddata-java-model/src/test/resources/account/accounts.json b/gooddata-java-model/src/test/resources/account/accounts.json new file mode 100644 index 000000000..d852722c6 --- /dev/null +++ b/gooddata-java-model/src/test/resources/account/accounts.json @@ -0,0 +1,34 @@ +{ + "accountSettings": { + "items": [ + { + "accountSetting": { + "companyName": null, + "country": null, + "created": "2014-02-24 18:51:53", + "firstName": "Blah", + "lastName": "Muhehe", + "login": "example@company.com", + "phoneNumber": null, + "position": null, + "timezone": null, + "updated": "2014-02-24 18:51:53", + "email": "example@company.com", + "language": "language", + "ipWhitelist": [ + "1.2.3.4/32" + ], + "effectiveIpWhitelist": null, + "links": { + "projects": "/gdc/account/profile/ID/projects", + "self": "/gdc/account/profile/ID" + } + } + } + ], + "paging": { + "offset": 0, + "count": 1 + } + } +} \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/account/create-account.json b/gooddata-java-model/src/test/resources/account/create-account.json index 090d518ad..5d75f6c19 100644 --- a/gooddata-java-model/src/test/resources/account/create-account.json +++ b/gooddata-java-model/src/test/resources/account/create-account.json @@ -1,10 +1,10 @@ { - "accountSetting" : { - "login": "fake@gooddata.com", - "email": "fake@gooddata.com", - "password": "password", - "verifyPassword": "password", - "firstName" : "Blah", - "lastName" : "Muhehe" - } + "accountSetting": { + "login": "fake@gooddata.com", + "email": "fake@gooddata.com", + "password": "password", + "verifyPassword": "password", + "firstName": "Blah", + "lastName": "Muhehe" + } } diff --git a/gooddata-java-model/src/test/resources/account/separators.json b/gooddata-java-model/src/test/resources/account/separators.json index b8e695a60..76266e2d6 100644 --- a/gooddata-java-model/src/test/resources/account/separators.json +++ b/gooddata-java-model/src/test/resources/account/separators.json @@ -1,9 +1,9 @@ { - "separators" : { - "thousand" : "::", - "decimal" : "||", - "links" : { - "self" : "/gdc/account/profile/ID/settings/separators" + "separators": { + "thousand": "::", + "decimal": "||", + "links": { + "self": "/gdc/account/profile/ID/settings/separators" } } } diff --git a/gooddata-java-model/src/test/resources/auditevents/accessLog.json b/gooddata-java-model/src/test/resources/auditevents/accessLog.json new file mode 100644 index 000000000..118b2e965 --- /dev/null +++ b/gooddata-java-model/src/test/resources/auditevents/accessLog.json @@ -0,0 +1,13 @@ +{ + "accessLog": { + "id": "123", + "host": "visa.gooddata.com", + "path": "/gdc/ping", + "method": "GET", + "code": "200", + "size": "2231", + "userIp": "127.0.0.1", + "occurred": "1993-03-09T00:00:00.000Z", + "recorded": "1993-03-09T00:00:00.000Z" + } +} diff --git a/gooddata-java-model/src/test/resources/auditevents/accessLogs.json b/gooddata-java-model/src/test/resources/auditevents/accessLogs.json new file mode 100644 index 000000000..0c8d59ecd --- /dev/null +++ b/gooddata-java-model/src/test/resources/auditevents/accessLogs.json @@ -0,0 +1,38 @@ +{ + "accessLogs": { + "items": [ + { + "accessLog": { + "id": "123", + "host": "visa.gooddata.com", + "path": "/gdc/ping", + "method": "GET", + "code": "200", + "size": "2231", + "userIp": "127.0.0.1", + "occurred": "1993-03-09T00:00:00.000Z", + "recorded": "1993-03-09T00:00:00.000Z" + } + }, + { + "accessLog": { + "id": "456", + "host": "mastercard.gooddata.com", + "path": "/gdc/ping", + "method": "GET", + "code": "200", + "size": "2231", + "userIp": "127.0.0.1", + "occurred": "1993-03-09T00:00:00.000Z", + "recorded": "1993-03-09T00:00:00.000Z" + } + } + ], + "paging": { + "next": "/gdc/domains/default/accessLogs?offset=456" + }, + "links": { + "self": "/gdc/domains/default/accessLogs" + } + } +} diff --git a/gooddata-java-model/src/test/resources/auditevents/auditEventWithParam.json b/gooddata-java-model/src/test/resources/auditevents/auditEventWithParam.json index 342c277c2..9eef45cce 100644 --- a/gooddata-java-model/src/test/resources/auditevents/auditEventWithParam.json +++ b/gooddata-java-model/src/test/resources/auditevents/auditEventWithParam.json @@ -7,8 +7,8 @@ "userIp": "127.0.0.1", "success": true, "type": "login", - "params" : { - "KEY" : "VALUE" + "params": { + "KEY": "VALUE" } } } diff --git a/gooddata-java-model/src/test/resources/auditevents/auditEventWithParamAndLink.json b/gooddata-java-model/src/test/resources/auditevents/auditEventWithParamAndLink.json index 1515d0867..414529fe4 100644 --- a/gooddata-java-model/src/test/resources/auditevents/auditEventWithParamAndLink.json +++ b/gooddata-java-model/src/test/resources/auditevents/auditEventWithParamAndLink.json @@ -7,11 +7,11 @@ "userIp": "127.0.0.1", "success": true, "type": "login", - "params" : { - "KEY" : "VALUE" + "params": { + "KEY": "VALUE" }, - "links" : { - "LINK_KEY" : "LINK_VALUE" + "links": { + "LINK_KEY": "LINK_VALUE" } } } diff --git a/gooddata-java-model/src/test/resources/auditevents/emptyAccessLogs.json b/gooddata-java-model/src/test/resources/auditevents/emptyAccessLogs.json new file mode 100644 index 000000000..a2f22f479 --- /dev/null +++ b/gooddata-java-model/src/test/resources/auditevents/emptyAccessLogs.json @@ -0,0 +1,11 @@ +{ + "accessLogs": { + "items": [ + ], + "paging": { + }, + "links": { + "self": "/gdc/domains/default/accessLogs" + } + } +} \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/integration-in.json b/gooddata-java-model/src/test/resources/connector/integration-in.json index cea21f61f..0051a4da4 100644 --- a/gooddata-java-model/src/test/resources/connector/integration-in.json +++ b/gooddata-java-model/src/test/resources/connector/integration-in.json @@ -1,6 +1,6 @@ { - "integration": { - "projectTemplate": "template", - "active": true - } + "integration": { + "projectTemplate": "template", + "active": true + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/integration.json b/gooddata-java-model/src/test/resources/connector/integration.json index 4f2d2fe81..b4e432baf 100644 --- a/gooddata-java-model/src/test/resources/connector/integration.json +++ b/gooddata-java-model/src/test/resources/connector/integration.json @@ -1,37 +1,37 @@ { - "integration" : { - "projectTemplate" : "/projectTemplates/template", - "active" : true, - "lastFinishedProcess" : { - "status" : { - "code" : "ERROR", - "detail" : "GDC-INTERNAL-ERROR", - "description" : "Data load unsuccessful. Please check your settings and try again or contact us at support@gooddata.com" + "integration": { + "projectTemplate": "/projectTemplates/template", + "active": true, + "lastFinishedProcess": { + "status": { + "code": "ERROR", + "detail": "GDC-INTERNAL-ERROR", + "description": "Data load unsuccessful. Please check your settings and try again or contact us at support@gooddata.com" }, - "started" : "2014-05-30T07:50:15.000Z", - "finished" : "2014-05-30T07:50:50.000Z", - "links" : { - "self" : "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/processes/FINISHED_PROCESS_ID" + "started": "2014-05-30T07:50:15.000Z", + "finished": "2014-05-30T07:50:50.000Z", + "links": { + "self": "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/processes/FINISHED_PROCESS_ID" } }, - "lastSuccessfulProcess" : { - "status" : { - "code" : "SYNCHRONIZED", - "detail" : null, - "description" : null + "lastSuccessfulProcess": { + "status": { + "code": "SYNCHRONIZED", + "detail": null, + "description": null }, - "started" : "2014-04-30T07:50:15.000Z", - "finished" : "2014-04-30T07:50:50.000Z", - "links" : { - "self" : "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/processes/SUCCESSFUL_PROCESS_ID" + "started": "2014-04-30T07:50:15.000Z", + "finished": "2014-04-30T07:50:50.000Z", + "links": { + "self": "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/processes/SUCCESSFUL_PROCESS_ID" } }, - "runningProcess" : null, - "links" : { - "self" : "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration", - "processes" : "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/processes", - "configuration" : "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/settings" + "runningProcess": null, + "links": { + "self": "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration", + "processes": "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/processes", + "configuration": "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/settings" }, - "ui" : { } + "ui": {} } } diff --git a/gooddata-java-model/src/test/resources/connector/process-execution-coupa-downloadDate.json b/gooddata-java-model/src/test/resources/connector/process-execution-coupa-downloadDate.json index 98aa98d75..203a9b0c2 100644 --- a/gooddata-java-model/src/test/resources/connector/process-execution-coupa-downloadDate.json +++ b/gooddata-java-model/src/test/resources/connector/process-execution-coupa-downloadDate.json @@ -1,5 +1,5 @@ { - "process": { - "downloadDataFrom": "2018-01-25" - } + "process": { + "downloadDataFrom": "2018-01-25" + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/process-execution-empty.json b/gooddata-java-model/src/test/resources/connector/process-execution-empty.json index ebad9073d..31bcb05b5 100644 --- a/gooddata-java-model/src/test/resources/connector/process-execution-empty.json +++ b/gooddata-java-model/src/test/resources/connector/process-execution-empty.json @@ -1,3 +1,3 @@ { - "process": {} + "process": {} } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/process-execution-incremental.json b/gooddata-java-model/src/test/resources/connector/process-execution-incremental.json index df16141de..bb1fd1c42 100644 --- a/gooddata-java-model/src/test/resources/connector/process-execution-incremental.json +++ b/gooddata-java-model/src/test/resources/connector/process-execution-incremental.json @@ -1,5 +1,5 @@ { - "process": { - "incremental": true - } + "process": { + "incremental": true + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/process-execution-pardot-changesFrom.json b/gooddata-java-model/src/test/resources/connector/process-execution-pardot-changesFrom.json index 79494f34c..e7967c2b5 100644 --- a/gooddata-java-model/src/test/resources/connector/process-execution-pardot-changesFrom.json +++ b/gooddata-java-model/src/test/resources/connector/process-execution-pardot-changesFrom.json @@ -1,5 +1,5 @@ { - "process": { - "changesFrom": "2018-01-25" - } + "process": { + "changesFrom": "2018-01-25" + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/process-execution-recoverable.json b/gooddata-java-model/src/test/resources/connector/process-execution-recoverable.json index 5630186b4..ed8dfae18 100644 --- a/gooddata-java-model/src/test/resources/connector/process-execution-recoverable.json +++ b/gooddata-java-model/src/test/resources/connector/process-execution-recoverable.json @@ -1,5 +1,5 @@ { - "process": { - "recoverable": true - } + "process": { + "recoverable": true + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/process-execution-recoveryInProgress.json b/gooddata-java-model/src/test/resources/connector/process-execution-recoveryInProgress.json index 2b2970650..14305a70b 100644 --- a/gooddata-java-model/src/test/resources/connector/process-execution-recoveryInProgress.json +++ b/gooddata-java-model/src/test/resources/connector/process-execution-recoveryInProgress.json @@ -1,5 +1,5 @@ { - "process": { - "recoveryInProgress": true - } + "process": { + "recoveryInProgress": true + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/process-execution-reload.json b/gooddata-java-model/src/test/resources/connector/process-execution-reload.json index 356349bd6..5a28a090b 100644 --- a/gooddata-java-model/src/test/resources/connector/process-execution-reload.json +++ b/gooddata-java-model/src/test/resources/connector/process-execution-reload.json @@ -1,5 +1,5 @@ { - "process": { - "reload": true - } + "process": { + "reload": true + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/process-execution-zendesk4-download.json b/gooddata-java-model/src/test/resources/connector/process-execution-zendesk4-download.json index 42ccc4838..7f266d10f 100644 --- a/gooddata-java-model/src/test/resources/connector/process-execution-zendesk4-download.json +++ b/gooddata-java-model/src/test/resources/connector/process-execution-zendesk4-download.json @@ -1,9 +1,9 @@ { - "process": { - "downloadParams": { - "useBackup": true, - "parallelWorkers": 5, - "parallelBatchSeconds": 3600 - } + "process": { + "downloadParams": { + "useBackup": true, + "parallelWorkers": 5, + "parallelBatchSeconds": 3600 } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/process-execution-zendesk4-startDate.json b/gooddata-java-model/src/test/resources/connector/process-execution-zendesk4-startDate.json index 3f2042132..540ed5eea 100644 --- a/gooddata-java-model/src/test/resources/connector/process-execution-zendesk4-startDate.json +++ b/gooddata-java-model/src/test/resources/connector/process-execution-zendesk4-startDate.json @@ -1,6 +1,6 @@ { - "process": { - "incremental": true, - "ticketsStartDate": "1970-01-01T00:00:00.000Z" - } + "process": { + "incremental": true, + "ticketsStartDate": "1970-01-01T00:00:00.000Z" + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/process-status-embedded.json b/gooddata-java-model/src/test/resources/connector/process-status-embedded.json index b85283a18..2f6adc857 100644 --- a/gooddata-java-model/src/test/resources/connector/process-status-embedded.json +++ b/gooddata-java-model/src/test/resources/connector/process-status-embedded.json @@ -1,12 +1,12 @@ { - "status": { - "code": "ERROR", - "detail": "GDC-INTERNAL-ERROR", - "description": null - }, - "started": "2014-05-30T07:50:15.000Z", - "finished": "2014-05-30T07:50:50.000Z", - "links": { - "self": "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/processes/FINISHED_PROCESS_ID" - } + "status": { + "code": "ERROR", + "detail": "GDC-INTERNAL-ERROR", + "description": null + }, + "started": "2014-05-30T07:50:15.000Z", + "finished": "2014-05-30T07:50:50.000Z", + "links": { + "self": "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/processes/FINISHED_PROCESS_ID" + } } diff --git a/gooddata-java-model/src/test/resources/connector/process-status-error.json b/gooddata-java-model/src/test/resources/connector/process-status-error.json index 86a5d542e..2f92c0673 100644 --- a/gooddata-java-model/src/test/resources/connector/process-status-error.json +++ b/gooddata-java-model/src/test/resources/connector/process-status-error.json @@ -1,14 +1,14 @@ { - "process" : { - "status" : { - "code" : "ERROR", - "detail" : "GDC-INTERNAL-ERROR", - "description" : "Data load unsuccessful. Please check your settings and try again or contact us at support@gooddata.com" + "process": { + "status": { + "code": "ERROR", + "detail": "GDC-INTERNAL-ERROR", + "description": "Data load unsuccessful. Please check your settings and try again or contact us at support@gooddata.com" }, - "started" : "2014-04-29T13:13:41.000Z", - "finished" : "2014-04-29T13:14:14.000Z", - "links" : { - "self" : "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/processes/PROCESS_ID" + "started": "2014-04-29T13:13:41.000Z", + "finished": "2014-04-29T13:14:14.000Z", + "links": { + "self": "/gdc/projects/PROJECT_ID/connectors/zendesk4/integration/processes/PROCESS_ID" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/settings-zendesk4-before-template26.json b/gooddata-java-model/src/test/resources/connector/settings-zendesk4-before-template26.json index 415a120fe..49b5180c9 100644 --- a/gooddata-java-model/src/test/resources/connector/settings-zendesk4-before-template26.json +++ b/gooddata-java-model/src/test/resources/connector/settings-zendesk4-before-template26.json @@ -1,8 +1,8 @@ { - "settings" : { - "apiUrl" : "https://foo.com", - "type" : "plus", - "syncTime" : "12am", - "syncTimeZone" : "America/Los_Angeles" + "settings": { + "apiUrl": "https://foo.com", + "type": "plus", + "syncTime": "12am", + "syncTimeZone": "America/Los_Angeles" } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/connector/settings-zendesk4.json b/gooddata-java-model/src/test/resources/connector/settings-zendesk4.json index 5636096ed..6331ff971 100644 --- a/gooddata-java-model/src/test/resources/connector/settings-zendesk4.json +++ b/gooddata-java-model/src/test/resources/connector/settings-zendesk4.json @@ -1,10 +1,10 @@ { - "settings" : { - "apiUrl" : "https://foo.com", - "zopimUrl" : "zopim.com", - "account" : "testAccount", - "type" : "plus", - "syncTime" : "12am", - "syncTimeZone" : "America/Los_Angeles" + "settings": { + "apiUrl": "https://foo.com", + "zopimUrl": "zopim.com", + "account": "testAccount", + "type": "plus", + "syncTime": "12am", + "syncTimeZone": "America/Los_Angeles" } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/outputStage.json b/gooddata-java-model/src/test/resources/dataload/outputStage.json index bb8aa0708..32e1969cd 100644 --- a/gooddata-java-model/src/test/resources/dataload/outputStage.json +++ b/gooddata-java-model/src/test/resources/dataload/outputStage.json @@ -1,8 +1,8 @@ { - "outputStage" : { - "links" : { - "self" : "/gdc/dataload/projects/projectId/outputStage", - "outputStageDiff" : "/gdc/dataload/projects/projectId/outputStage/sqlDiff" + "outputStage": { + "links": { + "self": "/gdc/dataload/projects/projectId/outputStage", + "outputStageDiff": "/gdc/dataload/projects/projectId/outputStage/sqlDiff" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/outputStageAllFields.json b/gooddata-java-model/src/test/resources/dataload/outputStageAllFields.json index 5044ff6d1..a22286935 100644 --- a/gooddata-java-model/src/test/resources/dataload/outputStageAllFields.json +++ b/gooddata-java-model/src/test/resources/dataload/outputStageAllFields.json @@ -1,12 +1,12 @@ { - "outputStage" : { - "schema" : "/gdc/datawarehouse/instances/instanceId/schemas/default", - "clientId" : "clientId", - "outputStagePrefix" : "outputStagePrefix", - "links" : { - "self" : "/gdc/dataload/projects/projectId/outputStage", - "outputStageDiff" : "/gdc/dataload/projects/projectId/outputStage/sqlDiff", - "dataloadProcess" : "/gdc/projects/projectId/dataload/processes/processId" + "outputStage": { + "schema": "/gdc/datawarehouse/instances/instanceId/schemas/default", + "clientId": "clientId", + "outputStagePrefix": "outputStagePrefix", + "links": { + "self": "/gdc/dataload/projects/projectId/outputStage", + "outputStageDiff": "/gdc/dataload/projects/projectId/outputStage/sqlDiff", + "dataloadProcess": "/gdc/projects/projectId/dataload/processes/processId" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/outputStageNoProcess.json b/gooddata-java-model/src/test/resources/dataload/outputStageNoProcess.json index 8f1ae3caa..30c40bf45 100644 --- a/gooddata-java-model/src/test/resources/dataload/outputStageNoProcess.json +++ b/gooddata-java-model/src/test/resources/dataload/outputStageNoProcess.json @@ -1,11 +1,11 @@ { - "outputStage" : { - "schema" : "/gdc/datawarehouse/instances/instanceId/schemas/default", - "clientId" : "clientId", - "outputStagePrefix" : "outputStagePrefix", - "links" : { - "self" : "/gdc/dataload/projects/projectId/outputStage", - "outputStageDiff" : "/gdc/dataload/projects/projectId/outputStage/sqlDiff" + "outputStage": { + "schema": "/gdc/datawarehouse/instances/instanceId/schemas/default", + "clientId": "clientId", + "outputStagePrefix": "outputStagePrefix", + "links": { + "self": "/gdc/dataload/projects/projectId/outputStage", + "outputStageDiff": "/gdc/dataload/projects/projectId/outputStage/sqlDiff" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/processes/emptyScheduleExecution.json b/gooddata-java-model/src/test/resources/dataload/processes/emptyScheduleExecution.json index dcbad84f1..d0bd6c3ab 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/emptyScheduleExecution.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/emptyScheduleExecution.json @@ -1,4 +1,4 @@ { - "execution" : { + "execution": { } } diff --git a/gooddata-java-model/src/test/resources/dataload/processes/execution.json b/gooddata-java-model/src/test/resources/dataload/processes/execution.json index 560c37c56..2eb887fa2 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/execution.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/execution.json @@ -1,13 +1,13 @@ { - "execution" : { - "executable" : "test.groovy", - "params" : { - "PARAM1" : "VALUE1", - "PARAM2" : "VALUE2" - }, - "hiddenParams" : { - "HIDDEN_PARAM1" : "SENSITIVE_VALUE1", - "HIDDEN_PARAM2" : "SENSITIVE_VALUE2" - } + "execution": { + "executable": "test.groovy", + "params": { + "PARAM1": "VALUE1", + "PARAM2": "VALUE2" + }, + "hiddenParams": { + "HIDDEN_PARAM1": "SENSITIVE_VALUE1", + "HIDDEN_PARAM2": "SENSITIVE_VALUE2" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/processes/executionDetail.json b/gooddata-java-model/src/test/resources/dataload/processes/executionDetail.json index 1d5e79ef7..a0dacd068 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/executionDetail.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/executionDetail.json @@ -1,20 +1,22 @@ { - "executionDetail": { - "status": "ERROR", - "created": "2014-02-24T19:00:35.999Z", - "started": "2014-02-24T19:00:39.155Z", - "updated": "2014-02-24T19:26:13.197Z", - "finished": "2014-02-24T19:26:13.060Z", - "error" : { - "errorCode" : "executor.error", - "message" : "Error message with some placeholders for parameters - like %s.", - "parameters" : [ "this one" ] - }, - "links": { - "poll": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId", - "self": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId/detail", - "log": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId/log", - "data": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId/data" - } + "executionDetail": { + "status": "ERROR", + "created": "2014-02-24T19:00:35.999Z", + "started": "2014-02-24T19:00:39.155Z", + "updated": "2014-02-24T19:26:13.197Z", + "finished": "2014-02-24T19:26:13.060Z", + "error": { + "errorCode": "executor.error", + "message": "Error message with some placeholders for parameters - like %s.", + "parameters": [ + "this one" + ] + }, + "links": { + "poll": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId", + "self": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId/detail", + "log": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId/log", + "data": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId/data" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/processes/executionTask.json b/gooddata-java-model/src/test/resources/dataload/processes/executionTask.json index f97e58bd2..8735d718f 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/executionTask.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/executionTask.json @@ -1,8 +1,8 @@ { - "executionTask" : { - "links" : { - "poll" : "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId", - "detail" : "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId/detail" - } + "executionTask": { + "links": { + "poll": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId", + "detail": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions/executionId/detail" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/processes/process-input-withPath.json b/gooddata-java-model/src/test/resources/dataload/processes/process-input-withPath.json index ccc522404..89ff32cf9 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/process-input-withPath.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/process-input-withPath.json @@ -1,7 +1,7 @@ { - "process" : { - "type" : "GROOVY", - "name" : "testProcess", - "path" : "/uploads/process.zip" - } + "process": { + "type": "GROOVY", + "name": "testProcess", + "path": "/uploads/process.zip" + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/processes/process-input.json b/gooddata-java-model/src/test/resources/dataload/processes/process-input.json index 202cbf148..4e15ea27e 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/process-input.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/process-input.json @@ -1,6 +1,6 @@ { - "process" : { - "type" : "GROOVY", - "name" : "testProcess" - } + "process": { + "type": "GROOVY", + "name": "testProcess" + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/processes/process.json b/gooddata-java-model/src/test/resources/dataload/processes/process.json index 7d66f7fda..79434a241 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/process.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/process.json @@ -1,13 +1,13 @@ { - "process":{ - "type" : "GROOVY", - "name" : "testProcess", - "executables" : [ - "test.groovy" - ], - "links" : { - "self" : "/gdc/projects/PROJECT_ID/dataload/processes/processId", - "executions" : "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions" - } + "process": { + "type": "GROOVY", + "name": "testProcess", + "executables": [ + "test.groovy" + ], + "links": { + "self": "/gdc/projects/PROJECT_ID/dataload/processes/processId", + "executions": "/gdc/projects/PROJECT_ID/dataload/processes/processId/executions" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/processes/processes.json b/gooddata-java-model/src/test/resources/dataload/processes/processes.json index 710d13b2d..9ff39fa21 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/processes.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/processes.json @@ -1,17 +1,19 @@ { - "processes" : { - "items" : [ { - "process":{ - "type" : "GROOVY", - "name" : "testProcess", - "executables" : [ - "test.groovy" - ], - "links" : { - "self" : "/gdc/PROJECT_ID/projectId/dataload/processes/processId", - "executions" : "/gdc/PROJECT_ID/dataload/processes/processId/executions" - } - } - } ] - } + "processes": { + "items": [ + { + "process": { + "type": "GROOVY", + "name": "testProcess", + "executables": [ + "test.groovy" + ], + "links": { + "self": "/gdc/PROJECT_ID/projectId/dataload/processes/processId", + "executions": "/gdc/PROJECT_ID/dataload/processes/processId/executions" + } + } + } + ] + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataload/processes/schedule-input-all-fields.json b/gooddata-java-model/src/test/resources/dataload/processes/schedule-input-all-fields.json index 84ce01686..d7e637f95 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/schedule-input-all-fields.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/schedule-input-all-fields.json @@ -1,9 +1,9 @@ { "schedule": { - "name" : "scheduleName", + "name": "scheduleName", "type": "MSETL", "state": "ENABLED", - "reschedule" : 26, + "reschedule": 26, "params": { "PROCESS_ID": "process_id", "EXECUTABLE": "Twitter/graph/twitter.grf" diff --git a/gooddata-java-model/src/test/resources/dataload/processes/schedule.json b/gooddata-java-model/src/test/resources/dataload/processes/schedule.json index c5a04da10..198a2111c 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/schedule.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/schedule.json @@ -1,6 +1,6 @@ { "schedule": { - "name" : "scheduleName", + "name": "scheduleName", "type": "MSETL", "state": "ENABLED", "params": { @@ -9,7 +9,7 @@ }, "cron": "0 0 * * *", "timezone": "UTC", - "reschedule" : 26, + "reschedule": 26, "nextExecutionTime": "2013-11-16T00:00:00.000Z", "lastSuccessful": { "execution": { diff --git a/gooddata-java-model/src/test/resources/dataload/processes/scheduleExecution.json b/gooddata-java-model/src/test/resources/dataload/processes/scheduleExecution.json index 89fd13e2e..1cf0436ad 100644 --- a/gooddata-java-model/src/test/resources/dataload/processes/scheduleExecution.json +++ b/gooddata-java-model/src/test/resources/dataload/processes/scheduleExecution.json @@ -1,11 +1,11 @@ { - "execution" : { - "createdTime" : "2017-05-09T21:54:50.924Z", - "status" : "OK", - "trigger" : "MANUAL", - "processLastDeployedBy" : "bear@gooddata.com", - "links" : { - "self" : "/gdc/projects/PROJECT_ID/schedules/SCHEDULE_ID/executions/EXECUTION_ID" + "execution": { + "createdTime": "2017-05-09T21:54:50.924Z", + "status": "OK", + "trigger": "MANUAL", + "processLastDeployedBy": "bear@gooddata.com", + "links": { + "self": "/gdc/projects/PROJECT_ID/schedules/SCHEDULE_ID/executions/EXECUTION_ID" } } } diff --git a/gooddata-java-model/src/test/resources/dataset/dataset.json b/gooddata-java-model/src/test/resources/dataset/dataset.json index f7eabfe2d..cc0fb7f39 100644 --- a/gooddata-java-model/src/test/resources/dataset/dataset.json +++ b/gooddata-java-model/src/test/resources/dataset/dataset.json @@ -1,7 +1,7 @@ { - "link": "/gdc/md/PROJECT_ID/ldm/singleloadinterface/dataset.person", - "identifier": "dataset.person", - "summary": "dataset single data loading interface specifications", - "category": "dataset-singleloadinterface", - "title": "Person" + "link": "/gdc/md/PROJECT_ID/ldm/singleloadinterface/dataset.person", + "identifier": "dataset.person", + "summary": "dataset single data loading interface specifications", + "category": "dataset-singleloadinterface", + "title": "Person" } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataset/datasetLinks.json b/gooddata-java-model/src/test/resources/dataset/datasetLinks.json index 4827ae04a..496176606 100644 --- a/gooddata-java-model/src/test/resources/dataset/datasetLinks.json +++ b/gooddata-java-model/src/test/resources/dataset/datasetLinks.json @@ -1,16 +1,16 @@ { - "about": { - "summary": "single loading interfaces", - "category": "singleloadinterface", - "instance": "MD::LDM::SingleLoadInterface", - "links": [ - { - "link": "/gdc/md/PROJECT_ID/ldm/singleloadinterface/dataset.person", - "identifier": "dataset.person", - "summary": "dataset single data loading interface specifications", - "category": "dataset-singleloadinterface", - "title": "Person" - } - ] - } + "about": { + "summary": "single loading interfaces", + "category": "singleloadinterface", + "instance": "MD::LDM::SingleLoadInterface", + "links": [ + { + "link": "/gdc/md/PROJECT_ID/ldm/singleloadinterface/dataset.person", + "identifier": "dataset.person", + "summary": "dataset single data loading interface specifications", + "category": "dataset-singleloadinterface", + "title": "Person" + } + ] + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataset/datasetManifest-input.json b/gooddata-java-model/src/test/resources/dataset/datasetManifest-input.json index 0e32f13d1..189067be5 100644 --- a/gooddata-java-model/src/test/resources/dataset/datasetManifest-input.json +++ b/gooddata-java-model/src/test/resources/dataset/datasetManifest-input.json @@ -1,19 +1,19 @@ { - "dataSetSLIManifest": { - "parts": [ - { - "columnName": "COLUMN", - "populates": [ - "POPULATES" - ], - "mode": "MODE", - "constraints": { - "date": "CONSTRAINT" - }, - "referenceKey": 1 - } + "dataSetSLIManifest": { + "parts": [ + { + "columnName": "COLUMN", + "populates": [ + "POPULATES" ], - "file": "FILE", - "dataSet": "DATASET" - } + "mode": "MODE", + "constraints": { + "date": "CONSTRAINT" + }, + "referenceKey": 1 + } + ], + "file": "FILE", + "dataSet": "DATASET" + } } diff --git a/gooddata-java-model/src/test/resources/dataset/datasetManifest.json b/gooddata-java-model/src/test/resources/dataset/datasetManifest.json index 55bff5a8a..993f8b444 100644 --- a/gooddata-java-model/src/test/resources/dataset/datasetManifest.json +++ b/gooddata-java-model/src/test/resources/dataset/datasetManifest.json @@ -1,33 +1,33 @@ { - "dataSetSLIManifest": { - "parts": [ - { - "columnName": "f_person.f_shoesize", - "populates": [ - "fact.person.shoesize" - ], - "mode": "FULL" - }, - { - "columnName": "date", - "populates": [ - "date" - ], - "mode": "FULL", - "constraints": { - "date": "yyyy-MM-dd'T'HH:mm:ssZ" - } - }, - { - "columnName": "d_person_department.nm_xdepartment", - "populates": [ - "attr.person.xdepartment" - ], - "mode": "FULL", - "referenceKey": 1 - } + "dataSetSLIManifest": { + "parts": [ + { + "columnName": "f_person.f_shoesize", + "populates": [ + "fact.person.shoesize" ], - "file": "dataset.person.csv", - "dataSet": "dataset.person" - } + "mode": "FULL" + }, + { + "columnName": "date", + "populates": [ + "date" + ], + "mode": "FULL", + "constraints": { + "date": "yyyy-MM-dd'T'HH:mm:ssZ" + } + }, + { + "columnName": "d_person_department.nm_xdepartment", + "populates": [ + "attr.person.xdepartment" + ], + "mode": "FULL", + "referenceKey": 1 + } + ], + "file": "dataset.person.csv", + "dataSet": "dataset.person" + } } diff --git a/gooddata-java-model/src/test/resources/dataset/pull.json b/gooddata-java-model/src/test/resources/dataset/pull.json index e7e8503c5..38af89901 100644 --- a/gooddata-java-model/src/test/resources/dataset/pull.json +++ b/gooddata-java-model/src/test/resources/dataset/pull.json @@ -1,3 +1,3 @@ { - "pullIntegration": "DIR" + "pullIntegration": "DIR" } diff --git a/gooddata-java-model/src/test/resources/dataset/pullTask.json b/gooddata-java-model/src/test/resources/dataset/pullTask.json index 08ee53a81..0b110b9b9 100644 --- a/gooddata-java-model/src/test/resources/dataset/pullTask.json +++ b/gooddata-java-model/src/test/resources/dataset/pullTask.json @@ -1,7 +1,7 @@ { - "pull2Task" : { - "links" : { - "poll": "/gdc/md/PROJECT/tasks/task/ID/status" - } + "pull2Task": { + "links": { + "poll": "/gdc/md/PROJECT/tasks/task/ID/status" } + } } diff --git a/gooddata-java-model/src/test/resources/dataset/taskStateOK.json b/gooddata-java-model/src/test/resources/dataset/taskStateOK.json index d2112b8f3..e5648bed3 100644 --- a/gooddata-java-model/src/test/resources/dataset/taskStateOK.json +++ b/gooddata-java-model/src/test/resources/dataset/taskStateOK.json @@ -1,6 +1,6 @@ { - "taskState" : { - "msg" : "ok message", - "status" : "OK" + "taskState": { + "msg": "ok message", + "status": "OK" } } diff --git a/gooddata-java-model/src/test/resources/dataset/uploads/data-uploads-info.json b/gooddata-java-model/src/test/resources/dataset/uploads/data-uploads-info.json index a6783bfab..e8c589d54 100644 --- a/gooddata-java-model/src/test/resources/dataset/uploads/data-uploads-info.json +++ b/gooddata-java-model/src/test/resources/dataset/uploads/data-uploads-info.json @@ -1,9 +1,9 @@ { - "dataUploadsInfo" : { - "statusesCount" : { - "OK" : 845, - "RUNNING" : 1, - "ERROR" : 25 + "dataUploadsInfo": { + "statusesCount": { + "OK": 845, + "RUNNING": 1, + "ERROR": 25 } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataset/uploads/upload.json b/gooddata-java-model/src/test/resources/dataset/uploads/upload.json index a88d4b1dd..e2337e7c0 100644 --- a/gooddata-java-model/src/test/resources/dataset/uploads/upload.json +++ b/gooddata-java-model/src/test/resources/dataset/uploads/upload.json @@ -1,14 +1,14 @@ { - "dataUpload" : { - "msg" : "some upload message", - "etlInterface" : "/gdc/md/project/obj/123", - "progress" : "1.000", - "status" : "OK", - "file" : "upload_info.json", - "fullUpload" : 0, - "uri" : "/gdc/md/project/data/upload/123", - "createdAt" : "2016-04-08 12:55:21", - "fileSize" : 130501, - "processedAt" : "2016-04-08 12:55:25" + "dataUpload": { + "msg": "some upload message", + "etlInterface": "/gdc/md/project/obj/123", + "progress": "1.000", + "status": "OK", + "file": "upload_info.json", + "fullUpload": 0, + "uri": "/gdc/md/project/data/upload/123", + "createdAt": "2016-04-08 12:55:21", + "fileSize": 130501, + "processedAt": "2016-04-08 12:55:25" } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/dataset/uploads/uploads.json b/gooddata-java-model/src/test/resources/dataset/uploads/uploads.json index 546ca4419..9e9823fa4 100644 --- a/gooddata-java-model/src/test/resources/dataset/uploads/uploads.json +++ b/gooddata-java-model/src/test/resources/dataset/uploads/uploads.json @@ -1,32 +1,32 @@ { - "dataUploads" : { - "uploads" : [ + "dataUploads": { + "uploads": [ { - "dataUpload" : { - "msg" : "some upload message 1", - "etlInterface" : "/gdc/md/project/obj/123", - "progress" : "0.500", - "status" : "RUNNING", - "file" : "upload_info.json", - "fullUpload" : 0, - "uri" : "/gdc/md/project/data/upload/234", - "createdAt" : "2016-04-08 13:55:21", - "fileSize" : 131501, - "processedAt" : "2016-04-08 13:55:25" + "dataUpload": { + "msg": "some upload message 1", + "etlInterface": "/gdc/md/project/obj/123", + "progress": "0.500", + "status": "RUNNING", + "file": "upload_info.json", + "fullUpload": 0, + "uri": "/gdc/md/project/data/upload/234", + "createdAt": "2016-04-08 13:55:21", + "fileSize": 131501, + "processedAt": "2016-04-08 13:55:25" } }, { - "dataUpload" : { - "msg" : "some upload message", - "etlInterface" : "/gdc/md/project/obj/123", - "progress" : "1.000", - "status" : "OK", - "file" : "upload_info.json", - "fullUpload" : 0, - "uri" : "/gdc/md/project/data/upload/123", - "createdAt" : "2016-04-08 12:55:21", - "fileSize" : 130501, - "processedAt" : "2016-04-08 12:55:25" + "dataUpload": { + "msg": "some upload message", + "etlInterface": "/gdc/md/project/obj/123", + "progress": "1.000", + "status": "OK", + "file": "upload_info.json", + "fullUpload": 0, + "uri": "/gdc/md/project/data/upload/123", + "createdAt": "2016-04-08 12:55:21", + "fileSize": 130501, + "processedAt": "2016-04-08 12:55:25" } } ] diff --git a/gooddata-java-model/src/test/resources/executeafm/afm/absoluteDateFilter.json b/gooddata-java-model/src/test/resources/executeafm/afm/absoluteDateFilter.json index f1d9e5abb..513b54d6b 100644 --- a/gooddata-java-model/src/test/resources/executeafm/afm/absoluteDateFilter.json +++ b/gooddata-java-model/src/test/resources/executeafm/afm/absoluteDateFilter.json @@ -3,7 +3,7 @@ "dataSet": { "identifier": "date.attr" }, - "from" : "2017-09-02", - "to" : "2017-09-30" + "from": "2017-09-02", + "to": "2017-09-30" } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/executeafm/afm/absoluteDateFilter_noZeroPadDate.json b/gooddata-java-model/src/test/resources/executeafm/afm/absoluteDateFilter_noZeroPadDate.json index 0eda8ffbb..efedaf5ca 100644 --- a/gooddata-java-model/src/test/resources/executeafm/afm/absoluteDateFilter_noZeroPadDate.json +++ b/gooddata-java-model/src/test/resources/executeafm/afm/absoluteDateFilter_noZeroPadDate.json @@ -3,7 +3,7 @@ "dataSet": { "identifier": "date.attr" }, - "from" : "2017-9-2", - "to" : "2017-9-30" + "from": "2017-9-2", + "to": "2017-9-30" } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/executeafm/afm/arithmeticMeasureDefinition.json b/gooddata-java-model/src/test/resources/executeafm/afm/arithmeticMeasureDefinition.json index b34c3e713..175cef56d 100644 --- a/gooddata-java-model/src/test/resources/executeafm/afm/arithmeticMeasureDefinition.json +++ b/gooddata-java-model/src/test/resources/executeafm/afm/arithmeticMeasureDefinition.json @@ -1,6 +1,9 @@ { - "arithmeticMeasure" : { - "measureIdentifiers" : ["localIdentifier1","localIdentifier2"], - "operator" : "sum" + "arithmeticMeasure": { + "measureIdentifiers": [ + "localIdentifier1", + "localIdentifier2" + ], + "operator": "sum" } } diff --git a/gooddata-java-model/src/test/resources/executeafm/afm/complextTableWithTotalsConvertedAfm.json b/gooddata-java-model/src/test/resources/executeafm/afm/complextTableWithTotalsConvertedAfm.json new file mode 100644 index 000000000..6bcdc3b74 --- /dev/null +++ b/gooddata-java-model/src/test/resources/executeafm/afm/complextTableWithTotalsConvertedAfm.json @@ -0,0 +1,85 @@ +{ + "measures": [ + { + "localIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "definition": { + "measureDefinition": { + "filters": [], + "item": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/9211" + } + } + }, + "alias": "_Close [BOP]" + } + ], + "attributes": [ + { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1024" + }, + "localIdentifier": "e4bb25477bca4fb2a29a4b80d94568d4" + }, + { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1028" + }, + "localIdentifier": "9008f5d33b3e41279402a25e2f05d0c9" + }, + { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1086" + }, + "localIdentifier": "023641d306f84921be39d0aa1d6464db" + }, + { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1805" + }, + "localIdentifier": "a22843f5d77f48b4938ccfb460eb8be4" + }, + { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1094" + }, + "localIdentifier": "a77983fcc9574f6bad6be1d3cb08bf71" + } + ], + "nativeTotals": [ + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifiers": [] + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifiers": [ + "e4bb25477bca4fb2a29a4b80d94568d4" + ] + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifiers": [ + "e4bb25477bca4fb2a29a4b80d94568d4", + "9008f5d33b3e41279402a25e2f05d0c9" + ] + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifiers": [ + "e4bb25477bca4fb2a29a4b80d94568d4", + "9008f5d33b3e41279402a25e2f05d0c9", + "023641d306f84921be39d0aa1d6464db" + ] + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifiers": [ + "e4bb25477bca4fb2a29a4b80d94568d4", + "9008f5d33b3e41279402a25e2f05d0c9", + "023641d306f84921be39d0aa1d6464db", + "a22843f5d77f48b4938ccfb460eb8be4" + ] + } + ], + "filters": [] +} diff --git a/gooddata-java-model/src/test/resources/executeafm/afm/negativeAttributeFilter.json b/gooddata-java-model/src/test/resources/executeafm/afm/negativeAttributeFilter.json index cfb8188a1..52fa1ab97 100644 --- a/gooddata-java-model/src/test/resources/executeafm/afm/negativeAttributeFilter.json +++ b/gooddata-java-model/src/test/resources/executeafm/afm/negativeAttributeFilter.json @@ -3,6 +3,9 @@ "displayForm": { "identifier": "df.bum.bac" }, - "notIn": ["a", "b"] + "notIn": [ + "a", + "b" + ] } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/executeafm/afm/positiveAttributeFilter.json b/gooddata-java-model/src/test/resources/executeafm/afm/positiveAttributeFilter.json index b1fe36695..e0f66e773 100644 --- a/gooddata-java-model/src/test/resources/executeafm/afm/positiveAttributeFilter.json +++ b/gooddata-java-model/src/test/resources/executeafm/afm/positiveAttributeFilter.json @@ -3,6 +3,9 @@ "displayForm": { "identifier": "df.bum.bac" }, - "in": ["a", "b"] + "in": [ + "a", + "b" + ] } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/executeafm/afm/uriAttributeFilterElements.json b/gooddata-java-model/src/test/resources/executeafm/afm/uriAttributeFilterElements.json index babf8ff03..0b104a486 100644 --- a/gooddata-java-model/src/test/resources/executeafm/afm/uriAttributeFilterElements.json +++ b/gooddata-java-model/src/test/resources/executeafm/afm/uriAttributeFilterElements.json @@ -1,3 +1,6 @@ { - "uris": [ "val1", "val2"] + "uris": [ + "val1", + "val2" + ] } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/executeafm/afm/valueAttributeFilterElements.json b/gooddata-java-model/src/test/resources/executeafm/afm/valueAttributeFilterElements.json index fb2262e54..1958b2e06 100644 --- a/gooddata-java-model/src/test/resources/executeafm/afm/valueAttributeFilterElements.json +++ b/gooddata-java-model/src/test/resources/executeafm/afm/valueAttributeFilterElements.json @@ -1,3 +1,6 @@ { - "values": [ "val1", "val2"] + "values": [ + "val1", + "val2" + ] } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/executeafm/executionComplexTableConverted.json b/gooddata-java-model/src/test/resources/executeafm/executionComplexTableConverted.json new file mode 100644 index 000000000..b20f4ed76 --- /dev/null +++ b/gooddata-java-model/src/test/resources/executeafm/executionComplexTableConverted.json @@ -0,0 +1,147 @@ +{ + "execution": { + "afm": { + "attributes": [ + { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1024" + }, + "localIdentifier": "e4bb25477bca4fb2a29a4b80d94568d4" + }, + { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1028" + }, + "localIdentifier": "9008f5d33b3e41279402a25e2f05d0c9" + }, + { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1086" + }, + "localIdentifier": "023641d306f84921be39d0aa1d6464db" + }, + { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1805" + }, + "localIdentifier": "a22843f5d77f48b4938ccfb460eb8be4" + }, + { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1094" + }, + "localIdentifier": "a77983fcc9574f6bad6be1d3cb08bf71" + } + ], + "filters": [], + "measures": [ + { + "definition": { + "measureDefinition": { + "item": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/9211" + }, + "filters": [] + } + }, + "localIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "alias": "_Close [BOP]" + } + ], + "nativeTotals": [ + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifiers": [] + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifiers": [ + "e4bb25477bca4fb2a29a4b80d94568d4" + ] + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifiers": [ + "e4bb25477bca4fb2a29a4b80d94568d4", + "9008f5d33b3e41279402a25e2f05d0c9" + ] + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifiers": [ + "e4bb25477bca4fb2a29a4b80d94568d4", + "9008f5d33b3e41279402a25e2f05d0c9", + "023641d306f84921be39d0aa1d6464db" + ] + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifiers": [ + "e4bb25477bca4fb2a29a4b80d94568d4", + "9008f5d33b3e41279402a25e2f05d0c9", + "023641d306f84921be39d0aa1d6464db", + "a22843f5d77f48b4938ccfb460eb8be4" + ] + } + ] + }, + "resultSpec": { + "dimensions": [ + { + "itemIdentifiers": [ + "e4bb25477bca4fb2a29a4b80d94568d4", + "9008f5d33b3e41279402a25e2f05d0c9", + "023641d306f84921be39d0aa1d6464db", + "a22843f5d77f48b4938ccfb460eb8be4", + "a77983fcc9574f6bad6be1d3cb08bf71" + ], + "totals": [ + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "type": "nat", + "attributeIdentifier": "e4bb25477bca4fb2a29a4b80d94568d4" + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "type": "nat", + "attributeIdentifier": "9008f5d33b3e41279402a25e2f05d0c9" + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "type": "nat", + "attributeIdentifier": "a22843f5d77f48b4938ccfb460eb8be4" + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "type": "nat", + "attributeIdentifier": "a77983fcc9574f6bad6be1d3cb08bf71" + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "type": "sum", + "attributeIdentifier": "e4bb25477bca4fb2a29a4b80d94568d4" + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "type": "nat", + "attributeIdentifier": "023641d306f84921be39d0aa1d6464db" + } + ] + }, + { + "itemIdentifiers": [ + "measureGroup" + ] + } + ], + "sorts": [ + { + "attributeSortItem": { + "direction": "asc", + "attributeIdentifier": "e4bb25477bca4fb2a29a4b80d94568d4" + } + } + ] + } + } +} diff --git a/gooddata-java-model/src/test/resources/executeafm/result/executionResult.json b/gooddata-java-model/src/test/resources/executeafm/result/executionResult.json index 4ad010553..065e96484 100644 --- a/gooddata-java-model/src/test/resources/executeafm/result/executionResult.json +++ b/gooddata-java-model/src/test/resources/executeafm/result/executionResult.json @@ -14,15 +14,18 @@ "9999" ] ], - "paging" : { + "paging": { "count": [ - 2,4 + 2, + 4 ], "offset": [ - 0,0 + 0, + 0 ], "total": [ - 2,4 + 2, + 4 ] } } diff --git a/gooddata-java-model/src/test/resources/executeafm/result/executionResultFull.json b/gooddata-java-model/src/test/resources/executeafm/result/executionResultFull.json index b6fbc4ed4..6cab38874 100644 --- a/gooddata-java-model/src/test/resources/executeafm/result/executionResultFull.json +++ b/gooddata-java-model/src/test/resources/executeafm/result/executionResultFull.json @@ -14,15 +14,18 @@ "9999" ] ], - "paging" : { + "paging": { "count": [ - 2,4 + 2, + 4 ], "offset": [ - 0,0 + 0, + 0 ], "total": [ - 2,4 + 2, + 4 ] }, "headerItems": [ @@ -82,7 +85,11 @@ { "warningCode": "gdc123", "message": "Some msg %s %s %s", - "parameters": ["bum", 1, null] + "parameters": [ + "bum", + 1, + null + ] } ] } diff --git a/gooddata-java-model/src/test/resources/executeafm/result/warning.json b/gooddata-java-model/src/test/resources/executeafm/result/warning.json index b417f7915..8060a7173 100644 --- a/gooddata-java-model/src/test/resources/executeafm/result/warning.json +++ b/gooddata-java-model/src/test/resources/executeafm/result/warning.json @@ -1,5 +1,9 @@ { "warningCode": "gdc123", "message": "Some msg %s %s %s", - "parameters": ["bum", 1, null] + "parameters": [ + "bum", + 1, + null + ] } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/executeafm/resultspec/resultSpec.json b/gooddata-java-model/src/test/resources/executeafm/resultspec/resultSpec.json index 8e8a75603..89203ff8f 100644 --- a/gooddata-java-model/src/test/resources/executeafm/resultspec/resultSpec.json +++ b/gooddata-java-model/src/test/resources/executeafm/resultspec/resultSpec.json @@ -12,8 +12,7 @@ "attributeIdentifier": "aId", "direction": "asc" } - } - , + }, { "measureSortItem": { "direction": "asc", diff --git a/gooddata-java-model/src/test/resources/featureflag/featureFlags.json b/gooddata-java-model/src/test/resources/featureflag/featureFlags.json index 72ff8f9d2..14990a29c 100644 --- a/gooddata-java-model/src/test/resources/featureflag/featureFlags.json +++ b/gooddata-java-model/src/test/resources/featureflag/featureFlags.json @@ -1,6 +1,6 @@ { - "featureFlags": { - "testFeature": true, - "testFeature2": false - } + "featureFlags": { + "testFeature": true, + "testFeature2": false + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/featureflag/projectFeatureFlags.json b/gooddata-java-model/src/test/resources/featureflag/projectFeatureFlags.json index 1e77993a7..86ecc2f75 100644 --- a/gooddata-java-model/src/test/resources/featureflag/projectFeatureFlags.json +++ b/gooddata-java-model/src/test/resources/featureflag/projectFeatureFlags.json @@ -1,29 +1,33 @@ { - "featureFlags" : { - "items" : [ { - "featureFlag" : { - "key" : "myCoolFeature", - "value" : true, - "links" : { - "self" : "/gdc/projects/PROJECT_ID/projectFeatureFlags/myCoolFeature" + "featureFlags": { + "items": [ + { + "featureFlag": { + "key": "myCoolFeature", + "value": true, + "links": { + "self": "/gdc/projects/PROJECT_ID/projectFeatureFlags/myCoolFeature" + } } - } - }, { - "featureFlag" : { - "key" : "mySuperCoolFeature", - "value" : true, - "links" : { - "self" : "/gdc/projects/PROJECT_ID/projectFeatureFlags/mySuperCoolFeature" + }, + { + "featureFlag": { + "key": "mySuperCoolFeature", + "value": true, + "links": { + "self": "/gdc/projects/PROJECT_ID/projectFeatureFlags/mySuperCoolFeature" + } } - } - }, { - "featureFlag" : { - "key" : "mySuperSecretFeature", - "value" : false, - "links" : { - "self" : "/gdc/projects/PROJECT_ID/projectFeatureFlags/mySuperSecretFeature" + }, + { + "featureFlag": { + "key": "mySuperSecretFeature", + "value": false, + "links": { + "self": "/gdc/projects/PROJECT_ID/projectFeatureFlags/mySuperSecretFeature" + } } - } - }] + } + ] } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/gdc/asyncTask.json b/gooddata-java-model/src/test/resources/gdc/asyncTask.json index 2cf1a7ac2..e02860c59 100644 --- a/gooddata-java-model/src/test/resources/gdc/asyncTask.json +++ b/gooddata-java-model/src/test/resources/gdc/asyncTask.json @@ -1,7 +1,7 @@ { - "asyncTask": { - "link": { - "poll": "POLL-URI" - } + "asyncTask": { + "link": { + "poll": "POLL-URI" } + } } diff --git a/gooddata-java-model/src/test/resources/gdc/gdc.json b/gooddata-java-model/src/test/resources/gdc/gdc.json index ea7050db0..45dfae8d1 100644 --- a/gooddata-java-model/src/test/resources/gdc/gdc.json +++ b/gooddata-java-model/src/test/resources/gdc/gdc.json @@ -1,80 +1,80 @@ { - "about" : { - "summary" : "Use links to navigate the services.", - "category" : "GoodData API root", - "links" : [ - { - "link" : "/gdc/", - "summary" : "", - "title" : "home", - "category" : "home" - }, - { - "link" : "/gdc/account/token", - "summary" : "Temporary token generator.", - "title" : "token", - "category" : "token" - }, - { - "link" : "/gdc/account/login", - "summary" : "Authentication service.", - "title" : "login", - "category" : "login" - }, - { - "link" : "/gdc/md", - "summary" : "Metadata resources.", - "title" : "metadata", - "category" : "md" - }, - { - "link" : "/gdc/xtab2", - "summary" : "Report execution resource.", - "title" : "xtab", - "category" : "xtab" - }, - { - "link" : "/gdc/availableelements", - "summary" : "Resource used to determine valid attribute values in the context of a report.", - "title" : "AvailableElements", - "category" : "availablelements" - }, - { - "link" : "/gdc/exporter", - "summary" : "Report exporting resource.", - "title" : "exporter", - "category" : "report-exporter" - }, - { - "link" : "/gdc/account", - "summary" : "Resource for logged in account manipulation.", - "title" : "account", - "category" : "account" - }, - { - "link" : "/gdc/projects", - "summary" : "Resource for user and project management.", - "title" : "projects", - "category" : "projects" - }, - { - "link" : "/gdc/tool", - "summary" : "Miscellaneous resources.", - "title" : "tool", - "category" : "tool" - }, - { - "link" : "/gdc/templates", - "summary" : "Template resource - for internal use only.", - "title" : "templates", - "category" : "templates" - }, - { - "link" : "/uploads", - "summary" : "User data staging area.", - "title" : "user-uploads", - "category" : "uploads" - } - ] - } + "about": { + "summary": "Use links to navigate the services.", + "category": "GoodData API root", + "links": [ + { + "link": "/gdc/", + "summary": "", + "title": "home", + "category": "home" + }, + { + "link": "/gdc/account/token", + "summary": "Temporary token generator.", + "title": "token", + "category": "token" + }, + { + "link": "/gdc/account/login", + "summary": "Authentication service.", + "title": "login", + "category": "login" + }, + { + "link": "/gdc/md", + "summary": "Metadata resources.", + "title": "metadata", + "category": "md" + }, + { + "link": "/gdc/xtab2", + "summary": "Report execution resource.", + "title": "xtab", + "category": "xtab" + }, + { + "link": "/gdc/availableelements", + "summary": "Resource used to determine valid attribute values in the context of a report.", + "title": "AvailableElements", + "category": "availablelements" + }, + { + "link": "/gdc/exporter", + "summary": "Report exporting resource.", + "title": "exporter", + "category": "report-exporter" + }, + { + "link": "/gdc/account", + "summary": "Resource for logged in account manipulation.", + "title": "account", + "category": "account" + }, + { + "link": "/gdc/projects", + "summary": "Resource for user and project management.", + "title": "projects", + "category": "projects" + }, + { + "link": "/gdc/tool", + "summary": "Miscellaneous resources.", + "title": "tool", + "category": "tool" + }, + { + "link": "/gdc/templates", + "summary": "Template resource - for internal use only.", + "title": "templates", + "category": "templates" + }, + { + "link": "/uploads", + "summary": "User data staging area.", + "title": "user-uploads", + "category": "uploads" + } + ] + } } diff --git a/gooddata-java-model/src/test/resources/gdc/linkEntries.json b/gooddata-java-model/src/test/resources/gdc/linkEntries.json index c406691fd..9f611d592 100644 --- a/gooddata-java-model/src/test/resources/gdc/linkEntries.json +++ b/gooddata-java-model/src/test/resources/gdc/linkEntries.json @@ -1,8 +1,8 @@ { - "entries" : [ - { - "link" : "URI", - "category" : "tasks-status" - } - ] + "entries": [ + { + "link": "URI", + "category": "tasks-status" + } + ] } diff --git a/gooddata-java-model/src/test/resources/gdc/task-status.json b/gooddata-java-model/src/test/resources/gdc/task-status.json index 456d5c6b9..8396e385c 100644 --- a/gooddata-java-model/src/test/resources/gdc/task-status.json +++ b/gooddata-java-model/src/test/resources/gdc/task-status.json @@ -1,6 +1,6 @@ { - "wTaskStatus": { - "status": "OK", - "poll": "/gdc/md/PROJECT_ID/tasks/TASK_ID/status" - } + "wTaskStatus": { + "status": "OK", + "poll": "/gdc/md/PROJECT_ID/tasks/TASK_ID/status" + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/gdc/uriResponse.json b/gooddata-java-model/src/test/resources/gdc/uriResponse.json index 38134e286..2064e9048 100644 --- a/gooddata-java-model/src/test/resources/gdc/uriResponse.json +++ b/gooddata-java-model/src/test/resources/gdc/uriResponse.json @@ -1,3 +1,3 @@ { - "uri" : "URI" + "uri": "URI" } diff --git a/gooddata-java-model/src/test/resources/hierarchicalconfig/configItem.json b/gooddata-java-model/src/test/resources/hierarchicalconfig/configItem.json index ec593e9a6..d746c5e0e 100644 --- a/gooddata-java-model/src/test/resources/hierarchicalconfig/configItem.json +++ b/gooddata-java-model/src/test/resources/hierarchicalconfig/configItem.json @@ -1,10 +1,10 @@ { - "settingItem" : { - "key" : "myCoolFeature", - "value" : "true", - "source" : "catalog", - "links" : { - "self" : "/gdc/projects/PROJECT_ID/config/myCoolFeature" + "settingItem": { + "key": "myCoolFeature", + "value": "true", + "source": "catalog", + "links": { + "self": "/gdc/projects/PROJECT_ID/config/myCoolFeature" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/hierarchicalconfig/configItems.json b/gooddata-java-model/src/test/resources/hierarchicalconfig/configItems.json index 957e03990..c15c870b8 100644 --- a/gooddata-java-model/src/test/resources/hierarchicalconfig/configItems.json +++ b/gooddata-java-model/src/test/resources/hierarchicalconfig/configItems.json @@ -1,32 +1,36 @@ { - "settings" : { - "items" : [ { - "settingItem" : { - "key" : "myCoolFeature", - "value" : "true", - "source" : "catalog", - "links" : { - "self" : "/gdc/projects/PROJECT_ID/config/myCoolFeature" + "settings": { + "items": [ + { + "settingItem": { + "key": "myCoolFeature", + "value": "true", + "source": "catalog", + "links": { + "self": "/gdc/projects/PROJECT_ID/config/myCoolFeature" + } } - } - }, { - "settingItem" : { - "key" : "mySuperCoolFeature", - "value" : "true", - "source" : "catalog", - "links" : { - "self" : "/gdc/projects/PROJECT_ID/config/mySuperCoolFeature" + }, + { + "settingItem": { + "key": "mySuperCoolFeature", + "value": "true", + "source": "catalog", + "links": { + "self": "/gdc/projects/PROJECT_ID/config/mySuperCoolFeature" + } } - } - }, { - "settingItem" : { - "key" : "mySuperSecretFeature", - "value" : "false", - "source" : "catalog", - "links" : { - "self" : "/gdc/projects/PROJECT_ID/config/mySuperSecretFeature" + }, + { + "settingItem": { + "key": "mySuperSecretFeature", + "value": "false", + "source": "catalog", + "links": { + "self": "/gdc/projects/PROJECT_ID/config/mySuperSecretFeature" + } } } - }] + ] } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/attribute-input.json b/gooddata-java-model/src/test/resources/md/attribute-input.json index bbafb463d..a1c437b5a 100644 --- a/gooddata-java-model/src/test/resources/md/attribute-input.json +++ b/gooddata-java-model/src/test/resources/md/attribute-input.json @@ -1,22 +1,22 @@ { - "attribute" : { - "content" : { - "pk" : [ - { - "data" : "/gdc/md/PROJECT_ID/obj/PK_ID", - "type" : "col" - } - ], - "displayForms" : [ ], - "fk" : [ - { - "data" : "/gdc/md/PROJECT_ID/obj/FK_ID", - "type" : "col" - } - ] - }, - "meta" : { - "title" : "Person ID" - } - } + "attribute": { + "content": { + "pk": [ + { + "data": "/gdc/md/PROJECT_ID/obj/PK_ID", + "type": "col" + } + ], + "displayForms": [], + "fk": [ + { + "data": "/gdc/md/PROJECT_ID/obj/FK_ID", + "type": "col" + } + ] + }, + "meta": { + "title": "Person ID" + } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/attribute-inputOrig.json b/gooddata-java-model/src/test/resources/md/attribute-inputOrig.json index 0c472f62f..7f126c3e4 100644 --- a/gooddata-java-model/src/test/resources/md/attribute-inputOrig.json +++ b/gooddata-java-model/src/test/resources/md/attribute-inputOrig.json @@ -7,16 +7,16 @@ "type": "col" } ], - "direction" : "asc", - "sort" : "pk", - "type" : "GDC.time.date", - "rel" : [], - "compositeAttribute" : [], - "compositeAttributePk" : [], - "drillDownStepAttributeDF" : "/gdc/md/PROJECT_ID/obj/DF_DRILL_DOWN", - "linkAttributeDF" : "/gdc/md/PROJECT_ID/obj/DF_LINK", - "folders" : [], - "grain" : [], + "direction": "asc", + "sort": "pk", + "type": "GDC.time.date", + "rel": [], + "compositeAttribute": [], + "compositeAttributePk": [], + "drillDownStepAttributeDF": "/gdc/md/PROJECT_ID/obj/DF_DRILL_DOWN", + "linkAttributeDF": "/gdc/md/PROJECT_ID/obj/DF_LINK", + "folders": [], + "grain": [], "displayForms": [ { "content": { diff --git a/gooddata-java-model/src/test/resources/md/attribute-sortDf.json b/gooddata-java-model/src/test/resources/md/attribute-sortDf.json index 67b7e8af9..acacffd30 100644 --- a/gooddata-java-model/src/test/resources/md/attribute-sortDf.json +++ b/gooddata-java-model/src/test/resources/md/attribute-sortDf.json @@ -1,71 +1,71 @@ { - "attribute" : { - "content" : { - "pk" : [ + "attribute": { + "content": { + "pk": [ { - "data" : "/gdc/md/PROJECT_ID/obj/PK_ID", - "type" : "col" + "data": "/gdc/md/PROJECT_ID/obj/PK_ID", + "type": "col" } ], - "direction" : "asc", + "direction": "asc", "sort": { "df": { "uri": "/gdc/md/PROJECT_ID/obj/1806" } }, - "type" : "GDC.time.date", - "rel" : [], - "compositeAttribute" : [], - "compositeAttributePk" : [], - "drillDownStepAttributeDF" : "/gdc/md/PROJECT_ID/obj/DF_DRILL_DOWN", - "linkAttributeDF" : "/gdc/md/PROJECT_ID/obj/DF_LINK", - "folders" : [], - "grain" : [], - "displayForms" : [ + "type": "GDC.time.date", + "rel": [], + "compositeAttribute": [], + "compositeAttributePk": [], + "drillDownStepAttributeDF": "/gdc/md/PROJECT_ID/obj/DF_DRILL_DOWN", + "linkAttributeDF": "/gdc/md/PROJECT_ID/obj/DF_LINK", + "folders": [], + "grain": [], + "displayForms": [ { - "content" : { - "formOf" : "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", - "expression" : "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", - "ldmexpression" : "[/gdc/md/PROJECT_ID/obj/DF_LDM_EXPRESSION_ID]" + "content": { + "formOf": "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", + "expression": "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", + "ldmexpression": "[/gdc/md/PROJECT_ID/obj/DF_LDM_EXPRESSION_ID]" }, - "links" : { - "elements" : "/gdc/md/PROJECT_ID/obj/DF_ID/elements" + "links": { + "elements": "/gdc/md/PROJECT_ID/obj/DF_ID/elements" }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/DF_ID", - "tags" : "", - "created" : "2014-04-11 13:45:56", - "identifier" : "attr.person.id.name", - "deprecated" : "0", - "summary" : "", - "title" : "Person Name", - "category" : "attributeDisplayForm", - "updated" : "2014-04-11 13:45:56", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/DF_ID", + "tags": "", + "created": "2014-04-11 13:45:56", + "identifier": "attr.person.id.name", + "deprecated": "0", + "summary": "", + "title": "Person Name", + "category": "attributeDisplayForm", + "updated": "2014-04-11 13:45:56", + "contributor": "/gdc/account/profile/USER_ID" } } ], - "fk" : [ + "fk": [ { - "data" : "/gdc/md/PROJECT_ID/obj/FK_ID", - "type" : "col" + "data": "/gdc/md/PROJECT_ID/obj/FK_ID", + "type": "col" } ], "dimension": "/gdc/md/PROJECT_ID/obj/DIM_ID" }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/28", - "tags" : "", - "created" : "2014-04-11 13:45:56", - "identifier" : "attr.person.id", - "deprecated" : "0", - "summary" : "", - "title" : "Person ID", - "category" : "attribute", - "updated" : "2014-04-11 13:45:56", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/28", + "tags": "", + "created": "2014-04-11 13:45:56", + "identifier": "attr.person.id", + "deprecated": "0", + "summary": "", + "title": "Person ID", + "category": "attribute", + "updated": "2014-04-11 13:45:56", + "contributor": "/gdc/account/profile/USER_ID" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/attribute.json b/gooddata-java-model/src/test/resources/md/attribute.json index 92792e841..7f126c3e4 100644 --- a/gooddata-java-model/src/test/resources/md/attribute.json +++ b/gooddata-java-model/src/test/resources/md/attribute.json @@ -1,67 +1,67 @@ { - "attribute" : { - "content" : { - "pk" : [ - { - "data" : "/gdc/md/PROJECT_ID/obj/PK_ID", - "type" : "col" - } - ], - "direction" : "asc", - "sort" : "pk", - "type" : "GDC.time.date", - "rel" : [], - "compositeAttribute" : [], - "compositeAttributePk" : [], - "drillDownStepAttributeDF" : "/gdc/md/PROJECT_ID/obj/DF_DRILL_DOWN", - "linkAttributeDF" : "/gdc/md/PROJECT_ID/obj/DF_LINK", - "folders" : [], - "grain" : [], - "displayForms" : [ - { - "content" : { - "formOf" : "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", - "expression" : "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", - "ldmexpression" : "[/gdc/md/PROJECT_ID/obj/DF_LDM_EXPRESSION_ID]" - }, - "links" : { - "elements" : "/gdc/md/PROJECT_ID/obj/DF_ID/elements" - }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/DF_ID", - "tags" : "", - "created" : "2014-04-11 13:45:56", - "identifier" : "attr.person.id.name", - "deprecated" : "0", - "summary" : "", - "title" : "Person Name", - "category" : "attributeDisplayForm", - "updated" : "2014-04-11 13:45:56", - "contributor" : "/gdc/account/profile/USER_ID" - } - } - ], - "fk" : [ - { - "data" : "/gdc/md/PROJECT_ID/obj/FK_ID", - "type" : "col" - } - ], - "dimension": "/gdc/md/PROJECT_ID/obj/DIM_ID" - }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/28", - "tags" : "", - "created" : "2014-04-11 13:45:56", - "identifier" : "attr.person.id", - "deprecated" : "0", - "summary" : "", - "title" : "Person ID", - "category" : "attribute", - "updated" : "2014-04-11 13:45:56", - "contributor" : "/gdc/account/profile/USER_ID" - } - } + "attribute": { + "content": { + "pk": [ + { + "data": "/gdc/md/PROJECT_ID/obj/PK_ID", + "type": "col" + } + ], + "direction": "asc", + "sort": "pk", + "type": "GDC.time.date", + "rel": [], + "compositeAttribute": [], + "compositeAttributePk": [], + "drillDownStepAttributeDF": "/gdc/md/PROJECT_ID/obj/DF_DRILL_DOWN", + "linkAttributeDF": "/gdc/md/PROJECT_ID/obj/DF_LINK", + "folders": [], + "grain": [], + "displayForms": [ + { + "content": { + "formOf": "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", + "expression": "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", + "ldmexpression": "[/gdc/md/PROJECT_ID/obj/DF_LDM_EXPRESSION_ID]" + }, + "links": { + "elements": "/gdc/md/PROJECT_ID/obj/DF_ID/elements" + }, + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/DF_ID", + "tags": "", + "created": "2014-04-11 13:45:56", + "identifier": "attr.person.id.name", + "deprecated": "0", + "summary": "", + "title": "Person Name", + "category": "attributeDisplayForm", + "updated": "2014-04-11 13:45:56", + "contributor": "/gdc/account/profile/USER_ID" + } + } + ], + "fk": [ + { + "data": "/gdc/md/PROJECT_ID/obj/FK_ID", + "type": "col" + } + ], + "dimension": "/gdc/md/PROJECT_ID/obj/DIM_ID" + }, + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/28", + "tags": "", + "created": "2014-04-11 13:45:56", + "identifier": "attr.person.id", + "deprecated": "0", + "summary": "", + "title": "Person ID", + "category": "attribute", + "updated": "2014-04-11 13:45:56", + "contributor": "/gdc/account/profile/USER_ID" + } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/attributeDisplayForm-input.json b/gooddata-java-model/src/test/resources/md/attributeDisplayForm-input.json index 21a799eb6..bfe5a3e7f 100644 --- a/gooddata-java-model/src/test/resources/md/attributeDisplayForm-input.json +++ b/gooddata-java-model/src/test/resources/md/attributeDisplayForm-input.json @@ -1,17 +1,17 @@ { - "attributeDisplayForm" : { - "content" : { - "formOf" : "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", - "expression" : "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", - "default" : 0, - "type" : "TYPE", - "ldmexpression" : "" - }, - "links" : { - "elements" : "/gdc/md/PROJECT_ID/obj/DF_ID/elements" - }, - "meta" : { - "title" : "Person Name" - } - } + "attributeDisplayForm": { + "content": { + "formOf": "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", + "expression": "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", + "default": 0, + "type": "TYPE", + "ldmexpression": "" + }, + "links": { + "elements": "/gdc/md/PROJECT_ID/obj/DF_ID/elements" + }, + "meta": { + "title": "Person Name" + } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/attributeDisplayForm-inputOrig.json b/gooddata-java-model/src/test/resources/md/attributeDisplayForm-inputOrig.json index 5c6daf671..f96f7c57f 100644 --- a/gooddata-java-model/src/test/resources/md/attributeDisplayForm-inputOrig.json +++ b/gooddata-java-model/src/test/resources/md/attributeDisplayForm-inputOrig.json @@ -1,27 +1,27 @@ { - "attributeDisplayForm" : { - "content" : { - "formOf" : "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", - "expression" : "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", - "default" : 1, - "type": "TYPE", - "ldmexpression" : "" - }, - "links" : { - "elements" : "/gdc/md/PROJECT_ID/obj/DF_ID/elements" - }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/DF_ID", - "tags" : "", - "created" : "2014-04-11 13:45:56", - "identifier" : "attr.person.id.name", - "deprecated" : "0", - "summary" : "", - "title" : "Person Name", - "category" : "attributeDisplayForm", - "updated" : "2014-04-11 13:45:56", - "contributor" : "/gdc/account/profile/USER_ID" - } - } + "attributeDisplayForm": { + "content": { + "formOf": "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", + "expression": "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", + "default": 1, + "type": "TYPE", + "ldmexpression": "" + }, + "links": { + "elements": "/gdc/md/PROJECT_ID/obj/DF_ID/elements" + }, + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/DF_ID", + "tags": "", + "created": "2014-04-11 13:45:56", + "identifier": "attr.person.id.name", + "deprecated": "0", + "summary": "", + "title": "Person Name", + "category": "attributeDisplayForm", + "updated": "2014-04-11 13:45:56", + "contributor": "/gdc/account/profile/USER_ID" + } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/attributeDisplayForm.json b/gooddata-java-model/src/test/resources/md/attributeDisplayForm.json index 5c6daf671..f96f7c57f 100644 --- a/gooddata-java-model/src/test/resources/md/attributeDisplayForm.json +++ b/gooddata-java-model/src/test/resources/md/attributeDisplayForm.json @@ -1,27 +1,27 @@ { - "attributeDisplayForm" : { - "content" : { - "formOf" : "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", - "expression" : "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", - "default" : 1, - "type": "TYPE", - "ldmexpression" : "" - }, - "links" : { - "elements" : "/gdc/md/PROJECT_ID/obj/DF_ID/elements" - }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/DF_ID", - "tags" : "", - "created" : "2014-04-11 13:45:56", - "identifier" : "attr.person.id.name", - "deprecated" : "0", - "summary" : "", - "title" : "Person Name", - "category" : "attributeDisplayForm", - "updated" : "2014-04-11 13:45:56", - "contributor" : "/gdc/account/profile/USER_ID" - } - } + "attributeDisplayForm": { + "content": { + "formOf": "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", + "expression": "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", + "default": 1, + "type": "TYPE", + "ldmexpression": "" + }, + "links": { + "elements": "/gdc/md/PROJECT_ID/obj/DF_ID/elements" + }, + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/DF_ID", + "tags": "", + "created": "2014-04-11 13:45:56", + "identifier": "attr.person.id.name", + "deprecated": "0", + "summary": "", + "title": "Person Name", + "category": "attributeDisplayForm", + "updated": "2014-04-11 13:45:56", + "contributor": "/gdc/account/profile/USER_ID" + } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/attributeElement.json b/gooddata-java-model/src/test/resources/md/attributeElement.json index 3300428b0..225400df8 100644 --- a/gooddata-java-model/src/test/resources/md/attributeElement.json +++ b/gooddata-java-model/src/test/resources/md/attributeElement.json @@ -1,4 +1,4 @@ { - "uri" : "/gdc/md/PROJECT_ID/obj/1333/elements?id=6959", - "title" : "1165" + "uri": "/gdc/md/PROJECT_ID/obj/1333/elements?id=6959", + "title": "1165" } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/attributeElements.json b/gooddata-java-model/src/test/resources/md/attributeElements.json index 958cdf13f..f94a8bced 100644 --- a/gooddata-java-model/src/test/resources/md/attributeElements.json +++ b/gooddata-java-model/src/test/resources/md/attributeElements.json @@ -1,25 +1,29 @@ { - "attributeElements" : { - "elements" : [ { - "uri" : "/gdc/md/PROJECT_ID/obj/1333/elements?id=6963", - "title" : "1167" - }, { - "uri" : "/gdc/md/PROJECT_ID/obj/1333/elements?id=6965", - "title" : "1168" - }, { - "uri" : "/gdc/md/PROJECT_ID/obj/1333/elements?id=13716", - "title" : "1169" - } ], - "elementsMeta" : { - "attribute" : "/gdc/md/PROJECT_ID/obj/1333", - "attributeDisplayForm" : "/gdc/md/PROJECT_ID/obj/1364", - "count" : 3, - "order" : "unsorted", - "filter" : "", - "mode" : "includeuris", - "prompt" : "", - "records" : "3", - "offset" : "0" + "attributeElements": { + "elements": [ + { + "uri": "/gdc/md/PROJECT_ID/obj/1333/elements?id=6963", + "title": "1167" + }, + { + "uri": "/gdc/md/PROJECT_ID/obj/1333/elements?id=6965", + "title": "1168" + }, + { + "uri": "/gdc/md/PROJECT_ID/obj/1333/elements?id=13716", + "title": "1169" + } + ], + "elementsMeta": { + "attribute": "/gdc/md/PROJECT_ID/obj/1333", + "attributeDisplayForm": "/gdc/md/PROJECT_ID/obj/1364", + "count": 3, + "order": "unsorted", + "filter": "", + "mode": "includeuris", + "prompt": "", + "records": "3", + "offset": "0" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/attributeSort.json b/gooddata-java-model/src/test/resources/md/attributeSort.json index 0701bef58..93e099862 100644 --- a/gooddata-java-model/src/test/resources/md/attributeSort.json +++ b/gooddata-java-model/src/test/resources/md/attributeSort.json @@ -1,5 +1,5 @@ { - "df" : { - "uri" : "/gdc/md/PROJECT_ID/obj/1806" + "df": { + "uri": "/gdc/md/PROJECT_ID/obj/1806" } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/column.json b/gooddata-java-model/src/test/resources/md/column.json index 3a1743c79..27e511a24 100644 --- a/gooddata-java-model/src/test/resources/md/column.json +++ b/gooddata-java-model/src/test/resources/md/column.json @@ -1,23 +1,23 @@ { - "column" : { - "content" : { - "columnType" : "pk", - "table" : "/gdc/md/PROJECT_ID/obj/9538", - "columnDBName" : "id" + "column": { + "content": { + "columnType": "pk", + "table": "/gdc/md/PROJECT_ID/obj/9538", + "columnDBName": "id" }, - "meta" : { - "author" : "/gdc/account/profile/PROFILE_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/9539", - "tags" : "", - "created" : "2012-08-10 13:06:43", - "identifier" : "col.d_zendesktickets_vehicleview.id", - "deprecated" : "0", - "summary" : "", - "isProduction" : 1, - "title" : "col.d_zendesktickets_vehicleview.id", - "category" : "column", - "updated" : "2012-08-10 13:06:43", - "contributor" : "/gdc/account/profile/PROFILE_ID" + "meta": { + "author": "/gdc/account/profile/PROFILE_ID", + "uri": "/gdc/md/PROJECT_ID/obj/9539", + "tags": "", + "created": "2012-08-10 13:06:43", + "identifier": "col.d_zendesktickets_vehicleview.id", + "deprecated": "0", + "summary": "", + "isProduction": 1, + "title": "col.d_zendesktickets_vehicleview.id", + "category": "column", + "updated": "2012-08-10 13:06:43", + "contributor": "/gdc/account/profile/PROFILE_ID" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/dashboard/analyticalDashboard-new.json b/gooddata-java-model/src/test/resources/md/dashboard/analyticalDashboard-new.json index a03c9811b..b5d195baf 100644 --- a/gooddata-java-model/src/test/resources/md/dashboard/analyticalDashboard-new.json +++ b/gooddata-java-model/src/test/resources/md/dashboard/analyticalDashboard-new.json @@ -1,14 +1,14 @@ { - "analyticalDashboard" : { - "content" : { - "filterContext" : "/fc/1", - "widgets" : [ + "analyticalDashboard": { + "content": { + "filterContext": "/fc/1", + "widgets": [ "/w/1", "/w/2" ] }, - "meta" : { - "title" : "New KPIs" + "meta": { + "title": "New KPIs" } } } diff --git a/gooddata-java-model/src/test/resources/md/dashboard/analyticalDashboard-out.json b/gooddata-java-model/src/test/resources/md/dashboard/analyticalDashboard-out.json index 289ccb308..2b126c6e6 100644 --- a/gooddata-java-model/src/test/resources/md/dashboard/analyticalDashboard-out.json +++ b/gooddata-java-model/src/test/resources/md/dashboard/analyticalDashboard-out.json @@ -1,24 +1,24 @@ { - "analyticalDashboard" : { - "content" : { - "filterContext" : "/gdc/md/projectID/obj/76102", - "widgets" : [ + "analyticalDashboard": { + "content": { + "filterContext": "/gdc/md/projectID/obj/76102", + "widgets": [ "/gdc/md/projectID/obj/76101" ] }, - "meta" : { - "author" : "/gdc/account/profile/profileID", - "category" : "analyticalDashboard", - "contributor" : "/gdc/account/profile/profileID", - "created" : "2019-05-28 13:25:12", - "deprecated" : "0", - "identifier" : "aamVx0ZviiKv", - "isProduction" : 1, - "summary" : "", - "tags" : "", - "title" : "KPIs #1", - "updated" : "2019-05-28 13:25:12", - "uri" : "/gdc/md/projectID/obj/76103" + "meta": { + "author": "/gdc/account/profile/profileID", + "category": "analyticalDashboard", + "contributor": "/gdc/account/profile/profileID", + "created": "2019-05-28 13:25:12", + "deprecated": "0", + "identifier": "aamVx0ZviiKv", + "isProduction": 1, + "summary": "", + "tags": "", + "title": "KPIs #1", + "updated": "2019-05-28 13:25:12", + "uri": "/gdc/md/projectID/obj/76103" } } } diff --git a/gooddata-java-model/src/test/resources/md/dashboard/filter/dashboardDateFilter-absolute.json b/gooddata-java-model/src/test/resources/md/dashboard/filter/dashboardDateFilter-absolute.json index 9faec8e1a..0643b3e33 100644 --- a/gooddata-java-model/src/test/resources/md/dashboard/filter/dashboardDateFilter-absolute.json +++ b/gooddata-java-model/src/test/resources/md/dashboard/filter/dashboardDateFilter-absolute.json @@ -1,8 +1,8 @@ { - "dateFilter" : { - "from" : "2019-06-01", - "to" : "2019-06-30", - "type" : "absolute", + "dateFilter": { + "from": "2019-06-01", + "to": "2019-06-30", + "type": "absolute", "granularity": "GDC.time.date", "dataSet": "/ds/uri" } diff --git a/gooddata-java-model/src/test/resources/md/dashboard/filter/dashboardDateFilter-relative.json b/gooddata-java-model/src/test/resources/md/dashboard/filter/dashboardDateFilter-relative.json index 4816404eb..fa59ac442 100644 --- a/gooddata-java-model/src/test/resources/md/dashboard/filter/dashboardDateFilter-relative.json +++ b/gooddata-java-model/src/test/resources/md/dashboard/filter/dashboardDateFilter-relative.json @@ -1,9 +1,9 @@ { - "dateFilter" : { - "from" : "-6", - "granularity" : "GDC.time.year", - "to" : "-1", - "type" : "relative", + "dateFilter": { + "from": "-6", + "granularity": "GDC.time.year", + "to": "-1", + "type": "relative", "dataSet": "/ds/uri" } } diff --git a/gooddata-java-model/src/test/resources/md/dashboard/filter/filterContext-new.json b/gooddata-java-model/src/test/resources/md/dashboard/filter/filterContext-new.json index 3924a0c17..14dec3ce7 100644 --- a/gooddata-java-model/src/test/resources/md/dashboard/filter/filterContext-new.json +++ b/gooddata-java-model/src/test/resources/md/dashboard/filter/filterContext-new.json @@ -1,28 +1,28 @@ { - "filterContext" : { - "content" : { - "filters" : [ + "filterContext": { + "content": { + "filters": [ { - "dateFilter" : { - "from" : "-1", - "granularity" : "GDC.time.year", - "to" : "-1", - "type" : "relative" + "dateFilter": { + "from": "-1", + "granularity": "GDC.time.year", + "to": "-1", + "type": "relative" } }, { - "attributeFilter" : { - "attributeElements" : [ + "attributeFilter": { + "attributeElements": [ "/elem/1" ], - "displayForm" : "/df/1", - "negativeSelection" : false + "displayForm": "/df/1", + "negativeSelection": false } } ] }, - "meta" : { - "title" : "filterContext" + "meta": { + "title": "filterContext" } } } diff --git a/gooddata-java-model/src/test/resources/md/dashboard/filter/filterContext-out.json b/gooddata-java-model/src/test/resources/md/dashboard/filter/filterContext-out.json index f51540d2b..2e759ea24 100644 --- a/gooddata-java-model/src/test/resources/md/dashboard/filter/filterContext-out.json +++ b/gooddata-java-model/src/test/resources/md/dashboard/filter/filterContext-out.json @@ -1,39 +1,39 @@ { - "filterContext" : { - "content" : { - "filters" : [ + "filterContext": { + "content": { + "filters": [ { - "dateFilter" : { - "from" : "-1", - "granularity" : "GDC.time.year", - "to" : "-1", - "type" : "relative" + "dateFilter": { + "from": "-1", + "granularity": "GDC.time.year", + "to": "-1", + "type": "relative" } }, { - "attributeFilter" : { - "attributeElements" : [ + "attributeFilter": { + "attributeElements": [ "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/1023/elements?id=1225" ], - "displayForm" : "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/1024", - "negativeSelection" : false + "displayForm": "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/1024", + "negativeSelection": false } } ] }, - "meta" : { - "author" : "/gdc/account/profile/9d6aac8f5372a21685ed663a082108c8", - "category" : "filterContext", - "contributor" : "/gdc/account/profile/9d6aac8f5372a21685ed663a082108c8", - "created" : "2019-05-23 13:25:16", - "deprecated" : "0", - "identifier" : "aadsk197gClX", - "isProduction" : 1, - "summary" : "", - "tags" : "", - "title" : "filterContext", - "updated" : "2019-06-06 10:19:22", - "uri" : "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/75575" + "meta": { + "author": "/gdc/account/profile/9d6aac8f5372a21685ed663a082108c8", + "category": "filterContext", + "contributor": "/gdc/account/profile/9d6aac8f5372a21685ed663a082108c8", + "created": "2019-05-23 13:25:16", + "deprecated": "0", + "identifier": "aadsk197gClX", + "isProduction": 1, + "summary": "", + "tags": "", + "title": "filterContext", + "updated": "2019-06-06 10:19:22", + "uri": "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/75575" } } } diff --git a/gooddata-java-model/src/test/resources/md/dashboard/kpi-new.json b/gooddata-java-model/src/test/resources/md/dashboard/kpi-new.json index 2953a7896..1b46274c6 100644 --- a/gooddata-java-model/src/test/resources/md/dashboard/kpi-new.json +++ b/gooddata-java-model/src/test/resources/md/dashboard/kpi-new.json @@ -1,10 +1,10 @@ { - "kpi" : { - "content" : { - "comparisonDirection" : "growIsGood", - "comparisonType" : "lastYear", - "dateDataSet" : "/dateDs/1", - "metric" : "/metric/1", + "kpi": { + "content": { + "comparisonDirection": "growIsGood", + "comparisonType": "lastYear", + "dateDataSet": "/dateDs/1", + "metric": "/metric/1", "ignoreDashboardFilters": [ { "dateFilterReference": { @@ -13,8 +13,8 @@ } ] }, - "meta" : { - "title" : "KPI 1" + "meta": { + "title": "KPI 1" } } } diff --git a/gooddata-java-model/src/test/resources/md/dashboard/kpiAlert-new.json b/gooddata-java-model/src/test/resources/md/dashboard/kpiAlert-new.json index bee2a895f..2b365afe6 100644 --- a/gooddata-java-model/src/test/resources/md/dashboard/kpiAlert-new.json +++ b/gooddata-java-model/src/test/resources/md/dashboard/kpiAlert-new.json @@ -1,15 +1,15 @@ { - "kpiAlert" : { - "content" : { - "dashboard" : "/dashboard/1", - "filterContext" : "/filter/context/1", - "isTriggered" : false, - "kpi" : "/kpi/1", - "threshold" : 100.0, - "whenTriggered" : "belowThreshold" + "kpiAlert": { + "content": { + "dashboard": "/dashboard/1", + "filterContext": "/filter/context/1", + "isTriggered": false, + "kpi": "/kpi/1", + "threshold": 100.0, + "whenTriggered": "belowThreshold" }, - "meta" : { - "title" : "kpi alert new" + "meta": { + "title": "kpi alert new" } } } diff --git a/gooddata-java-model/src/test/resources/md/dashboard/kpiAlert-out.json b/gooddata-java-model/src/test/resources/md/dashboard/kpiAlert-out.json index 6a7bf7c08..f97a567c3 100644 --- a/gooddata-java-model/src/test/resources/md/dashboard/kpiAlert-out.json +++ b/gooddata-java-model/src/test/resources/md/dashboard/kpiAlert-out.json @@ -1,26 +1,26 @@ { - "kpiAlert" : { - "content" : { - "dashboard" : "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/75576", - "filterContext" : "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/75826", - "isTriggered" : false, - "kpi" : "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/75809", - "threshold" : 100.0, - "whenTriggered" : "aboveThreshold" + "kpiAlert": { + "content": { + "dashboard": "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/75576", + "filterContext": "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/75826", + "isTriggered": false, + "kpi": "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/75809", + "threshold": 100.0, + "whenTriggered": "aboveThreshold" }, - "meta" : { - "author" : "/gdc/account/profile/9d6aac8f5372a21685ed663a082108c8", - "category" : "kpiAlert", - "contributor" : "/gdc/account/profile/9d6aac8f5372a21685ed663a082108c8", - "created" : "2019-05-29 15:37:47", - "deprecated" : "0", - "identifier" : "aab1Ypj2fNUS", - "isProduction" : 1, - "summary" : "", - "tags" : "", - "title" : "kpi alert", - "updated" : "2019-06-06 10:19:25", - "uri" : "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/75827" + "meta": { + "author": "/gdc/account/profile/9d6aac8f5372a21685ed663a082108c8", + "category": "kpiAlert", + "contributor": "/gdc/account/profile/9d6aac8f5372a21685ed663a082108c8", + "created": "2019-05-29 15:37:47", + "deprecated": "0", + "identifier": "aab1Ypj2fNUS", + "isProduction": 1, + "summary": "", + "tags": "", + "title": "kpi alert", + "updated": "2019-06-06 10:19:25", + "uri": "/gdc/md/lkljlgpbqziy3mjjtczf5nbeu32ck1iz/obj/75827" } } } diff --git a/gooddata-java-model/src/test/resources/md/dataLoadingColumn.json b/gooddata-java-model/src/test/resources/md/dataLoadingColumn.json index d292b98a1..bc1f105e6 100644 --- a/gooddata-java-model/src/test/resources/md/dataLoadingColumn.json +++ b/gooddata-java-model/src/test/resources/md/dataLoadingColumn.json @@ -1,34 +1,34 @@ { - "dataLoadingColumn" : { - "content" : { - "columnName" : "COLUMN_NAME", - "columnUnique" : 0, - "columnPrecision" : null, - "columnNull" : 1, - "columnType" : "INT", - "columnLength" : 128, - "column" : { - "uri" : "/gdc/md/PROJECT_ID/obj/COLUMN_ID" + "dataLoadingColumn": { + "content": { + "columnName": "COLUMN_NAME", + "columnUnique": 0, + "columnPrecision": null, + "columnNull": 1, + "columnType": "INT", + "columnLength": 128, + "column": { + "uri": "/gdc/md/PROJECT_ID/obj/COLUMN_ID" }, - "columnSynchronize" : { - "columnType" : "INT", - "columnLength" : 128, - "columnPrecision" : 0 + "columnSynchronize": { + "columnType": "INT", + "columnLength": 128, + "columnPrecision": 0 } }, - "meta" : { - "author" : "/gdc/account/profile/PROFILE_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/DATA_LOADING_COLUMN_ID", - "tags" : "", - "created" : "2016-02-29 13:24:37", - "identifier" : "IDENTIFIER", - "deprecated" : "0", - "summary" : "", - "isProduction" : 1, - "title" : "TITLE", - "category" : "dataLoadingColumn", - "updated" : "2016-03-03 13:14:04", - "contributor" : "/gdc/account/profile/PROFILE_ID" + "meta": { + "author": "/gdc/account/profile/PROFILE_ID", + "uri": "/gdc/md/PROJECT_ID/obj/DATA_LOADING_COLUMN_ID", + "tags": "", + "created": "2016-02-29 13:24:37", + "identifier": "IDENTIFIER", + "deprecated": "0", + "summary": "", + "isProduction": 1, + "title": "TITLE", + "category": "dataLoadingColumn", + "updated": "2016-03-03 13:14:04", + "contributor": "/gdc/account/profile/PROFILE_ID" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/dataset-input.json b/gooddata-java-model/src/test/resources/md/dataset-input.json index ea89d6c04..aec1284d6 100644 --- a/gooddata-java-model/src/test/resources/md/dataset-input.json +++ b/gooddata-java-model/src/test/resources/md/dataset-input.json @@ -1,14 +1,14 @@ { - "dataSet" : { - "content" : { + "dataSet": { + "content": { "ties": [], "facts": [], "dataLoadingColumns": [], "attributes": [], "hasUploadConfiguration": "0" }, - "meta" : { - "title" : "Dataset" + "meta": { + "title": "Dataset" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/dimension-input.json b/gooddata-java-model/src/test/resources/md/dimension-input.json index b4ebc2a5e..cd7ea240c 100644 --- a/gooddata-java-model/src/test/resources/md/dimension-input.json +++ b/gooddata-java-model/src/test/resources/md/dimension-input.json @@ -1,10 +1,10 @@ { - "dimension" : { - "content" : { - "attributes" : [] + "dimension": { + "content": { + "attributes": [] }, - "meta" : { - "title" : "Dimension" + "meta": { + "title": "Dimension" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/dimension.json b/gooddata-java-model/src/test/resources/md/dimension.json index a34435812..5d87d02dd 100644 --- a/gooddata-java-model/src/test/resources/md/dimension.json +++ b/gooddata-java-model/src/test/resources/md/dimension.json @@ -1,139 +1,139 @@ { - "dimension" : { - "content" : { - "attributes" : [ + "dimension": { + "content": { + "attributes": [ { - "content" : { - "direction" : "asc", - "sort" : "pk", - "pk" : [ + "content": { + "direction": "asc", + "sort": "pk", + "pk": [ { - "data" : "/gdc/md/PROJECT_ID/obj/4", - "type" : "col" + "data": "/gdc/md/PROJECT_ID/obj/4", + "type": "col" } ], - "dimension" : "/gdc/md/PROJECT_ID/obj/2", - "type" : "GDC.time.date", - "displayForms" : [ + "dimension": "/gdc/md/PROJECT_ID/obj/2", + "type": "GDC.time.date", + "displayForms": [ { - "content" : { - "formOf" : "/gdc/md/PROJECT_ID/obj/28", - "expression" : "[/gdc/md/PROJECT_ID/obj/24]", - "type" : "GDC.time.day_us", - "ldmexpression" : "" + "content": { + "formOf": "/gdc/md/PROJECT_ID/obj/28", + "expression": "[/gdc/md/PROJECT_ID/obj/24]", + "type": "GDC.time.day_us", + "ldmexpression": "" }, - "links" : { - "elements" : "/gdc/md/PROJECT_ID/obj/31/elements" + "links": { + "elements": "/gdc/md/PROJECT_ID/obj/31/elements" }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/31", - "tags" : "", - "created" : "2015-05-19 11:54:05", - "identifier" : "created.date.mmddyyyy", - "deprecated" : "0", - "summary" : "DisplayForm mm/dd/yyyy.", - "title" : "mm/dd/yyyy (Ticket Created)", - "category" : "attributeDisplayForm", - "updated" : "2015-05-19 11:54:05", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/31", + "tags": "", + "created": "2015-05-19 11:54:05", + "identifier": "created.date.mmddyyyy", + "deprecated": "0", + "summary": "DisplayForm mm/dd/yyyy.", + "title": "mm/dd/yyyy (Ticket Created)", + "category": "attributeDisplayForm", + "updated": "2015-05-19 11:54:05", + "contributor": "/gdc/account/profile/USER_ID" } } ], - "fk" : [ + "fk": [ { - "data" : "/gdc/md/PROJECT_ID/obj/1177", - "type" : "col" + "data": "/gdc/md/PROJECT_ID/obj/1177", + "type": "col" } ] }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/28", - "tags" : "date", - "created" : "2015-05-19 11:54:05", - "identifier" : "created.date", - "deprecated" : "0", - "summary" : "Date ticket created", - "title" : "Date (Ticket Created)", - "category" : "attribute", - "updated" : "2015-05-19 11:54:05", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/28", + "tags": "date", + "created": "2015-05-19 11:54:05", + "identifier": "created.date", + "deprecated": "0", + "summary": "Date ticket created", + "title": "Date (Ticket Created)", + "category": "attribute", + "updated": "2015-05-19 11:54:05", + "contributor": "/gdc/account/profile/USER_ID" } }, { - "content" : { - "pk" : [ + "content": { + "pk": [ { - "data" : "/gdc/md/PROJECT_ID/obj/36", - "type" : "col" + "data": "/gdc/md/PROJECT_ID/obj/36", + "type": "col" } ], - "displayForms" : [ + "displayForms": [ { - "content" : { - "formOf" : "/gdc/md/PROJECT_ID/obj/40", - "expression" : "[/gdc/md/PROJECT_ID/obj/39]", - "ldmexpression" : "" + "content": { + "formOf": "/gdc/md/PROJECT_ID/obj/40", + "expression": "[/gdc/md/PROJECT_ID/obj/39]", + "ldmexpression": "" }, - "links" : { - "elements" : "/gdc/md/PROJECT_ID/obj/43/elements" + "links": { + "elements": "/gdc/md/PROJECT_ID/obj/43/elements" }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/43", - "tags" : "", - "created" : "2015-05-19 11:54:05", - "identifier" : "created.abY81lMifn6q", - "deprecated" : "0", - "summary" : "DisplayForm Long (Monday).", - "title" : "Long (Monday) (Ticket Created)", - "category" : "attributeDisplayForm", - "updated" : "2015-05-19 11:54:05", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/43", + "tags": "", + "created": "2015-05-19 11:54:05", + "identifier": "created.abY81lMifn6q", + "deprecated": "0", + "summary": "DisplayForm Long (Monday).", + "title": "Long (Monday) (Ticket Created)", + "category": "attributeDisplayForm", + "updated": "2015-05-19 11:54:05", + "contributor": "/gdc/account/profile/USER_ID" } } ], - "direction" : "asc", - "drillDownStepAttributeDF" : "/gdc/md/PROJECT_ID/obj/31", - "sort" : "pk", - "dimension" : "/gdc/md/PROJECT_ID/obj/2", - "type" : "GDC.time.day_in_euweek", - "fk" : [ + "direction": "asc", + "drillDownStepAttributeDF": "/gdc/md/PROJECT_ID/obj/31", + "sort": "pk", + "dimension": "/gdc/md/PROJECT_ID/obj/2", + "type": "GDC.time.day_in_euweek", + "fk": [ { - "data" : "/gdc/md/PROJECT_ID/obj/8", - "type" : "col" + "data": "/gdc/md/PROJECT_ID/obj/8", + "type": "col" } ] }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/40", - "tags" : "date day eu week", - "created" : "2015-05-19 11:54:05", - "identifier" : "created.day.in.euweek", - "deprecated" : "0", - "summary" : "Generic Day based on EU Week (Mon-Sun)", - "title" : "Day of Week (Mon-Sun) (Ticket Created)", - "category" : "attribute", - "updated" : "2015-05-19 11:54:05", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/40", + "tags": "date day eu week", + "created": "2015-05-19 11:54:05", + "identifier": "created.day.in.euweek", + "deprecated": "0", + "summary": "Generic Day based on EU Week (Mon-Sun)", + "title": "Day of Week (Mon-Sun) (Ticket Created)", + "category": "attribute", + "updated": "2015-05-19 11:54:05", + "contributor": "/gdc/account/profile/USER_ID" } } ] }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/2", - "tags" : "", - "created" : "2015-05-19 11:54:05", - "identifier" : "created.dim_date", - "deprecated" : "0", - "summary" : "", - "title" : "Date (Ticket Created)", - "category" : "dimension", - "updated" : "2015-05-19 11:54:05", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/2", + "tags": "", + "created": "2015-05-19 11:54:05", + "identifier": "created.dim_date", + "deprecated": "0", + "summary": "", + "title": "Date (Ticket Created)", + "category": "dimension", + "updated": "2015-05-19 11:54:05", + "contributor": "/gdc/account/profile/USER_ID" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/dimensionAttribute.json b/gooddata-java-model/src/test/resources/md/dimensionAttribute.json index 9dc03e7b0..f826c1a00 100644 --- a/gooddata-java-model/src/test/resources/md/dimensionAttribute.json +++ b/gooddata-java-model/src/test/resources/md/dimensionAttribute.json @@ -1,59 +1,59 @@ { - "content" : { - "direction" : "asc", - "sort" : "pk", - "pk" : [ + "content": { + "direction": "asc", + "sort": "pk", + "pk": [ { - "data" : "/gdc/md/PROJECT_ID/obj/4", - "type" : "col" + "data": "/gdc/md/PROJECT_ID/obj/4", + "type": "col" } ], - "dimension" : "/gdc/md/PROJECT_ID/obj/DIM_ID", - "type" : "GDC.time.date", - "displayForms" : [ + "dimension": "/gdc/md/PROJECT_ID/obj/DIM_ID", + "type": "GDC.time.date", + "displayForms": [ { - "content" : { - "formOf" : "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", - "expression" : "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", - "type" : "GDC.time.day_us", - "ldmexpression" : "" + "content": { + "formOf": "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", + "expression": "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", + "type": "GDC.time.day_us", + "ldmexpression": "" }, - "links" : { - "elements" : "/gdc/md/PROJECT_ID/obj/31/elements" + "links": { + "elements": "/gdc/md/PROJECT_ID/obj/31/elements" }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/31", - "tags" : "", - "created" : "2015-05-19 11:54:05", - "identifier" : "created.date.mmddyyyy", - "deprecated" : "0", - "summary" : "DisplayForm mm/dd/yyyy.", - "title" : "mm/dd/yyyy (Ticket Created)", - "category" : "attributeDisplayForm", - "updated" : "2015-05-19 11:54:05", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/31", + "tags": "", + "created": "2015-05-19 11:54:05", + "identifier": "created.date.mmddyyyy", + "deprecated": "0", + "summary": "DisplayForm mm/dd/yyyy.", + "title": "mm/dd/yyyy (Ticket Created)", + "category": "attributeDisplayForm", + "updated": "2015-05-19 11:54:05", + "contributor": "/gdc/account/profile/USER_ID" } } ], - "fk" : [ + "fk": [ { - "data" : "/gdc/md/PROJECT_ID/obj/1177", - "type" : "col" + "data": "/gdc/md/PROJECT_ID/obj/1177", + "type": "col" } ] }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/28", - "tags" : "date", - "created" : "2015-05-19 11:54:05", - "identifier" : "created.date", - "deprecated" : "0", - "summary" : "Date ticket created", - "title" : "Date (Ticket Created)", - "category" : "attribute", - "updated" : "2015-05-19 11:54:05", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/28", + "tags": "date", + "created": "2015-05-19 11:54:05", + "identifier": "created.date", + "deprecated": "0", + "summary": "Date ticket created", + "title": "Date (Ticket Created)", + "category": "attribute", + "updated": "2015-05-19 11:54:05", + "contributor": "/gdc/account/profile/USER_ID" } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/displayForm-input.json b/gooddata-java-model/src/test/resources/md/displayForm-input.json index 8ddb15aad..11e2ccd5e 100644 --- a/gooddata-java-model/src/test/resources/md/displayForm-input.json +++ b/gooddata-java-model/src/test/resources/md/displayForm-input.json @@ -1,13 +1,13 @@ { - "content" : { - "formOf" : "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", - "expression" : "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", - "ldmexpression" : "" + "content": { + "formOf": "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", + "expression": "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", + "ldmexpression": "" }, - "links" : { - "elements" : "/gdc/md/PROJECT_ID/obj/DF_ID/elements" + "links": { + "elements": "/gdc/md/PROJECT_ID/obj/DF_ID/elements" }, - "meta" : { - "title" : "Person Name" + "meta": { + "title": "Person Name" } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/displayForm.json b/gooddata-java-model/src/test/resources/md/displayForm.json index 4b2c4dca5..5a141cf48 100644 --- a/gooddata-java-model/src/test/resources/md/displayForm.json +++ b/gooddata-java-model/src/test/resources/md/displayForm.json @@ -1,23 +1,23 @@ { - "content" : { - "formOf" : "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", - "expression" : "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", - "ldmexpression" : "" + "content": { + "formOf": "/gdc/md/PROJECT_ID/obj/DF_FORM_OF_ID", + "expression": "[/gdc/md/PROJECT_ID/obj/DF_EXPRESSION_ID]", + "ldmexpression": "" }, - "links" : { - "elements" : "/gdc/md/PROJECT_ID/obj/DF_ID/elements" + "links": { + "elements": "/gdc/md/PROJECT_ID/obj/DF_ID/elements" }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/DF_ID", - "tags" : "", - "created" : "2014-04-11 13:45:56", - "identifier" : "attr.person.id.name", - "deprecated" : "0", - "summary" : "", - "title" : "Person Name", - "category" : "attributeDisplayForm", - "updated" : "2014-04-11 13:45:56", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/DF_ID", + "tags": "", + "created": "2014-04-11 13:45:56", + "identifier": "attr.person.id.name", + "deprecated": "0", + "summary": "", + "title": "Person Name", + "category": "attributeDisplayForm", + "updated": "2014-04-11 13:45:56", + "contributor": "/gdc/account/profile/USER_ID" } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/entry.json b/gooddata-java-model/src/test/resources/md/entry.json index 84d5f41e0..14028e309 100644 --- a/gooddata-java-model/src/test/resources/md/entry.json +++ b/gooddata-java-model/src/test/resources/md/entry.json @@ -1,15 +1,15 @@ { - "link": "/gdc/md/PROJECT_ID/obj/ENTRY_ID", - "title": "Entry title", - "summary": "Entry summary", - "category": "ENTRY_CATEGORY", - "author": "/gdc/account/profile/AUTHOR_USER_ID", - "contributor": "/gdc/account/profile/CONTRIBUTOR_USER_ID", - "deprecated": "1", - "identifier": "ID", - "locked": 1, - "unlisted": 0, - "tags": "TAG", - "created": "2014-04-11 13:45:54", - "updated": "2014-04-11 13:45:55" + "link": "/gdc/md/PROJECT_ID/obj/ENTRY_ID", + "title": "Entry title", + "summary": "Entry summary", + "category": "ENTRY_CATEGORY", + "author": "/gdc/account/profile/AUTHOR_USER_ID", + "contributor": "/gdc/account/profile/CONTRIBUTOR_USER_ID", + "deprecated": "1", + "identifier": "ID", + "locked": 1, + "unlisted": 0, + "tags": "TAG", + "created": "2014-04-11 13:45:54", + "updated": "2014-04-11 13:45:55" } diff --git a/gooddata-java-model/src/test/resources/md/fact-input.json b/gooddata-java-model/src/test/resources/md/fact-input.json index 54fcc4aa9..44d74b2a5 100644 --- a/gooddata-java-model/src/test/resources/md/fact-input.json +++ b/gooddata-java-model/src/test/resources/md/fact-input.json @@ -1,18 +1,18 @@ { - "fact" : { - "content" : { - "expr" : [ - { - "data" : "/gdc/md/PROJECT_ID/obj/COL_ID", - "type" : "col" - } - ], - "folders" : [ - "/gdc/md/PROJECT_ID/obj/FOLDER_ID" - ] - }, - "meta" : { - "title" : "Person Shoe Size" + "fact": { + "content": { + "expr": [ + { + "data": "/gdc/md/PROJECT_ID/obj/COL_ID", + "type": "col" } + ], + "folders": [ + "/gdc/md/PROJECT_ID/obj/FOLDER_ID" + ] + }, + "meta": { + "title": "Person Shoe Size" } + } } diff --git a/gooddata-java-model/src/test/resources/md/fact.json b/gooddata-java-model/src/test/resources/md/fact.json index c89971215..86017a278 100644 --- a/gooddata-java-model/src/test/resources/md/fact.json +++ b/gooddata-java-model/src/test/resources/md/fact.json @@ -1,29 +1,29 @@ { - "fact" : { - "content" : { - "expr" : [ - { - "data" : "/gdc/md/PROJECT_ID/obj/COL_ID", - "type" : "col" - } - ], - "folders" : [ - "/gdc/md/PROJECT_ID/obj/FOLDER_ID", - "/gdc/md/PROJECT_ID/obj/FOLDER_ID2" - ] - }, - "meta" : { - "author" : "/gdc/account/profile/AUTHOR_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/FACT_ID", - "tags" : "", - "created" : "2014-04-11 13:45:53", - "identifier" : "fact.person.shoesize", - "deprecated" : "0", - "summary" : "", - "title" : "Person Shoe Size", - "category" : "fact", - "updated" : "2014-04-11 13:46:52", - "contributor" : "/gdc/account/profile/CONTRIBUTOR_ID" + "fact": { + "content": { + "expr": [ + { + "data": "/gdc/md/PROJECT_ID/obj/COL_ID", + "type": "col" } + ], + "folders": [ + "/gdc/md/PROJECT_ID/obj/FOLDER_ID", + "/gdc/md/PROJECT_ID/obj/FOLDER_ID2" + ] + }, + "meta": { + "author": "/gdc/account/profile/AUTHOR_ID", + "uri": "/gdc/md/PROJECT_ID/obj/FACT_ID", + "tags": "", + "created": "2014-04-11 13:45:53", + "identifier": "fact.person.shoesize", + "deprecated": "0", + "summary": "", + "title": "Person Shoe Size", + "category": "fact", + "updated": "2014-04-11 13:46:52", + "contributor": "/gdc/account/profile/CONTRIBUTOR_ID" } + } } diff --git a/gooddata-java-model/src/test/resources/md/meta-withFlags.json b/gooddata-java-model/src/test/resources/md/meta-withFlags.json index 372c115c6..4cbf3e32d 100644 --- a/gooddata-java-model/src/test/resources/md/meta-withFlags.json +++ b/gooddata-java-model/src/test/resources/md/meta-withFlags.json @@ -1,18 +1,21 @@ { - "author": "/gdc/account/profile/USER_ID", - "uri": "/gdc/md/PROJECT_ID/obj/OBJ_ID", - "tags": "TAG1 TAG2", - "created": "2014-04-11 13:45:56", - "identifier": "attr.person.id.name", - "deprecated": "0", - "summary": "Obj summary", - "title": "Obj title", - "category": "attributeDisplayForm", - "updated": "2014-04-11 13:45:57", - "contributor": "/gdc/account/profile/CONTRIBUTOR_USER_ID", - "locked": 0, - "unlisted": 1, - "isProduction": 1, - "sharedWithSomeone": 0, - "flags" : [ "preloaded", "strictAccessControl"] + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/OBJ_ID", + "tags": "TAG1 TAG2", + "created": "2014-04-11 13:45:56", + "identifier": "attr.person.id.name", + "deprecated": "0", + "summary": "Obj summary", + "title": "Obj title", + "category": "attributeDisplayForm", + "updated": "2014-04-11 13:45:57", + "contributor": "/gdc/account/profile/CONTRIBUTOR_USER_ID", + "locked": 0, + "unlisted": 1, + "isProduction": 1, + "sharedWithSomeone": 0, + "flags": [ + "preloaded", + "strictAccessControl" + ] } diff --git a/gooddata-java-model/src/test/resources/md/meta.json b/gooddata-java-model/src/test/resources/md/meta.json index 65c7e8513..4cbf3e32d 100644 --- a/gooddata-java-model/src/test/resources/md/meta.json +++ b/gooddata-java-model/src/test/resources/md/meta.json @@ -1,18 +1,21 @@ { - "author": "/gdc/account/profile/USER_ID", - "uri": "/gdc/md/PROJECT_ID/obj/OBJ_ID", - "tags": "TAG1 TAG2", - "created": "2014-04-11 13:45:56", - "identifier": "attr.person.id.name", - "deprecated": "0", - "summary": "Obj summary", - "title": "Obj title", - "category": "attributeDisplayForm", - "updated": "2014-04-11 13:45:57", - "contributor": "/gdc/account/profile/CONTRIBUTOR_USER_ID", - "locked": 0, - "unlisted": 1, - "isProduction": 1, - "sharedWithSomeone": 0, - "flags": ["preloaded", "strictAccessControl"] + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/OBJ_ID", + "tags": "TAG1 TAG2", + "created": "2014-04-11 13:45:56", + "identifier": "attr.person.id.name", + "deprecated": "0", + "summary": "Obj summary", + "title": "Obj title", + "category": "attributeDisplayForm", + "updated": "2014-04-11 13:45:57", + "contributor": "/gdc/account/profile/CONTRIBUTOR_USER_ID", + "locked": 0, + "unlisted": 1, + "isProduction": 1, + "sharedWithSomeone": 0, + "flags": [ + "preloaded", + "strictAccessControl" + ] } diff --git a/gooddata-java-model/src/test/resources/md/metric-links.json b/gooddata-java-model/src/test/resources/md/metric-links.json index 3982b5661..38f726db2 100644 --- a/gooddata-java-model/src/test/resources/md/metric-links.json +++ b/gooddata-java-model/src/test/resources/md/metric-links.json @@ -1,61 +1,61 @@ { - "metric": { - "content": { - "format": "#,##0", - "tree": { + "metric": { + "content": { + "format": "#,##0", + "tree": { + "content": [ + { + "content": [ + { + "value": "AVG", "content": [ - { - "content": [ - { - "value": "AVG", - "content": [ - { - "value": "/gdc/md/PROJECT_ID/obj/EXPR_ID", - "position": { - "column": 12, - "line": 2 - }, - "type": "fact object" - } - ], - "position": { - "column": 8, - "line": 2 - }, - "type": "function" - } - ], - "position": { - "column": 8, - "line": 2 - }, - "type": "expression" - } + { + "value": "/gdc/md/PROJECT_ID/obj/EXPR_ID", + "position": { + "column": 12, + "line": 2 + }, + "type": "fact object" + } ], "position": { - "column": 1, - "line": 2 + "column": 8, + "line": 2 }, - "type": "metric" + "type": "function" + } + ], + "position": { + "column": 8, + "line": 2 }, - "expression": "SELECT AVG([/gdc/md/PROJECT_ID/obj/EXPR_ID])" + "type": "expression" + } + ], + "position": { + "column": 1, + "line": 2 }, - "links": { - "explain2": "/gdc/md/cpn1dbltx3at2wrmfl79inlxs76oxb7h/obj/47/explain2" - }, - "meta": { - "author": "/gdc/account/profile/PROFILE_ID", - "uri": "/gdc/md/PROJECT_ID/obj/47", - "tags": "", - "created": "2015-10-10 12:56:13", - "identifier": "MY_ID", - "deprecated": "0", - "summary": "", - "isProduction": 1, - "title": "Avg shoe size", - "category": "metric", - "updated": "2015-10-10 12:56:13", - "contributor": "/gdc/account/profile/PROFILE_ID" - } + "type": "metric" + }, + "expression": "SELECT AVG([/gdc/md/PROJECT_ID/obj/EXPR_ID])" + }, + "links": { + "explain2": "/gdc/md/cpn1dbltx3at2wrmfl79inlxs76oxb7h/obj/47/explain2" + }, + "meta": { + "author": "/gdc/account/profile/PROFILE_ID", + "uri": "/gdc/md/PROJECT_ID/obj/47", + "tags": "", + "created": "2015-10-10 12:56:13", + "identifier": "MY_ID", + "deprecated": "0", + "summary": "", + "isProduction": 1, + "title": "Avg shoe size", + "category": "metric", + "updated": "2015-10-10 12:56:13", + "contributor": "/gdc/account/profile/PROFILE_ID" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/metric-new.json b/gooddata-java-model/src/test/resources/md/metric-new.json index 97dd15fb9..101cfc8fb 100644 --- a/gooddata-java-model/src/test/resources/md/metric-new.json +++ b/gooddata-java-model/src/test/resources/md/metric-new.json @@ -1,11 +1,11 @@ { - "metric": { - "content": { - "expression": "SELECT SUM([/gdc/md/PROJECT_ID/obj/EXPR_ID])", - "format": "FORMAT" - }, - "meta": { - "title": "Person Name" - } + "metric": { + "content": { + "expression": "SELECT SUM([/gdc/md/PROJECT_ID/obj/EXPR_ID])", + "format": "FORMAT" + }, + "meta": { + "title": "Person Name" } + } } diff --git a/gooddata-java-model/src/test/resources/md/metric-out.json b/gooddata-java-model/src/test/resources/md/metric-out.json index d05fe487b..5528cd6a1 100644 --- a/gooddata-java-model/src/test/resources/md/metric-out.json +++ b/gooddata-java-model/src/test/resources/md/metric-out.json @@ -1,58 +1,58 @@ { - "metric": { - "content": { - "format": "#,##0", - "tree": { + "metric": { + "content": { + "format": "#,##0", + "tree": { + "content": [ + { + "content": [ + { + "value": "AVG", "content": [ - { - "content": [ - { - "value": "AVG", - "content": [ - { - "value": "/gdc/md/PROJECT_ID/obj/EXPR_ID", - "position": { - "column": 12, - "line": 2 - }, - "type": "fact object" - } - ], - "position": { - "column": 8, - "line": 2 - }, - "type": "function" - } - ], - "position": { - "column": 8, - "line": 2 - }, - "type": "expression" - } + { + "value": "/gdc/md/PROJECT_ID/obj/EXPR_ID", + "position": { + "column": 12, + "line": 2 + }, + "type": "fact object" + } ], "position": { - "column": 1, - "line": 2 + "column": 8, + "line": 2 }, - "type": "metric" + "type": "function" + } + ], + "position": { + "column": 8, + "line": 2 }, - "expression": "SELECT AVG([/gdc/md/PROJECT_ID/obj/EXPR_ID])" + "type": "expression" + } + ], + "position": { + "column": 1, + "line": 2 }, - "meta": { - "author": "/gdc/account/profile/PROFILE_ID", - "uri": "/gdc/md/PROJECT_ID/obj/47", - "tags": "", - "created": "2015-10-10 12:56:13", - "identifier": "MY_ID", - "deprecated": "0", - "summary": "", - "isProduction": 1, - "title": "Avg shoe size", - "category": "metric", - "updated": "2015-10-10 12:56:13", - "contributor": "/gdc/account/profile/PROFILE_ID" - } + "type": "metric" + }, + "expression": "SELECT AVG([/gdc/md/PROJECT_ID/obj/EXPR_ID])" + }, + "meta": { + "author": "/gdc/account/profile/PROFILE_ID", + "uri": "/gdc/md/PROJECT_ID/obj/47", + "tags": "", + "created": "2015-10-10 12:56:13", + "identifier": "MY_ID", + "deprecated": "0", + "summary": "", + "isProduction": 1, + "title": "Avg shoe size", + "category": "metric", + "updated": "2015-10-10 12:56:13", + "contributor": "/gdc/account/profile/PROFILE_ID" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/objCommon.json b/gooddata-java-model/src/test/resources/md/objCommon.json index 0f174ea4f..64a603b2a 100644 --- a/gooddata-java-model/src/test/resources/md/objCommon.json +++ b/gooddata-java-model/src/test/resources/md/objCommon.json @@ -1,17 +1,17 @@ { - "meta": { - "author": "/gdc/account/profile/USER_ID", - "uri": "/gdc/md/PROJECT_ID/obj/OBJ_ID", - "tags": "TAG1 TAG2", - "created": "2014-04-11 13:45:56", - "identifier": "attr.person.id.name", - "deprecated": "0", - "summary": "Obj summary", - "title": "Obj title", - "category": "attributeDisplayForm", - "updated": "2014-04-11 13:45:57", - "contributor": "/gdc/account/profile/CONTRIBUTOR_USER_ID", - "locked": 0, - "unlisted": 1 - } + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/OBJ_ID", + "tags": "TAG1 TAG2", + "created": "2014-04-11 13:45:56", + "identifier": "attr.person.id.name", + "deprecated": "0", + "summary": "Obj summary", + "title": "Obj title", + "category": "attributeDisplayForm", + "updated": "2014-04-11 13:45:57", + "contributor": "/gdc/account/profile/CONTRIBUTOR_USER_ID", + "locked": 0, + "unlisted": 1 + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/query.json b/gooddata-java-model/src/test/resources/md/query.json index c8ba991d6..095d9e506 100644 --- a/gooddata-java-model/src/test/resources/md/query.json +++ b/gooddata-java-model/src/test/resources/md/query.json @@ -1,35 +1,35 @@ { - "query": { - "entries": [ - { - "link": "/gdc/md/PROJ_ID/obj/127", - "author": "/gdc/account/profile/AUTHOR_ID", - "tags": "", - "created": "2009-10-07 19:27:39", - "deprecated": "0", - "summary": "", - "title": "Resource", - "category": "attribute", - "updated": "2009-10-07 19:27:40", - "contributor": "/gdc/account/profile/CONTRIB_ID" - }, - { - "link": "/gdc/md/PROJ_ID/obj/118", - "author": "/gdc/account/profile/AUTHOR_ID", - "tags": "", - "created": "2009-10-07 19:27:45", - "deprecated": "0", - "summary": "", - "category": "attribute", - "title": "Name", - "updated": "2009-11-01 13:09:11", - "contributor": "/gdc/account/profile/CONTRIB_ID" - } - ], - "meta": { - "summary": "Metadata Query Resources for project 'PROJ_ID'", - "title": "List of allTypes", - "category": "MD::Query::Object" - } + "query": { + "entries": [ + { + "link": "/gdc/md/PROJ_ID/obj/127", + "author": "/gdc/account/profile/AUTHOR_ID", + "tags": "", + "created": "2009-10-07 19:27:39", + "deprecated": "0", + "summary": "", + "title": "Resource", + "category": "attribute", + "updated": "2009-10-07 19:27:40", + "contributor": "/gdc/account/profile/CONTRIB_ID" + }, + { + "link": "/gdc/md/PROJ_ID/obj/118", + "author": "/gdc/account/profile/AUTHOR_ID", + "tags": "", + "created": "2009-10-07 19:27:45", + "deprecated": "0", + "summary": "", + "category": "attribute", + "title": "Name", + "updated": "2009-11-01 13:09:11", + "contributor": "/gdc/account/profile/CONTRIB_ID" + } + ], + "meta": { + "summary": "Metadata Query Resources for project 'PROJ_ID'", + "title": "List of allTypes", + "category": "MD::Query::Object" } + } } diff --git a/gooddata-java-model/src/test/resources/md/report/attributeInGrid.json b/gooddata-java-model/src/test/resources/md/report/attributeInGrid.json index efb204979..d71efc714 100644 --- a/gooddata-java-model/src/test/resources/md/report/attributeInGrid.json +++ b/gooddata-java-model/src/test/resources/md/report/attributeInGrid.json @@ -1,7 +1,15 @@ { - "attribute": { - "uri": "/URI", - "totals": [ ["sum"], ["avg", "med"] ], - "alias": "ALIAS" - } + "attribute": { + "uri": "/URI", + "totals": [ + [ + "sum" + ], + [ + "avg", + "med" + ] + ], + "alias": "ALIAS" + } } diff --git a/gooddata-java-model/src/test/resources/md/report/grid-input.json b/gooddata-java-model/src/test/resources/md/report/grid-input.json index e873b2ec0..83df769da 100644 --- a/gooddata-java-model/src/test/resources/md/report/grid-input.json +++ b/gooddata-java-model/src/test/resources/md/report/grid-input.json @@ -1,29 +1,29 @@ { - "sort": { - "columns": [], - "rows": [] - }, - "columnWidths": [ - { - "width": 343 - } - ], - "columns": [ - "metricGroup" - ], - "metrics": [ - { - "alias": "metr", - "uri": "/gdc/md/PROJECT_ID/obj/47" - } - ], - "rows": [ - { - "attribute": { - "alias": "attr", - "totals": [], - "uri": "/gdc/md/PROJECT_ID/obj/ATTR_ID" - } - } - ] + "sort": { + "columns": [], + "rows": [] + }, + "columnWidths": [ + { + "width": 343 + } + ], + "columns": [ + "metricGroup" + ], + "metrics": [ + { + "alias": "metr", + "uri": "/gdc/md/PROJECT_ID/obj/47" + } + ], + "rows": [ + { + "attribute": { + "alias": "attr", + "totals": [], + "uri": "/gdc/md/PROJECT_ID/obj/ATTR_ID" + } + } + ] } diff --git a/gooddata-java-model/src/test/resources/md/report/grid.json b/gooddata-java-model/src/test/resources/md/report/grid.json index 091da04f3..730d04924 100644 --- a/gooddata-java-model/src/test/resources/md/report/grid.json +++ b/gooddata-java-model/src/test/resources/md/report/grid.json @@ -1,38 +1,38 @@ { - "sort": { - "columns": [], - "rows": [] - }, - "columnWidths": [ + "sort": { + "columns": [], + "rows": [] + }, + "columnWidths": [ + { + "width": 343, + "locator": [ { - "width": 343, - "locator": [ - { - "metricLocator": { - "uri": "/gdc/md/PROJECT_ID/obj/1493" - } - } - ] + "metricLocator": { + "uri": "/gdc/md/PROJECT_ID/obj/1493" + } } - ], - "columns": [ - "metricGroup" - ], - "metrics": [ - { - "alias": "metr", - "uri": "/gdc/md/PROJECT_ID/obj/METR_ID" - } - ], - "rows": [ - { - "attribute": { - "alias": "attr", - "totals": [ - [] - ], - "uri": "/gdc/md/PROJECT_ID/obj/ATTR_ID" - } - } - ] + ] + } + ], + "columns": [ + "metricGroup" + ], + "metrics": [ + { + "alias": "metr", + "uri": "/gdc/md/PROJECT_ID/obj/METR_ID" + } + ], + "rows": [ + { + "attribute": { + "alias": "attr", + "totals": [ + [] + ], + "uri": "/gdc/md/PROJECT_ID/obj/ATTR_ID" + } + } + ] } diff --git a/gooddata-java-model/src/test/resources/md/report/gridElements.json b/gooddata-java-model/src/test/resources/md/report/gridElements.json index 2c5b163df..15c98159e 100644 --- a/gooddata-java-model/src/test/resources/md/report/gridElements.json +++ b/gooddata-java-model/src/test/resources/md/report/gridElements.json @@ -3,7 +3,7 @@ "attribute": { "uri": "/uriValue", "alias": "aliasValue", - "totals" : [] + "totals": [] } }, "metricGroup" diff --git a/gooddata-java-model/src/test/resources/md/report/gridReportDefinitionContent-input.json b/gooddata-java-model/src/test/resources/md/report/gridReportDefinitionContent-input.json index 14c44588b..81127f1bd 100644 --- a/gooddata-java-model/src/test/resources/md/report/gridReportDefinitionContent-input.json +++ b/gooddata-java-model/src/test/resources/md/report/gridReportDefinitionContent-input.json @@ -1,14 +1,14 @@ { - "grid": { - "sort": { - "columns": [], - "rows": [] - }, - "columnWidths": [], - "columns": [], - "metrics": [], - "rows": [] + "grid": { + "sort": { + "columns": [], + "rows": [] }, - "format": "grid", - "filters": [] + "columnWidths": [], + "columns": [], + "metrics": [], + "rows": [] + }, + "format": "grid", + "filters": [] } diff --git a/gooddata-java-model/src/test/resources/md/report/gridReportDefinitionContent.json b/gooddata-java-model/src/test/resources/md/report/gridReportDefinitionContent.json index 47cda3202..0acd883b0 100644 --- a/gooddata-java-model/src/test/resources/md/report/gridReportDefinitionContent.json +++ b/gooddata-java-model/src/test/resources/md/report/gridReportDefinitionContent.json @@ -1,31 +1,31 @@ { - "grid": { - "sort": { - "columns": [], - "rows": [] - }, - "columnWidths": [], - "columns": [ - "metricGroup" - ], - "metrics": [ - { - "alias": "", - "uri": "/gdc/md/PROJECT_ID/obj/1493" - } - ], - "rows": [ - { - "attribute": { - "alias": "", - "totals": [ - [] - ], - "uri": "/gdc/md/PROJECT_ID/obj/11786" - } - } - ] + "grid": { + "sort": { + "columns": [], + "rows": [] }, - "format": "grid", - "filters": [] + "columnWidths": [], + "columns": [ + "metricGroup" + ], + "metrics": [ + { + "alias": "", + "uri": "/gdc/md/PROJECT_ID/obj/1493" + } + ], + "rows": [ + { + "attribute": { + "alias": "", + "totals": [ + [] + ], + "uri": "/gdc/md/PROJECT_ID/obj/11786" + } + } + ] + }, + "format": "grid", + "filters": [] } diff --git a/gooddata-java-model/src/test/resources/md/report/metricElement.json b/gooddata-java-model/src/test/resources/md/report/metricElement.json index d71c54af4..339b9e7a8 100644 --- a/gooddata-java-model/src/test/resources/md/report/metricElement.json +++ b/gooddata-java-model/src/test/resources/md/report/metricElement.json @@ -1,6 +1,6 @@ { - "uri": "/ELEM_URI", - "alias": "ELEM_ALIAS", - "format": "FORMAT", - "drillAcrossStepAttributeDF": "/DRILL_URI" + "uri": "/ELEM_URI", + "alias": "ELEM_ALIAS", + "format": "FORMAT", + "drillAcrossStepAttributeDF": "/DRILL_URI" } diff --git a/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinition-input.json b/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinition-input.json index 6ed6028f7..8dc188e65 100644 --- a/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinition-input.json +++ b/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinition-input.json @@ -1,26 +1,30 @@ { - "reportDefinition" : { - "content" : { - "grid" : { - "sort" : { - "columns" : [], - "rows" : [] - }, - "columnWidths" : [], - "columns" : [], - "metrics" : [], - "rows" : [] - }, - "oneNumber" : { - "labels" : { - "description" : "desc" - } - }, - "format" : "oneNumber", - "filters" : [ { "expression" : "(SELECT [/gdc/md/projectId/obj/123]) >= 2" } ] + "reportDefinition": { + "content": { + "grid": { + "sort": { + "columns": [], + "rows": [] }, - "meta" : { - "title" : "Untitled" + "columnWidths": [], + "columns": [], + "metrics": [], + "rows": [] + }, + "oneNumber": { + "labels": { + "description": "desc" } + }, + "format": "oneNumber", + "filters": [ + { + "expression": "(SELECT [/gdc/md/projectId/obj/123]) >= 2" + } + ] + }, + "meta": { + "title": "Untitled" } + } } diff --git a/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinition.json b/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinition.json index b70308ab5..c88ddf803 100644 --- a/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinition.json +++ b/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinition.json @@ -1,44 +1,44 @@ { - "reportDefinition" : { - "content" : { - "grid" : { - "sort" : { - "columns" : [], - "rows" : [] - }, - "columnWidths" : [], - "columns" : [ - "metricGroup" - ], - "metrics" : [ - { - "alias" : "Beers Bought", - "uri" : "/gdc/md/PROJECT_ID/obj/1504" - } - ], - "rows" : [] - }, - "oneNumber" : { - "labels" : {} - }, - "format" : "oneNumber", - "filters" : [] + "reportDefinition": { + "content": { + "grid": { + "sort": { + "columns": [], + "rows": [] }, - "links" : { - "explain2" : "/gdc/md/PROJECT_ID/obj/2274/explain2" - }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/2274", - "tags" : "", - "created" : "2012-08-07 17:56:33", - "identifier" : "meh", - "deprecated" : "0", - "summary" : "", - "title" : "Untitled", - "category" : "reportDefinition", - "updated" : "2012-08-07 17:56:33", - "contributor" : "/gdc/account/profile/USER_ID" - } + "columnWidths": [], + "columns": [ + "metricGroup" + ], + "metrics": [ + { + "alias": "Beers Bought", + "uri": "/gdc/md/PROJECT_ID/obj/1504" + } + ], + "rows": [] + }, + "oneNumber": { + "labels": {} + }, + "format": "oneNumber", + "filters": [] + }, + "links": { + "explain2": "/gdc/md/PROJECT_ID/obj/2274/explain2" + }, + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/2274", + "tags": "", + "created": "2012-08-07 17:56:33", + "identifier": "meh", + "deprecated": "0", + "summary": "", + "title": "Untitled", + "category": "reportDefinition", + "updated": "2012-08-07 17:56:33", + "contributor": "/gdc/account/profile/USER_ID" } + } } diff --git a/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinitionContent-input.json b/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinitionContent-input.json index 18c99f1ec..1e2210fbc 100644 --- a/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinitionContent-input.json +++ b/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinitionContent-input.json @@ -1,19 +1,19 @@ { - "grid": { - "sort": { - "columns": [], - "rows": [] - }, - "columnWidths": [], - "columns": [], - "metrics": [], - "rows": [] + "grid": { + "sort": { + "columns": [], + "rows": [] }, - "oneNumber": { - "labels": { - "description" : "desc" - } - }, - "format": "oneNumber", - "filters": [] + "columnWidths": [], + "columns": [], + "metrics": [], + "rows": [] + }, + "oneNumber": { + "labels": { + "description": "desc" + } + }, + "format": "oneNumber", + "filters": [] } diff --git a/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinitionContent.json b/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinitionContent.json index 50dcb715d..a8c5aefd4 100644 --- a/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinitionContent.json +++ b/gooddata-java-model/src/test/resources/md/report/oneNumberReportDefinitionContent.json @@ -1,53 +1,53 @@ { - "grid": { - "sort": { - "columns": [], - "rows": [] - }, - "columnWidths": [], - "columns": [ - "metricGroup" - ], - "metrics": [ - { - "alias": "Beers Bought", - "uri": "/gdc/md/PROJECT_ID/obj/1504" - } - ], - "rows": [] - }, - "oneNumber": { - "labels": {} + "grid": { + "sort": { + "columns": [], + "rows": [] }, - "format": "oneNumber", - "filters": [ - { - "tree": { - "content": [ - { - "value": "/gdc/md/PROJECT_ID/obj/980", - "position": { - "column": 1, - "line": 2 - }, - "type": "attribute object" - }, - { - "value": "ThisWeek", - "position": { - "column": 30, - "line": 2 - }, - "type": "identifier" - } - ], - "position": { - "column": 28, - "line": 2 - }, - "type": "=" + "columnWidths": [], + "columns": [ + "metricGroup" + ], + "metrics": [ + { + "alias": "Beers Bought", + "uri": "/gdc/md/PROJECT_ID/obj/1504" + } + ], + "rows": [] + }, + "oneNumber": { + "labels": {} + }, + "format": "oneNumber", + "filters": [ + { + "tree": { + "content": [ + { + "value": "/gdc/md/PROJECT_ID/obj/980", + "position": { + "column": 1, + "line": 2 }, - "expression": "[/gdc/md/PROJECT_ID/obj/980] = {ThisWeek}" - } - ] + "type": "attribute object" + }, + { + "value": "ThisWeek", + "position": { + "column": 30, + "line": 2 + }, + "type": "identifier" + } + ], + "position": { + "column": 28, + "line": 2 + }, + "type": "=" + }, + "expression": "[/gdc/md/PROJECT_ID/obj/980] = {ThisWeek}" + } + ] } diff --git a/gooddata-java-model/src/test/resources/md/report/report-input.json b/gooddata-java-model/src/test/resources/md/report/report-input.json index beaa12c74..24ef658be 100644 --- a/gooddata-java-model/src/test/resources/md/report/report-input.json +++ b/gooddata-java-model/src/test/resources/md/report/report-input.json @@ -1,13 +1,13 @@ { - "report" : { - "content" : { - "domains" : [], - "definitions" : [ - "/gdc/md/PROJECT_ID/obj/DEF_ID" - ] - }, - "meta" : { - "title" : "Beers Consumed This Week" - } + "report": { + "content": { + "domains": [], + "definitions": [ + "/gdc/md/PROJECT_ID/obj/DEF_ID" + ] + }, + "meta": { + "title": "Beers Consumed This Week" } + } } diff --git a/gooddata-java-model/src/test/resources/md/report/report.json b/gooddata-java-model/src/test/resources/md/report/report.json index f0a948db6..42f88cecc 100644 --- a/gooddata-java-model/src/test/resources/md/report/report.json +++ b/gooddata-java-model/src/test/resources/md/report/report.json @@ -1,25 +1,25 @@ { - "report" : { - "content" : { - "domains" : [ - "/gdc/md/PROJECT_ID/obj/DOM_ID" - ], - "definitions" : [ - "/gdc/md/PROJECT_ID/obj/DEF_ID" - ] - }, - "meta" : { - "author" : "/gdc/account/profile/USER_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/2276", - "tags" : "", - "created" : "2012-08-07 17:56:33", - "identifier" : "muhehe", - "deprecated" : "0", - "summary" : "This number shows the beers consumed.", - "title" : "Beers Consumed This Week", - "category" : "report", - "updated" : "2012-08-07 17:56:33", - "contributor" : "/gdc/account/profile/USER_ID" - } + "report": { + "content": { + "domains": [ + "/gdc/md/PROJECT_ID/obj/DOM_ID" + ], + "definitions": [ + "/gdc/md/PROJECT_ID/obj/DEF_ID" + ] + }, + "meta": { + "author": "/gdc/account/profile/USER_ID", + "uri": "/gdc/md/PROJECT_ID/obj/2276", + "tags": "", + "created": "2012-08-07 17:56:33", + "identifier": "muhehe", + "deprecated": "0", + "summary": "This number shows the beers consumed.", + "title": "Beers Consumed This Week", + "category": "report", + "updated": "2012-08-07 17:56:33", + "contributor": "/gdc/account/profile/USER_ID" } + } } diff --git a/gooddata-java-model/src/test/resources/md/service-timezone.json b/gooddata-java-model/src/test/resources/md/service-timezone.json new file mode 100644 index 000000000..d72f6fd7c --- /dev/null +++ b/gooddata-java-model/src/test/resources/md/service-timezone.json @@ -0,0 +1,5 @@ +{ + "service": { + "timezone": "UTC" + } +} \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/tableDataLoad.json b/gooddata-java-model/src/test/resources/md/tableDataLoad.json index 72883cf03..7ef1c4f5b 100644 --- a/gooddata-java-model/src/test/resources/md/tableDataLoad.json +++ b/gooddata-java-model/src/test/resources/md/tableDataLoad.json @@ -1,22 +1,22 @@ { - "tableDataLoad" : { - "content" : { - "typeOfLoad" : "incremental", - "dataSourceLocation" : "d_zendesktickets_vehicleview_aaavxfdfgqamowg" + "tableDataLoad": { + "content": { + "typeOfLoad": "incremental", + "dataSourceLocation": "d_zendesktickets_vehicleview_aaavxfdfgqamowg" }, - "meta" : { - "author" : "/gdc/account/profile/PROFILE_ID", - "uri" : "/gdc/md/PROJECT_ID/obj/625283", - "tags" : "", - "created" : "2016-03-10 06:53:21", - "identifier" : "atk7vrmubLP1", - "deprecated" : "0", - "summary" : "d_zendesktickets_vehicleview_aaavxfdfgqamowg", - "isProduction" : 1, - "title" : "d_zendesktickets_vehicleview_aaavxfdfgqamowg", - "category" : "tableDataLoad", - "updated" : "2016-03-10 08:06:38", - "contributor" : "/gdc/account/profile/PROFILE_ID" + "meta": { + "author": "/gdc/account/profile/PROFILE_ID", + "uri": "/gdc/md/PROJECT_ID/obj/625283", + "tags": "", + "created": "2016-03-10 06:53:21", + "identifier": "atk7vrmubLP1", + "deprecated": "0", + "summary": "d_zendesktickets_vehicleview_aaavxfdfgqamowg", + "isProduction": 1, + "title": "d_zendesktickets_vehicleview_aaavxfdfgqamowg", + "category": "tableDataLoad", + "updated": "2016-03-10 08:06:38", + "contributor": "/gdc/account/profile/PROFILE_ID" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/md/visualization/complexTableWithTotals.json b/gooddata-java-model/src/test/resources/md/visualization/complexTableWithTotals.json new file mode 100644 index 000000000..9dc185f47 --- /dev/null +++ b/gooddata-java-model/src/test/resources/md/visualization/complexTableWithTotals.json @@ -0,0 +1,117 @@ +{ + "visualizationObject": { + "content": { + "buckets": [ + { + "localIdentifier": "measures", + "items": [ + { + "measure": { + "definition": { + "measureDefinition": { + "item": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/9211" + } + } + }, + "title": "_Close [BOP]", + "localIdentifier": "fd0164f14ec2444b9b5a7140ce059036" + } + } + ] + }, + { + "items": [ + { + "visualizationAttribute": { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1024" + }, + "localIdentifier": "e4bb25477bca4fb2a29a4b80d94568d4" + } + }, + { + "visualizationAttribute": { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1028" + }, + "localIdentifier": "9008f5d33b3e41279402a25e2f05d0c9" + } + }, + { + "visualizationAttribute": { + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1086" + }, + "localIdentifier": "023641d306f84921be39d0aa1d6464db" + } + } + ], + "totals": [ + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifier": "e4bb25477bca4fb2a29a4b80d94568d4", + "type": "sum" + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifier": "e4bb25477bca4fb2a29a4b80d94568d4", + "type": "nat" + }, + { + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "attributeIdentifier": "9008f5d33b3e41279402a25e2f05d0c9", + "type": "nat" + }, + { + "attributeIdentifier": "023641d306f84921be39d0aa1d6464db", + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036", + "type": "nat" + } + ], + "localIdentifier": "attribute" + }, + { + "items": [ + { + "visualizationAttribute": { + "localIdentifier": "a22843f5d77f48b4938ccfb460eb8be4", + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1805" + } + } + }, + { + "visualizationAttribute": { + "localIdentifier": "a77983fcc9574f6bad6be1d3cb08bf71", + "displayForm": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/1094" + } + } + } + ], + "totals": [ + { + "type": "nat", + "attributeIdentifier": "a22843f5d77f48b4938ccfb460eb8be4", + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036" + }, + { + "type": "nat", + "attributeIdentifier": "a77983fcc9574f6bad6be1d3cb08bf71", + "measureIdentifier": "fd0164f14ec2444b9b5a7140ce059036" + } + ], + "localIdentifier": "columns" + } + ], + "properties": "{\"sortItems\":[{\"attributeSortItem\":{\"attributeIdentifier\":\"e4bb25477bca4fb2a29a4b80d94568d4\",\"direction\":\"asc\"}}]}", + "visualizationClass": { + "uri": "/gdc/md/w3hub93g7fwmvx60pkt2v8cr56530t0l/obj/75547" + } + }, + "meta": { + "title": "complex-with-totals" + } + } +} diff --git a/gooddata-java-model/src/test/resources/md/visualization/complexVisualizationObject.json b/gooddata-java-model/src/test/resources/md/visualization/complexVisualizationObject.json index 813fc8bd7..0d94d8fe1 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/complexVisualizationObject.json +++ b/gooddata-java-model/src/test/resources/md/visualization/complexVisualizationObject.json @@ -21,7 +21,8 @@ } } ] - }, { + }, + { "localIdentifier": "bucket2", "items": [ { @@ -36,7 +37,8 @@ } } } - }, { + }, + { "measure": { "localIdentifier": "measure1", "title": "Measure 1", @@ -56,7 +58,8 @@ }, "in": [] } - }, { + }, + { "negativeAttributeFilter": { "displayForm": { "uri": "/uri/to/displayForm/3" @@ -66,13 +69,15 @@ "cd" ] } - }, { + }, + { "absoluteDateFilter": { "dataSet": { "uri": "/uri/to/dataSet/1" } } - }, { + }, + { "relativeDateFilter": { "dataSet": { "uri": "/uri/to/dataSet/2" @@ -101,14 +106,16 @@ "cd" ] } - }, { + }, + { "negativeAttributeFilter": { "displayForm": { "uri": "/uri/to/displayForm/3" }, "notIn": [] } - }, { + }, + { "absoluteDateFilter": { "dataSet": { "uri": "/uri/to/dataSet/1" @@ -116,14 +123,16 @@ "from": "2000-08-30", "to": "2017-08-07" } - }, { + }, + { "relativeDateFilter": { "dataSet": { "uri": "/uri/to/dataSet/2" }, "granularity": "month" } - }, { + }, + { "measureValueFilter": { "measure": { "localIdentifier": "measure0" @@ -135,13 +144,15 @@ } } } - }, { + }, + { "measureValueFilter": { "measure": { "localIdentifier": "measure1" } } - }, { + }, + { "rankingFilter": { "measures": [ { @@ -154,7 +165,10 @@ } ], "properties": "{\"key\":\"value\"}", - "references": { "key": "value", "foo": "bar" } + "references": { + "key": "value", + "foo": "bar" + } } } } diff --git a/gooddata-java-model/src/test/resources/md/visualization/customChart.json b/gooddata-java-model/src/test/resources/md/visualization/customChart.json index 909077e40..d27bd31e4 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/customChart.json +++ b/gooddata-java-model/src/test/resources/md/visualization/customChart.json @@ -11,7 +11,8 @@ { "localIdentifier": "view", "items": [] - }, { + }, + { "localIdentifier": "stack", "items": [ { @@ -42,7 +43,9 @@ ], "filters": [], "properties": "{\"key\":\"value\"}", - "references": { "key": "value" } + "references": { + "key": "value" + } } } } diff --git a/gooddata-java-model/src/test/resources/md/visualization/emptyBucketsVisualization.json b/gooddata-java-model/src/test/resources/md/visualization/emptyBucketsVisualization.json index 88b731206..88de9d4fd 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/emptyBucketsVisualization.json +++ b/gooddata-java-model/src/test/resources/md/visualization/emptyBucketsVisualization.json @@ -10,7 +10,9 @@ "buckets": [], "filters": [], "properties": "{\"nokey\":\"novalue\"}", - "references": { "key": "novalue" } + "references": { + "key": "novalue" + } } } } diff --git a/gooddata-java-model/src/test/resources/md/visualization/lineChart.json b/gooddata-java-model/src/test/resources/md/visualization/lineChart.json index 2a2d99765..0e451a58d 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/lineChart.json +++ b/gooddata-java-model/src/test/resources/md/visualization/lineChart.json @@ -21,7 +21,8 @@ } } ] - }, { + }, + { "localIdentifier": "measure", "items": [ { @@ -46,7 +47,9 @@ ], "filters": [], "properties": "{\"key\":\"value\"}", - "references": { "key": "value" } + "references": { + "key": "value" + } } } } diff --git a/gooddata-java-model/src/test/resources/md/visualization/mixedBucket.json b/gooddata-java-model/src/test/resources/md/visualization/mixedBucket.json index 588da7e85..92fdc075c 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/mixedBucket.json +++ b/gooddata-java-model/src/test/resources/md/visualization/mixedBucket.json @@ -9,7 +9,8 @@ }, "alias": "Attribute Alias" } - }, { + }, + { "measure": { "localIdentifier": "measure", "title": "Measure", diff --git a/gooddata-java-model/src/test/resources/md/visualization/mixedBucketWithTotals.json b/gooddata-java-model/src/test/resources/md/visualization/mixedBucketWithTotals.json new file mode 100644 index 000000000..48b728d4a --- /dev/null +++ b/gooddata-java-model/src/test/resources/md/visualization/mixedBucketWithTotals.json @@ -0,0 +1,38 @@ +{ + "localIdentifier": "attributeBucket", + "items": [ + { + "visualizationAttribute": { + "localIdentifier": "attribute", + "displayForm": { + "uri": "/uri/to/displayForm" + }, + "alias": "Attribute Alias" + } + }, + { + "measure": { + "localIdentifier": "measure", + "title": "Measure", + "alias": "Measure Alias", + "definition": { + "measureDefinition": { + "item": { + "uri": "/uri/to/measure" + }, + "aggregation": "sum", + "computeRatio": false, + "filters": [] + } + } + } + } + ], + "totals": [ + { + "measureIdentifier": "measure", + "type": "nat", + "attributeIdentifier": "attribute" + } + ] +} diff --git a/gooddata-java-model/src/test/resources/md/visualization/multipleAttributeBucketsVisualization.json b/gooddata-java-model/src/test/resources/md/visualization/multipleAttributeBucketsVisualization.json index 6accd89bf..a3741fa2b 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/multipleAttributeBucketsVisualization.json +++ b/gooddata-java-model/src/test/resources/md/visualization/multipleAttributeBucketsVisualization.json @@ -19,7 +19,8 @@ }, "alias": "attribute1Alias" } - }, { + }, + { "visualizationAttribute": { "localIdentifier": "attribute2", "displayForm": { @@ -29,7 +30,8 @@ } } ] - }, { + }, + { "localIdentifier": "attributeBucket", "items": [ { @@ -46,7 +48,9 @@ ], "filters": [], "properties": "{\"key\":\"value\"}", - "references": { "key": "value" } + "references": { + "key": "value" + } } } } diff --git a/gooddata-java-model/src/test/resources/md/visualization/multipleAttributesBucket.json b/gooddata-java-model/src/test/resources/md/visualization/multipleAttributesBucket.json index 3dbbf4746..e9a1c2b87 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/multipleAttributesBucket.json +++ b/gooddata-java-model/src/test/resources/md/visualization/multipleAttributesBucket.json @@ -9,7 +9,8 @@ }, "alias": "attribute1Alias" } - }, { + }, + { "visualizationAttribute": { "localIdentifier": "attribute2", "displayForm": { diff --git a/gooddata-java-model/src/test/resources/md/visualization/multipleMeasureBucketsVisualization.json b/gooddata-java-model/src/test/resources/md/visualization/multipleMeasureBucketsVisualization.json index 9f9820864..7937c5721 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/multipleMeasureBucketsVisualization.json +++ b/gooddata-java-model/src/test/resources/md/visualization/multipleMeasureBucketsVisualization.json @@ -28,7 +28,8 @@ } } ] - }, { + }, + { "localIdentifier": "measures 2", "items": [ { @@ -47,7 +48,8 @@ } } } - }, { + }, + { "measure": { "localIdentifier": "measure2pop", "title": "Measure 2 pop", @@ -67,7 +69,9 @@ ], "filters": [], "properties": "{\"key\":\"value\"}", - "references": { "key": "value" } + "references": { + "key": "value" + } } } } diff --git a/gooddata-java-model/src/test/resources/md/visualization/multipleMeasuresBucket.json b/gooddata-java-model/src/test/resources/md/visualization/multipleMeasuresBucket.json index f4b83a4b0..4d42b1c23 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/multipleMeasuresBucket.json +++ b/gooddata-java-model/src/test/resources/md/visualization/multipleMeasuresBucket.json @@ -17,7 +17,8 @@ } } } - },{ + }, + { "measure": { "localIdentifier": "measure2", "title": "Measure 2", @@ -33,7 +34,8 @@ } } } - }, { + }, + { "measure": { "localIdentifier": "pop measure", "title": "Pop Measure", diff --git a/gooddata-java-model/src/test/resources/md/visualization/segmentedLineChart.json b/gooddata-java-model/src/test/resources/md/visualization/segmentedLineChart.json index b6d763bcf..e399c0bc6 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/segmentedLineChart.json +++ b/gooddata-java-model/src/test/resources/md/visualization/segmentedLineChart.json @@ -21,7 +21,8 @@ } } ] - }, { + }, + { "localIdentifier": "segment", "items": [ { @@ -60,7 +61,9 @@ ], "filters": [], "properties": "{\"key\":\"value\"}", - "references": { "key": "value" } + "references": { + "key": "value" + } } } } diff --git a/gooddata-java-model/src/test/resources/md/visualization/stackedColumnChart.json b/gooddata-java-model/src/test/resources/md/visualization/stackedColumnChart.json index 89187253a..62bb28891 100644 --- a/gooddata-java-model/src/test/resources/md/visualization/stackedColumnChart.json +++ b/gooddata-java-model/src/test/resources/md/visualization/stackedColumnChart.json @@ -21,7 +21,8 @@ } } ] - }, { + }, + { "localIdentifier": "stack", "items": [ { @@ -60,7 +61,9 @@ ], "filters": [], "properties": "{\"key\":\"value\"}", - "references": { "key": "value" } + "references": { + "key": "value" + } } } } diff --git a/gooddata-java-model/src/test/resources/model/maql-ddl-task-status-fail.json b/gooddata-java-model/src/test/resources/model/maql-ddl-task-status-fail.json index bc2f421d7..d90ca3cd7 100644 --- a/gooddata-java-model/src/test/resources/model/maql-ddl-task-status-fail.json +++ b/gooddata-java-model/src/test/resources/model/maql-ddl-task-status-fail.json @@ -1,17 +1,19 @@ { - "wTaskStatus": { - "messages": [ - { - "error": { - "parameters": ["attr.person.id"], - "requestId": "REQUEST_ID", - "component": "GDC::LDM::MAQLDDL", - "errorClass": "GDC::Exception::User", - "message": "The object (%s) doesn't exists." - } - } - ], - "poll": "/gdc/md/PROJECT_ID/tasks/TASK_ID/status", - "status": "ERROR" - } + "wTaskStatus": { + "messages": [ + { + "error": { + "parameters": [ + "attr.person.id" + ], + "requestId": "REQUEST_ID", + "component": "GDC::LDM::MAQLDDL", + "errorClass": "GDC::Exception::User", + "message": "The object (%s) doesn't exists." + } + } + ], + "poll": "/gdc/md/PROJECT_ID/tasks/TASK_ID/status", + "status": "ERROR" + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/model/maqlDdlLinks.json b/gooddata-java-model/src/test/resources/model/maqlDdlLinks.json index f31df45ad..5c20eb59e 100644 --- a/gooddata-java-model/src/test/resources/model/maqlDdlLinks.json +++ b/gooddata-java-model/src/test/resources/model/maqlDdlLinks.json @@ -1,8 +1,8 @@ { - "entries" : [ - { - "link" : "/gdc/md/PROJECT_ID/tasks/123/status", - "category" : "tasks-status" - } - ] + "entries": [ + { + "link": "/gdc/md/PROJECT_ID/tasks/123/status", + "category": "tasks-status" + } + ] } diff --git a/gooddata-java-model/src/test/resources/model/modelDiff.json b/gooddata-java-model/src/test/resources/model/modelDiff.json index 8488e2b5b..0800c2a81 100644 --- a/gooddata-java-model/src/test/resources/model/modelDiff.json +++ b/gooddata-java-model/src/test/resources/model/modelDiff.json @@ -1,31 +1,37 @@ { - "projectModelDiff": { - "updateOperations": [ - { - "updateOperation": { - "type": "create.fact", - "dataset": "dataset.employee", - "destructive": false, - "description": "Create Fact '%s'", - "paramaters": ["Employee Age"] - } - } - ], - "updateScripts": [ - { - "updateScript": { - "maqlDdlChunks": [ "CREATE FOLDER {ffld.employee} VISUAL(TITLE \"Employee\") TYPE FACT;\nCREATE FACT {fact.employee.age} VISUAL(TITLE \"Employee Age\", FOLDER {ffld.employee}) AS {f_employee.f_age};\nALTER DATASET {dataset.employee} ADD {fact.employee.age};\nSYNCHRONIZE {dataset.employee} PRESERVE DATA;" ], - "preserveData": true, - "cascadeDrops": false - } - }, - { - "updateScript": { - "maqlDdlChunks": [ "CREATE FOLDER {ffld.employee} VISUAL(TITLE \"Employee\") TYPE FACT;\nCREATE FACT {fact.employee.age} VISUAL(TITLE \"Employee Age\", FOLDER {ffld.employee}) AS {f_employee.f_age};\nALTER DATASET {dataset.employee} ADD {fact.employee.age};\nSYNCHRONIZE {dataset.employee};" ], - "preserveData": false, - "cascadeDrops": false - } - } - ] - } + "projectModelDiff": { + "updateOperations": [ + { + "updateOperation": { + "type": "create.fact", + "dataset": "dataset.employee", + "destructive": false, + "description": "Create Fact '%s'", + "paramaters": [ + "Employee Age" + ] + } + } + ], + "updateScripts": [ + { + "updateScript": { + "maqlDdlChunks": [ + "CREATE FOLDER {ffld.employee} VISUAL(TITLE \"Employee\") TYPE FACT;\nCREATE FACT {fact.employee.age} VISUAL(TITLE \"Employee Age\", FOLDER {ffld.employee}) AS {f_employee.f_age};\nALTER DATASET {dataset.employee} ADD {fact.employee.age};\nSYNCHRONIZE {dataset.employee} PRESERVE DATA;" + ], + "preserveData": true, + "cascadeDrops": false + } + }, + { + "updateScript": { + "maqlDdlChunks": [ + "CREATE FOLDER {ffld.employee} VISUAL(TITLE \"Employee\") TYPE FACT;\nCREATE FACT {fact.employee.age} VISUAL(TITLE \"Employee Age\", FOLDER {ffld.employee}) AS {f_employee.f_age};\nALTER DATASET {dataset.employee} ADD {fact.employee.age};\nSYNCHRONIZE {dataset.employee};" + ], + "preserveData": false, + "cascadeDrops": false + } + } + ] + } } diff --git a/gooddata-java-model/src/test/resources/project/addUsersToProject.json b/gooddata-java-model/src/test/resources/project/addUsersToProject.json index 802a1c5e3..4b2440bd9 100644 --- a/gooddata-java-model/src/test/resources/project/addUsersToProject.json +++ b/gooddata-java-model/src/test/resources/project/addUsersToProject.json @@ -1,15 +1,15 @@ { - "users" : [ + "users": [ { - "user" : { - "content" : { - "userRoles" : [ + "user": { + "content": { + "userRoles": [ "/gdc/projects/PROJECT_ID/roles/ROLE1" ], - "status" : "ENABLED" + "status": "ENABLED" }, - "links" : { - "self" : "/gdc/account/profile/USER_ID" + "links": { + "self": "/gdc/account/profile/USER_ID" } } } diff --git a/gooddata-java-model/src/test/resources/project/project-template.json b/gooddata-java-model/src/test/resources/project/project-template.json index f32312de9..771ed5624 100644 --- a/gooddata-java-model/src/test/resources/project/project-template.json +++ b/gooddata-java-model/src/test/resources/project/project-template.json @@ -1,5 +1,5 @@ { - "url": "/projectTemplates/ZendeskAnalytics/11", - "urn": "urn:gooddata:ZendeskAnalytics", - "version": "11" + "url": "/projectTemplates/ZendeskAnalytics/11", + "urn": "urn:gooddata:ZendeskAnalytics", + "version": "11" } diff --git a/gooddata-java-model/src/test/resources/project/project-templates.json b/gooddata-java-model/src/test/resources/project/project-templates.json index 1a3107fa6..813974d4b 100644 --- a/gooddata-java-model/src/test/resources/project/project-templates.json +++ b/gooddata-java-model/src/test/resources/project/project-templates.json @@ -1,9 +1,9 @@ { - "templatesInfo": [ - { - "url": "/projectTemplates/ZendeskAnalytics/11", - "urn": "urn:gooddata:ZendeskAnalytics", - "version": "11" - } - ] + "templatesInfo": [ + { + "url": "/projectTemplates/ZendeskAnalytics/11", + "urn": "urn:gooddata:ZendeskAnalytics", + "version": "11" + } + ] } diff --git a/gooddata-java-model/src/test/resources/project/project-user.json b/gooddata-java-model/src/test/resources/project/project-user.json index 3485060f8..ec4254b19 100644 --- a/gooddata-java-model/src/test/resources/project/project-user.json +++ b/gooddata-java-model/src/test/resources/project/project-user.json @@ -1,30 +1,30 @@ { - "user" : { - "content" : { - "email" : "ateam+ads-testing@gooddata.com", - "firstname" : "ateam", - "userRoles" : [ + "user": { + "content": { + "email": "ateam+ads-testing@gooddata.com", + "firstname": "ateam", + "userRoles": [ "/gdc/projects/PROJECT_ID/roles/ROLE1" ], - "phonenumber" : "123456789", - "status" : "ENABLED", - "lastname" : "ads-testing", - "login" : "ateam+ads-testing@gooddata.com" + "phonenumber": "123456789", + "status": "ENABLED", + "lastname": "ads-testing", + "login": "ateam+ads-testing@gooddata.com" }, - "links" : { - "roles" : "/gdc/projects/PROJECT_ID/users/USER_ID/roles", - "permissions" : "/gdc/projects/PROJECT_ID/users/USER_ID/permissions", - "self" : "/gdc/account/profile/USER_ID", - "invitations" : "/gdc/account/profile/USER_ID/invitations", - "projects" : "/gdc/account/profile/USER_ID/projects", - "projectRelUri" : "/gdc/projects/PROJECT_ID/users/USER_ID" + "links": { + "roles": "/gdc/projects/PROJECT_ID/users/USER_ID/roles", + "permissions": "/gdc/projects/PROJECT_ID/users/USER_ID/permissions", + "self": "/gdc/account/profile/USER_ID", + "invitations": "/gdc/account/profile/USER_ID/invitations", + "projects": "/gdc/account/profile/USER_ID/projects", + "projectRelUri": "/gdc/projects/PROJECT_ID/users/USER_ID" }, - "meta" : { - "created" : "2015-03-30 11:36:09", - "updated" : "2015-03-30 12:14:41", - "author" : "/gdc/account/profile/PROFILE_ID", - "title" : "ateam ads-testing", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "created": "2015-03-30 11:36:09", + "updated": "2015-03-30 12:14:41", + "author": "/gdc/account/profile/PROFILE_ID", + "title": "ateam ads-testing", + "contributor": "/gdc/account/profile/USER_ID" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/project/project-users.json b/gooddata-java-model/src/test/resources/project/project-users.json index 882d79bd1..fbdd18f47 100644 --- a/gooddata-java-model/src/test/resources/project/project-users.json +++ b/gooddata-java-model/src/test/resources/project/project-users.json @@ -1,32 +1,32 @@ { - "users" : [ + "users": [ { - "user" : { - "content" : { - "email" : "ateam+ads-testing@gooddata.com", - "firstname" : "ateam", - "userRoles" : [ + "user": { + "content": { + "email": "ateam+ads-testing@gooddata.com", + "firstname": "ateam", + "userRoles": [ "/gdc/projects/PROJECT_ID/roles/ROLE1" ], - "phonenumber" : "123456789", - "status" : "ENABLED", - "lastname" : "ads-testing", - "login" : "ateam+ads-testing@gooddata.com" + "phonenumber": "123456789", + "status": "ENABLED", + "lastname": "ads-testing", + "login": "ateam+ads-testing@gooddata.com" }, - "links" : { - "roles" : "/gdc/projects/PROJECT_ID/users/USER_ID/roles", - "permissions" : "/gdc/projects/PROJECT_ID/users/USER_ID/permissions", - "self" : "/gdc/account/profile/USER_ID", - "invitations" : "/gdc/account/profile/USER_ID/invitations", - "projects" : "/gdc/account/profile/USER_ID/projects", - "projectRelUri" : "/gdc/projects/PROJECT_ID/users/USER_ID" + "links": { + "roles": "/gdc/projects/PROJECT_ID/users/USER_ID/roles", + "permissions": "/gdc/projects/PROJECT_ID/users/USER_ID/permissions", + "self": "/gdc/account/profile/USER_ID", + "invitations": "/gdc/account/profile/USER_ID/invitations", + "projects": "/gdc/account/profile/USER_ID/projects", + "projectRelUri": "/gdc/projects/PROJECT_ID/users/USER_ID" }, - "meta" : { - "created" : "2015-03-30 11:36:09", - "updated" : "2015-03-30 12:14:41", - "author" : "/gdc/account/profile/PROFILE_ID", - "title" : "ateam ads-testing", - "contributor" : "/gdc/account/profile/USER_ID" + "meta": { + "created": "2015-03-30 11:36:09", + "updated": "2015-03-30 12:14:41", + "author": "/gdc/account/profile/PROFILE_ID", + "title": "ateam ads-testing", + "contributor": "/gdc/account/profile/USER_ID" } } } diff --git a/gooddata-java-model/src/test/resources/project/project-validationResultParam.json b/gooddata-java-model/src/test/resources/project/project-validationResultParam.json index 30d109a79..40c2b5472 100644 --- a/gooddata-java-model/src/test/resources/project/project-validationResultParam.json +++ b/gooddata-java-model/src/test/resources/project/project-validationResultParam.json @@ -11,13 +11,19 @@ }, { "sli_el": { - "ids": ["4761"], - "vals": ["Deleted"] + "ids": [ + "4761" + ], + "vals": [ + "Deleted" + ] } }, { "gdctime_el": { - "ids": ["4762"] + "ids": [ + "4762" + ] } } ] diff --git a/gooddata-java-model/src/test/resources/project/project-vertica.json b/gooddata-java-model/src/test/resources/project/project-vertica.json index a04bda0b3..ff85a013e 100644 --- a/gooddata-java-model/src/test/resources/project/project-vertica.json +++ b/gooddata-java-model/src/test/resources/project/project-vertica.json @@ -1,39 +1,38 @@ { - "project" : { - "content" : { - "cluster" : "CLUSTER", - "authorizationToken" : "AUTH_TOKEN", - "guidedNavigation" : "1", - "isPublic" : "0", - "driver" : "vertica", - "state" : "ENABLED" - }, - "links" : { - "ldm_thumbnail" : "/gdc/projects/PROJECT_ID/ldm?thumbnail=1", - "self" : "/gdc/projects/PROJECT_ID", - "clearCaches" : "/gdc/projects/PROJECT_ID/clearCaches", - "invitations" : "/gdc/projects/PROJECT_ID/invitations", - "users" : "/gdc/projects/PROJECT_ID/users?link=1", - "groups" : "/gdc/projects/PROJECT_ID/groups", - "uploads" : "https://ea-di.staging.getgooddata.com/project-uploads/PROJECT_ID/", - "ldm" : "/gdc/projects/PROJECT_ID/ldm", - "metadata" : "/gdc/md/PROJECT_ID", - "publicartifacts" : "/gdc/projects/PROJECT_ID/publicartifacts", - "roles" : "/gdc/projects/PROJECT_ID/roles", - "dataload" : "/gdc/projects/PROJECT_ID/dataload", - "connectors" : "/gdc/projects/PROJECT_ID/connectors", - "execute" : "/gdc/projects/PROJECT_ID/execute", - "schedules" : "/gdc/projects/PROJECT_ID/schedules", - "templates" : "/gdc/md/PROJECT_ID/templates", - "eventstores" : "/gdc/projects/PROJECT_ID/dataload/eventstore/stores" - }, - "meta" : { - "created" : "2014-04-11 11:43:45", - "summary" : "DESC", - "updated" : "2014-04-11 11:43:47", - "author" : "/gdc/account/profile/USER_ID", - "title" : "TITLE", - "contributor" : "/gdc/account/profile/CONTRIB_USER_ID" - } + "project": { + "content": { + "cluster": "CLUSTER", + "authorizationToken": "AUTH_TOKEN", + "guidedNavigation": "1", + "isPublic": "0", + "driver": "vertica", + "state": "ENABLED" + }, + "links": { + "ldm_thumbnail": "/gdc/projects/PROJECT_ID/ldm?thumbnail=1", + "self": "/gdc/projects/PROJECT_ID", + "clearCaches": "/gdc/projects/PROJECT_ID/clearCaches", + "invitations": "/gdc/projects/PROJECT_ID/invitations", + "users": "/gdc/projects/PROJECT_ID/users?link=1", + "groups": "/gdc/projects/PROJECT_ID/groups", + "uploads": "https://ea-di.staging.getgooddata.com/project-uploads/PROJECT_ID/", + "ldm": "/gdc/projects/PROJECT_ID/ldm", + "metadata": "/gdc/md/PROJECT_ID", + "publicartifacts": "/gdc/projects/PROJECT_ID/publicartifacts", + "roles": "/gdc/projects/PROJECT_ID/roles", + "dataload": "/gdc/projects/PROJECT_ID/dataload", + "connectors": "/gdc/projects/PROJECT_ID/connectors", + "execute": "/gdc/projects/PROJECT_ID/execute", + "schedules": "/gdc/projects/PROJECT_ID/schedules", + "templates": "/gdc/md/PROJECT_ID/templates" + }, + "meta": { + "created": "2014-04-11 11:43:45", + "summary": "DESC", + "updated": "2014-04-11 11:43:47", + "author": "/gdc/account/profile/USER_ID", + "title": "TITLE", + "contributor": "/gdc/account/profile/CONTRIB_USER_ID" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/project/project.json b/gooddata-java-model/src/test/resources/project/project.json index fa06c00c3..68cd80dfa 100644 --- a/gooddata-java-model/src/test/resources/project/project.json +++ b/gooddata-java-model/src/test/resources/project/project.json @@ -1,40 +1,39 @@ { - "project" : { - "content" : { - "cluster" : "CLUSTER", - "authorizationToken" : "AUTH_TOKEN", - "guidedNavigation" : "1", - "isPublic" : "0", - "driver" : "Pg", - "environment" : "TESTING", - "state" : "ENABLED" - }, - "links" : { - "ldm_thumbnail" : "/gdc/projects/PROJECT_ID/ldm?thumbnail=1", - "self" : "/gdc/projects/PROJECT_ID", - "clearCaches" : "/gdc/projects/PROJECT_ID/clearCaches", - "invitations" : "/gdc/projects/PROJECT_ID/invitations", - "users" : "/gdc/projects/PROJECT_ID/users?link=1", - "groups" : "/gdc/projects/PROJECT_ID/groups", - "uploads" : "https://ea-di.staging.getgooddata.com/project-uploads/PROJECT_ID/", - "ldm" : "/gdc/projects/PROJECT_ID/ldm", - "metadata" : "/gdc/md/PROJECT_ID", - "publicartifacts" : "/gdc/projects/PROJECT_ID/publicartifacts", - "roles" : "/gdc/projects/PROJECT_ID/roles", - "dataload" : "/gdc/projects/PROJECT_ID/dataload", - "connectors" : "/gdc/projects/PROJECT_ID/connectors", - "execute" : "/gdc/projects/PROJECT_ID/execute", - "schedules" : "/gdc/projects/PROJECT_ID/schedules", - "templates" : "/gdc/md/PROJECT_ID/templates", - "eventstores" : "/gdc/projects/PROJECT_ID/dataload/eventstore/stores" - }, - "meta" : { - "created" : "2014-04-11 11:43:45", - "summary" : "DESC", - "updated" : "2014-04-11 11:43:47", - "author" : "/gdc/account/profile/USER_ID", - "title" : "TITLE", - "contributor" : "/gdc/account/profile/CONTRIB_USER_ID" - } + "project": { + "content": { + "cluster": "CLUSTER", + "authorizationToken": "AUTH_TOKEN", + "guidedNavigation": "1", + "isPublic": "0", + "driver": "Pg", + "environment": "TESTING", + "state": "ENABLED" + }, + "links": { + "ldm_thumbnail": "/gdc/projects/PROJECT_ID/ldm?thumbnail=1", + "self": "/gdc/projects/PROJECT_ID", + "clearCaches": "/gdc/projects/PROJECT_ID/clearCaches", + "invitations": "/gdc/projects/PROJECT_ID/invitations", + "users": "/gdc/projects/PROJECT_ID/users?link=1", + "groups": "/gdc/projects/PROJECT_ID/groups", + "uploads": "https://ea-di.staging.getgooddata.com/project-uploads/PROJECT_ID/", + "ldm": "/gdc/projects/PROJECT_ID/ldm", + "metadata": "/gdc/md/PROJECT_ID", + "publicartifacts": "/gdc/projects/PROJECT_ID/publicartifacts", + "roles": "/gdc/projects/PROJECT_ID/roles", + "dataload": "/gdc/projects/PROJECT_ID/dataload", + "connectors": "/gdc/projects/PROJECT_ID/connectors", + "execute": "/gdc/projects/PROJECT_ID/execute", + "schedules": "/gdc/projects/PROJECT_ID/schedules", + "templates": "/gdc/md/PROJECT_ID/templates" + }, + "meta": { + "created": "2014-04-11 11:43:45", + "summary": "DESC", + "updated": "2014-04-11 11:43:47", + "author": "/gdc/account/profile/USER_ID", + "title": "TITLE", + "contributor": "/gdc/account/profile/CONTRIB_USER_ID" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/project/projects.json b/gooddata-java-model/src/test/resources/project/projects.json index 5db4b0093..d4d94dcfa 100644 --- a/gooddata-java-model/src/test/resources/project/projects.json +++ b/gooddata-java-model/src/test/resources/project/projects.json @@ -1,54 +1,53 @@ { - "projects": { - "paging": { - "offset": 0, - "limit": 5, - "count": 1, - "totalCount": 1 - }, - "items": [ - { - "project": { - "content": { - "state": "ENABLED", - "cluster": "", - "environment": "TESTING", - "driver": "Pg", - "isPublic": "0", - "guidedNavigation": "1" - }, - "meta": { - "title": "Project Name", - "summary": "", - "created": "2018-08-10 23:00:21", - "updated": "2018-08-10 23:00:22", - "author": "/gdc/account/profile/876ec68f5630b38de65852ed5d6236ff", - "contributor": "/gdc/account/profile/876ec68f5630b38de65852ed5d6236ff" - }, - "links": { - "self": "/gdc/projects/defaultEmptyProject", - "roles": "/gdc/projects/defaultEmptyProject/roles", - "users": "/gdc/projects/defaultEmptyProject/users?link=1&offset=0&limit=100", - "userRoles": "/gdc/projects/defaultEmptyProject/users/876ec68f5630b38de65852ed5d6236ff/roles", - "userPermissions": "/gdc/projects/defaultEmptyProject/users/876ec68f5630b38de65852ed5d6236ff/permissions", - "invitations": "/gdc/projects/defaultEmptyProject/invitations", - "ldm": "/gdc/projects/defaultEmptyProject/ldm", - "ldm_thumbnail": "/gdc/projects/defaultEmptyProject/ldm?thumbnail=1", - "publicartifacts": "/gdc/projects/defaultEmptyProject/publicartifacts", - "uploads": "/gdc/projects/defaultEmptyProject/uploads/", - "metadata": "/gdc/md/defaultEmptyProject", - "templates": "/gdc/md/defaultEmptyProject/templates", - "connectors": "/gdc/projects/defaultEmptyProject/connectors", - "schedules": "/gdc/projects/defaultEmptyProject/schedules", - "dataload": "/gdc/projects/defaultEmptyProject/dataload", - "eventstores": "/gdc/projects/defaultEmptyProject/dataload/eventstore/stores", - "execute": "/gdc/projects/defaultEmptyProject/execute", - "clearCaches": "/gdc/projects/defaultEmptyProject/clearCaches", - "projectFeatureFlags": "/gdc/projects/defaultEmptyProject/projectFeatureFlags", - "config": "/gdc/projects/defaultEmptyProject/config" - } - } - } - ] - } + "projects": { + "paging": { + "offset": 0, + "limit": 5, + "count": 1, + "totalCount": 1 + }, + "items": [ + { + "project": { + "content": { + "state": "ENABLED", + "cluster": "", + "environment": "TESTING", + "driver": "Pg", + "isPublic": "0", + "guidedNavigation": "1" + }, + "meta": { + "title": "Project Name", + "summary": "", + "created": "2018-08-10 23:00:21", + "updated": "2018-08-10 23:00:22", + "author": "/gdc/account/profile/876ec68f5630b38de65852ed5d6236ff", + "contributor": "/gdc/account/profile/876ec68f5630b38de65852ed5d6236ff" + }, + "links": { + "self": "/gdc/projects/defaultEmptyProject", + "roles": "/gdc/projects/defaultEmptyProject/roles", + "users": "/gdc/projects/defaultEmptyProject/users?link=1&offset=0&limit=100", + "userRoles": "/gdc/projects/defaultEmptyProject/users/876ec68f5630b38de65852ed5d6236ff/roles", + "userPermissions": "/gdc/projects/defaultEmptyProject/users/876ec68f5630b38de65852ed5d6236ff/permissions", + "invitations": "/gdc/projects/defaultEmptyProject/invitations", + "ldm": "/gdc/projects/defaultEmptyProject/ldm", + "ldm_thumbnail": "/gdc/projects/defaultEmptyProject/ldm?thumbnail=1", + "publicartifacts": "/gdc/projects/defaultEmptyProject/publicartifacts", + "uploads": "/gdc/projects/defaultEmptyProject/uploads/", + "metadata": "/gdc/md/defaultEmptyProject", + "templates": "/gdc/md/defaultEmptyProject/templates", + "connectors": "/gdc/projects/defaultEmptyProject/connectors", + "schedules": "/gdc/projects/defaultEmptyProject/schedules", + "dataload": "/gdc/projects/defaultEmptyProject/dataload", + "execute": "/gdc/projects/defaultEmptyProject/execute", + "clearCaches": "/gdc/projects/defaultEmptyProject/clearCaches", + "projectFeatureFlags": "/gdc/projects/defaultEmptyProject/projectFeatureFlags", + "config": "/gdc/projects/defaultEmptyProject/config" + } + } + } + ] + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/projecttemplate/template.json b/gooddata-java-model/src/test/resources/projecttemplate/template.json index b98309eb9..a07e07d9e 100644 --- a/gooddata-java-model/src/test/resources/projecttemplate/template.json +++ b/gooddata-java-model/src/test/resources/projecttemplate/template.json @@ -1,25 +1,25 @@ { - "projectTemplate" : { - "link" : "/projectTemplates/ZendeskAnalytics/20", - "urn" : "urn:gooddata:ZendeskAnalytics", - "version" : "20", - "content" : { - "MDDefinition" : "/projectTemplates/ZendeskAnalytics/20/ZendeskAnalytics.json", - "DWDefinition" : "/projectTemplates/ZendeskAnalytics/20/ZendeskAnalytics.sql", - "manifests" : [ + "projectTemplate": { + "link": "/projectTemplates/ZendeskAnalytics/20", + "urn": "urn:gooddata:ZendeskAnalytics", + "version": "20", + "content": { + "MDDefinition": "/projectTemplates/ZendeskAnalytics/20/ZendeskAnalytics.json", + "DWDefinition": "/projectTemplates/ZendeskAnalytics/20/ZendeskAnalytics.sql", + "manifests": [ "/projectTemplates/ZendeskAnalytics/20/dataset.zendesktickets.json" ], - "config" : "/projectTemplates/ZendeskAnalytics/20/config.json" + "config": "/projectTemplates/ZendeskAnalytics/20/config.json" }, - "hidden" : "1", - "meta" : { - "summary" : "Zendesk Analytics Template", - "apiVersion" : "1.1", - "title" : "Zendesk Analytics Template", - "category" : "projectTemplate", - "author" : { - "name" : "GoodData", - "uri" : "http://www.gooddata.com/" + "hidden": "1", + "meta": { + "summary": "Zendesk Analytics Template", + "apiVersion": "1.1", + "title": "Zendesk Analytics Template", + "category": "projectTemplate", + "author": { + "name": "GoodData", + "uri": "http://www.gooddata.com/" } } } diff --git a/gooddata-java-model/src/test/resources/report/executeDefinition.json b/gooddata-java-model/src/test/resources/report/executeDefinition.json index f29a80af0..ab01b8cd7 100644 --- a/gooddata-java-model/src/test/resources/report/executeDefinition.json +++ b/gooddata-java-model/src/test/resources/report/executeDefinition.json @@ -1,5 +1,5 @@ { - "report_req": { - "reportDefinition": "DEF-URI" - } + "report_req": { + "reportDefinition": "DEF-URI" + } } diff --git a/gooddata-java-model/src/test/resources/report/executeReport.json b/gooddata-java-model/src/test/resources/report/executeReport.json index 284cb79ed..bff996d26 100644 --- a/gooddata-java-model/src/test/resources/report/executeReport.json +++ b/gooddata-java-model/src/test/resources/report/executeReport.json @@ -1,5 +1,5 @@ { - "report_req": { - "report": "DEF-URI" - } + "report_req": { + "report": "DEF-URI" + } } diff --git a/gooddata-java-model/src/test/resources/warehouse/schema.json b/gooddata-java-model/src/test/resources/warehouse/schema.json index 57489d15c..582a5a51d 100644 --- a/gooddata-java-model/src/test/resources/warehouse/schema.json +++ b/gooddata-java-model/src/test/resources/warehouse/schema.json @@ -1,11 +1,11 @@ { - "schema" : { - "name" : "default", - "description" : "Default schema for new ADS instance", - "links" : { - "self" : "/gdc/datawarehouse/instances/instanceId/schemas/default", - "parent" : "/gdc/datawarehouse/instances/warehouseId/schemas", - "instance" : "/gdc/datawarehouse/instances/instanceId" + "schema": { + "name": "default", + "description": "Default schema for new ADS instance", + "links": { + "self": "/gdc/datawarehouse/instances/instanceId/schemas/default", + "parent": "/gdc/datawarehouse/instances/warehouseId/schemas", + "instance": "/gdc/datawarehouse/instances/instanceId" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/warehouse/schemas.json b/gooddata-java-model/src/test/resources/warehouse/schemas.json index 0970bad9e..134111772 100644 --- a/gooddata-java-model/src/test/resources/warehouse/schemas.json +++ b/gooddata-java-model/src/test/resources/warehouse/schemas.json @@ -1,20 +1,22 @@ { - "schemas" : { - "items" : [ { - "schema" : { - "name" : "default", - "description" : "Default schema for new ADS instance", - "links" : { - "self" : "/gdc/datawarehouse/instances/instanceId/schemas/default", - "parent" : "/gdc/datawarehouse/instances/instanceId/schemas", - "instance" : "/gdc/datawarehouse/instances/instanceId" + "schemas": { + "items": [ + { + "schema": { + "name": "default", + "description": "Default schema for new ADS instance", + "links": { + "self": "/gdc/datawarehouse/instances/instanceId/schemas/default", + "parent": "/gdc/datawarehouse/instances/instanceId/schemas", + "instance": "/gdc/datawarehouse/instances/instanceId" + } } } - } ], - "paging" : { }, - "links" : { - "self" : "/gdc/datawarehouse/instances/instanceId/schemas", - "parent" : "/gdc/datawarehouse/instances/instanceId" + ], + "paging": {}, + "links": { + "self": "/gdc/datawarehouse/instances/instanceId/schemas", + "parent": "/gdc/datawarehouse/instances/instanceId" } } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/warehouse/user-createWithLogin.json b/gooddata-java-model/src/test/resources/warehouse/user-createWithLogin.json index 57f1b96c0..9697ca61a 100644 --- a/gooddata-java-model/src/test/resources/warehouse/user-createWithLogin.json +++ b/gooddata-java-model/src/test/resources/warehouse/user-createWithLogin.json @@ -1,6 +1,6 @@ { - "user" : { - "role" : "admin", - "login" : "foo@bar.com" - } + "user": { + "role": "admin", + "login": "foo@bar.com" + } } diff --git a/gooddata-java-model/src/test/resources/warehouse/user-createWithProfile.json b/gooddata-java-model/src/test/resources/warehouse/user-createWithProfile.json index 666f8cdfc..2fd1988c4 100644 --- a/gooddata-java-model/src/test/resources/warehouse/user-createWithProfile.json +++ b/gooddata-java-model/src/test/resources/warehouse/user-createWithProfile.json @@ -1,6 +1,6 @@ { - "user" : { - "role" : "admin", - "profile" : "/gdc/account/profile/{profile-id}" - } + "user": { + "role": "admin", + "profile": "/gdc/account/profile/{profile-id}" + } } diff --git a/gooddata-java-model/src/test/resources/warehouse/user.json b/gooddata-java-model/src/test/resources/warehouse/user.json index 4d2320c7b..53b32eaca 100644 --- a/gooddata-java-model/src/test/resources/warehouse/user.json +++ b/gooddata-java-model/src/test/resources/warehouse/user.json @@ -1,11 +1,11 @@ { - "user" : { - "role" : "admin", - "profile" : "/gdc/account/profile/{profile-id}", - "login" : "foo@bar.com", - "links" : { - "self" : "/gdc/datawarehouse/instances/{instance-id}/users/{profile-id}", - "parent" : "/gdc/datawarehouse/instances/{instance-id}/users" - } + "user": { + "role": "admin", + "profile": "/gdc/account/profile/{profile-id}", + "login": "foo@bar.com", + "links": { + "self": "/gdc/datawarehouse/instances/{instance-id}/users/{profile-id}", + "parent": "/gdc/datawarehouse/instances/{instance-id}/users" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/warehouse/users-empty.json b/gooddata-java-model/src/test/resources/warehouse/users-empty.json index 5974e5512..56b5c4acc 100644 --- a/gooddata-java-model/src/test/resources/warehouse/users-empty.json +++ b/gooddata-java-model/src/test/resources/warehouse/users-empty.json @@ -1,7 +1,7 @@ { - "users": { - "items": [], - "paging": {}, - "links": {} - } + "users": { + "items": [], + "paging": {}, + "links": {} + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/warehouse/users.json b/gooddata-java-model/src/test/resources/warehouse/users.json index 57c48a2f9..af3b38496 100644 --- a/gooddata-java-model/src/test/resources/warehouse/users.json +++ b/gooddata-java-model/src/test/resources/warehouse/users.json @@ -1,31 +1,31 @@ { - "users": { - "items": [ - { - "user": { - "role": "admin", - "profile": "/gdc/account/profile/{profile-id}", - "links": { - "self": "/gdc/datawarehouse/instances/{instance-id}/users/{profile-id}", - "parent": "/gdc/datawarehouse/instances/{instance-id}/users" - } - } - }, - { - "user": { - "role": "dataAdmin", - "profile": "/gdc/account/profile/{profile-id-2}", - "links": { - "self": "/gdc/datawarehouse/instances/{instance-id}/users/{profile-id-2}", - "parent": "/gdc/datawarehouse/instances/{instance-id}/users" - } - } - } - ], - "paging": {}, - "links": { - "parent": "/gdc/datawarehouse/{instance-id}", - "self": "/gdc/datawarehouse/instances/{instance-id}/users" + "users": { + "items": [ + { + "user": { + "role": "admin", + "profile": "/gdc/account/profile/{profile-id}", + "links": { + "self": "/gdc/datawarehouse/instances/{instance-id}/users/{profile-id}", + "parent": "/gdc/datawarehouse/instances/{instance-id}/users" + } } + }, + { + "user": { + "role": "dataAdmin", + "profile": "/gdc/account/profile/{profile-id-2}", + "links": { + "self": "/gdc/datawarehouse/instances/{instance-id}/users/{profile-id-2}", + "parent": "/gdc/datawarehouse/instances/{instance-id}/users" + } + } + } + ], + "paging": {}, + "links": { + "parent": "/gdc/datawarehouse/{instance-id}", + "self": "/gdc/datawarehouse/instances/{instance-id}/users" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/warehouse/warehouse-create.json b/gooddata-java-model/src/test/resources/warehouse/warehouse-create.json index a51dfb9cb..352a3e3c0 100644 --- a/gooddata-java-model/src/test/resources/warehouse/warehouse-create.json +++ b/gooddata-java-model/src/test/resources/warehouse/warehouse-create.json @@ -1,8 +1,8 @@ { - "instance": { - "title": "New ADS", - "authorizationToken": "Your-ADS-Token", - "description": "ADS Description", - "environment": "TESTING" - } + "instance": { + "title": "New ADS", + "authorizationToken": "Your-ADS-Token", + "description": "ADS Description", + "environment": "TESTING" + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/warehouse/warehouse-null-token.json b/gooddata-java-model/src/test/resources/warehouse/warehouse-null-token.json index 4bafa4c50..8dc9b41c2 100644 --- a/gooddata-java-model/src/test/resources/warehouse/warehouse-null-token.json +++ b/gooddata-java-model/src/test/resources/warehouse/warehouse-null-token.json @@ -1,19 +1,19 @@ { - "instance" : { - "title" : "Test", - "description" : "Storage", - "status" : "ENABLED", - "created" : "2014-05-05T08:27:33.000Z", - "updated" : "2014-05-05T08:27:34.000Z", - "createdBy" : "/gdc/account/profile/createdBy", - "updatedBy" : "/gdc/account/profile/updatedBy", - "environment" : "TESTING", - "connectionUrl" : "CONNECTION_URL", - "links" : { - "self" : "/gdc/datawarehouse/instances/instanceId", - "parent" : "/gdc/datawarehouse/instances", - "users" : "/gdc/datawarehouse/instances/instanceId/users", - "jdbc" : "/gdc/datawarehouse/instances/instanceId/jdbc" - } + "instance": { + "title": "Test", + "description": "Storage", + "status": "ENABLED", + "created": "2014-05-05T08:27:33.000Z", + "updated": "2014-05-05T08:27:34.000Z", + "createdBy": "/gdc/account/profile/createdBy", + "updatedBy": "/gdc/account/profile/updatedBy", + "environment": "TESTING", + "connectionUrl": "CONNECTION_URL", + "links": { + "self": "/gdc/datawarehouse/instances/instanceId", + "parent": "/gdc/datawarehouse/instances", + "users": "/gdc/datawarehouse/instances/instanceId/users", + "jdbc": "/gdc/datawarehouse/instances/instanceId/jdbc" } + } } diff --git a/gooddata-java-model/src/test/resources/warehouse/warehouse-withLicense.json b/gooddata-java-model/src/test/resources/warehouse/warehouse-withLicense.json index 1e2fe9746..be0f3bf19 100644 --- a/gooddata-java-model/src/test/resources/warehouse/warehouse-withLicense.json +++ b/gooddata-java-model/src/test/resources/warehouse/warehouse-withLicense.json @@ -1,21 +1,21 @@ { - "instance" : { - "title" : "Test", - "description" : "Storage", - "status" : "ENABLED", - "authorizationToken" : "{Token}", - "created" : "2014-05-05T08:27:33.000Z", - "updated" : "2014-05-05T08:27:34.000Z", - "createdBy" : "/gdc/account/profile/createdBy", - "updatedBy" : "/gdc/account/profile/updatedBy", - "environment" : "TESTING", - "connectionUrl" : "CONNECTION_URL", + "instance": { + "title": "Test", + "description": "Storage", + "status": "ENABLED", + "authorizationToken": "{Token}", + "created": "2014-05-05T08:27:33.000Z", + "updated": "2014-05-05T08:27:34.000Z", + "createdBy": "/gdc/account/profile/createdBy", + "updatedBy": "/gdc/account/profile/updatedBy", + "environment": "TESTING", + "connectionUrl": "CONNECTION_URL", "license": "PREMIUM", - "links" : { - "self" : "/gdc/datawarehouse/instances/instanceId", - "parent" : "/gdc/datawarehouse/instances", - "users" : "/gdc/datawarehouse/instances/instanceId/users", - "jdbc" : "/gdc/datawarehouse/instances/instanceId/jdbc" + "links": { + "self": "/gdc/datawarehouse/instances/instanceId", + "parent": "/gdc/datawarehouse/instances", + "users": "/gdc/datawarehouse/instances/instanceId/users", + "jdbc": "/gdc/datawarehouse/instances/instanceId/jdbc" } } } diff --git a/gooddata-java-model/src/test/resources/warehouse/warehouse.json b/gooddata-java-model/src/test/resources/warehouse/warehouse.json index 971150215..d6d11be19 100644 --- a/gooddata-java-model/src/test/resources/warehouse/warehouse.json +++ b/gooddata-java-model/src/test/resources/warehouse/warehouse.json @@ -1,20 +1,20 @@ { - "instance" : { - "title" : "Test", - "description" : "Storage", - "status" : "ENABLED", - "authorizationToken" : "{Token}", - "created" : "2014-05-05T08:27:33.000Z", - "updated" : "2014-05-05T08:27:34.000Z", - "createdBy" : "/gdc/account/profile/createdBy", - "updatedBy" : "/gdc/account/profile/updatedBy", - "environment" : "TESTING", - "connectionUrl" : "CONNECTION_URL", - "links" : { - "self" : "/gdc/datawarehouse/instances/instanceId", - "parent" : "/gdc/datawarehouse/instances", - "users" : "/gdc/datawarehouse/instances/instanceId/users", - "jdbc" : "/gdc/datawarehouse/instances/instanceId/jdbc" - } + "instance": { + "title": "Test", + "description": "Storage", + "status": "ENABLED", + "authorizationToken": "{Token}", + "created": "2014-05-05T08:27:33.000Z", + "updated": "2014-05-05T08:27:34.000Z", + "createdBy": "/gdc/account/profile/createdBy", + "updatedBy": "/gdc/account/profile/updatedBy", + "environment": "TESTING", + "connectionUrl": "CONNECTION_URL", + "links": { + "self": "/gdc/datawarehouse/instances/instanceId", + "parent": "/gdc/datawarehouse/instances", + "users": "/gdc/datawarehouse/instances/instanceId/users", + "jdbc": "/gdc/datawarehouse/instances/instanceId/jdbc" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/warehouse/warehouseTask-finished.json b/gooddata-java-model/src/test/resources/warehouse/warehouseTask-finished.json index 27ccccf5c..44d4f0fb8 100644 --- a/gooddata-java-model/src/test/resources/warehouse/warehouseTask-finished.json +++ b/gooddata-java-model/src/test/resources/warehouse/warehouseTask-finished.json @@ -1,9 +1,9 @@ { - "asyncTask": { - "links": { - "instance": "/gdc/datawarehouse/instances/instanceId", - "user": "/gdc/datawarehouse/instances/instanceId/users/userId", - "users": "/gdc/datawarehouse/instances/instanceId/users" - } + "asyncTask": { + "links": { + "instance": "/gdc/datawarehouse/instances/instanceId", + "user": "/gdc/datawarehouse/instances/instanceId/users/userId", + "users": "/gdc/datawarehouse/instances/instanceId/users" } + } } diff --git a/gooddata-java-model/src/test/resources/warehouse/warehouseTask-poll.json b/gooddata-java-model/src/test/resources/warehouse/warehouseTask-poll.json index 3ebc5f4b9..482a0b727 100644 --- a/gooddata-java-model/src/test/resources/warehouse/warehouseTask-poll.json +++ b/gooddata-java-model/src/test/resources/warehouse/warehouseTask-poll.json @@ -1,7 +1,7 @@ { - "asyncTask" : { - "links" : { - "poll" : "/gdc/datawarehouse/executions/executionId" - } + "asyncTask": { + "links": { + "poll": "/gdc/datawarehouse/executions/executionId" } + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/warehouse/warehouses-empty.json b/gooddata-java-model/src/test/resources/warehouse/warehouses-empty.json index 0d21b4838..65f4afe7e 100644 --- a/gooddata-java-model/src/test/resources/warehouse/warehouses-empty.json +++ b/gooddata-java-model/src/test/resources/warehouse/warehouses-empty.json @@ -1,7 +1,7 @@ { - "instances" : { - "items" : [], - "paging" : {}, - "links" : {} - } + "instances": { + "items": [], + "paging": {}, + "links": {} + } } \ No newline at end of file diff --git a/gooddata-java-model/src/test/resources/warehouse/warehouses.json b/gooddata-java-model/src/test/resources/warehouse/warehouses.json index f9deee1f8..b1a70bea0 100644 --- a/gooddata-java-model/src/test/resources/warehouse/warehouses.json +++ b/gooddata-java-model/src/test/resources/warehouse/warehouses.json @@ -1,46 +1,49 @@ { - "instances" : { - "items" : [ { - "instance" : { - "title" : "Storage", - "description" : "Testing Storage", - "status" : "ENABLED", - "authorizationToken" : "token", - "created" : "2014-03-17T13:02:39.000Z", - "updated" : "2014-03-17T13:02:41.000Z", - "createdBy" : "/gdc/account/profile/{profile-id}", - "updatedBy" : "/gdc/account/profile/{profile-id}", - "connectionUrl" : "test", - "links" : { - "self" : "/gdc/datawarehouse/instances/{instance-id}", - "parent" : "/gdc/datawarehouse/instances", - "users" : "/gdc/datawarehouse/instances/{instance-id}/users", - "jdbc" : "/gdc/datawarehouse/instances/{instance-id}/jdbc" - } - } - }, { - "instance" : { - "title" : "Salesforce", - "description" : "Test", - "status" : "ENABLED", - "authorizationToken" : "token", - "created" : "2014-04-09T22:10:26.000Z", - "updated" : "2014-04-09T22:10:26.000Z", - "createdBy" : "/gdc/account/profile/{profile-id}", - "updatedBy" : "/gdc/account/profile/{profile-id}", - "connectionUrl" : "test", - "links" : { - "self" : "/gdc/datawarehouse/instances/{instance-id}", - "parent" : "/gdc/datawarehouse/instances", - "users" : "/gdc/datawarehouse/instances/{instance-id}/users", - "jdbc" : "/gdc/datawarehouse/instances/{instance-id}/jdbc" - } - } - } ], - "paging" : {}, - "links" : { - "parent" : "/gdc/datawarehouse", - "self" : "/gdc/datawarehouse/instances" + "instances": { + "items": [ + { + "instance": { + "title": "Storage", + "description": "Testing Storage", + "status": "ENABLED", + "authorizationToken": "token", + "created": "2014-03-17T13:02:39.000Z", + "updated": "2014-03-17T13:02:41.000Z", + "createdBy": "/gdc/account/profile/{profile-id}", + "updatedBy": "/gdc/account/profile/{profile-id}", + "connectionUrl": "test", + "links": { + "self": "/gdc/datawarehouse/instances/{instance-id}", + "parent": "/gdc/datawarehouse/instances", + "users": "/gdc/datawarehouse/instances/{instance-id}/users", + "jdbc": "/gdc/datawarehouse/instances/{instance-id}/jdbc" + } } + }, + { + "instance": { + "title": "Salesforce", + "description": "Test", + "status": "ENABLED", + "authorizationToken": "token", + "created": "2014-04-09T22:10:26.000Z", + "updated": "2014-04-09T22:10:26.000Z", + "createdBy": "/gdc/account/profile/{profile-id}", + "updatedBy": "/gdc/account/profile/{profile-id}", + "connectionUrl": "test", + "links": { + "self": "/gdc/datawarehouse/instances/{instance-id}", + "parent": "/gdc/datawarehouse/instances", + "users": "/gdc/datawarehouse/instances/{instance-id}/users", + "jdbc": "/gdc/datawarehouse/instances/{instance-id}/jdbc" + } + } + } + ], + "paging": {}, + "links": { + "parent": "/gdc/datawarehouse", + "self": "/gdc/datawarehouse/instances" } + } } \ No newline at end of file diff --git a/gooddata-java/pom.xml b/gooddata-java/pom.xml index 8fe2f6afa..9140b468e 100644 --- a/gooddata-java/pom.xml +++ b/gooddata-java/pom.xml @@ -3,11 +3,12 @@ 4.0.0 gooddata-java + ${project.artifactId} gooddata-java-parent com.gooddata - 3.5.1-SNAPSHOT + 5.0.2+api3-SNAPSHOT @@ -33,6 +34,14 @@ org.apache.httpcomponents httpcore + + org.apache.httpcomponents.client5 + httpclient5 + + + org.apache.httpcomponents.core5 + httpcore5 + org.springframework spring-core @@ -64,7 +73,7 @@ org.springframework.retry spring-retry - 1.3.1 + 2.0.12 true @@ -145,7 +154,7 @@ test - org.codehaus.groovy + org.apache.groovy groovy test @@ -154,6 +163,11 @@ cglib-nodep test + + org.apache.tomcat.embed + tomcat-embed-core + test + @@ -162,7 +176,37 @@ org.codehaus.gmavenplus gmavenplus-plugin + + org.apache.maven.plugins + maven-shade-plugin + 3.5.1 + + + package + + shade + + + false + true + + + org.apache.httpcomponents:httpclient + org.apache.httpcomponents:httpcore + com.github.lookfirst:sardine + + + + + org.apache.http + com.gooddata.shadowed.http4 + + + + + + - \ No newline at end of file + diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/common/HttpClient5ComponentsClientHttpRequestFactory.java b/gooddata-java/src/main/java/com/gooddata/sdk/common/HttpClient5ComponentsClientHttpRequestFactory.java new file mode 100644 index 000000000..858f63a68 --- /dev/null +++ b/gooddata-java/src/main/java/com/gooddata/sdk/common/HttpClient5ComponentsClientHttpRequestFactory.java @@ -0,0 +1,300 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.common; + +import com.gooddata.http.client.GoodDataHttpClient; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.client5.http.classic.methods.HttpDelete; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.classic.methods.HttpHead; +import org.apache.hc.client5.http.classic.methods.HttpOptions; +import org.apache.hc.client5.http.classic.methods.HttpPatch; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.classic.methods.HttpPut; +import org.apache.hc.client5.http.classic.methods.HttpTrace; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.core5.http.ClassicHttpRequest; +import org.apache.hc.core5.http.ClassicHttpResponse; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpEntityContainer; +import org.apache.hc.core5.http.io.entity.ByteArrayEntity; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatusCode; +import org.springframework.http.client.ClientHttpRequest; +import org.springframework.http.client.ClientHttpRequestFactory; +import org.springframework.http.client.ClientHttpResponse; +import org.springframework.util.Assert; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URI; +import java.util.List; +import java.util.Map; + +/** + * Spring {@link ClientHttpRequestFactory} backed by Apache HttpClient 5 Classic API. + */ +public class HttpClient5ComponentsClientHttpRequestFactory implements ClientHttpRequestFactory { + + private static final Logger logger = LoggerFactory.getLogger(HttpClient5ComponentsClientHttpRequestFactory.class); + + private final HttpClient httpClient; + + public HttpClient5ComponentsClientHttpRequestFactory(final HttpClient httpClient) { + Assert.notNull(httpClient, "HttpClient must not be null"); + this.httpClient = httpClient; + } + + @Override + public ClientHttpRequest createRequest(final URI uri, final HttpMethod httpMethod) throws IOException { + final ClassicHttpRequest httpRequest = createHttpRequest(httpMethod, uri); + return new HttpClient5ComponentsClientHttpRequest(httpClient, httpRequest); + } + + private ClassicHttpRequest createHttpRequest(final HttpMethod httpMethod, final URI uri) { + if (HttpMethod.GET.equals(httpMethod)) { + return new HttpGet(uri); + } else if (HttpMethod.HEAD.equals(httpMethod)) { + return new HttpHead(uri); + } else if (HttpMethod.POST.equals(httpMethod)) { + return new HttpPost(uri); + } else if (HttpMethod.PUT.equals(httpMethod)) { + return new HttpPut(uri); + } else if (HttpMethod.PATCH.equals(httpMethod)) { + return new HttpPatch(uri); + } else if (HttpMethod.DELETE.equals(httpMethod)) { + return new HttpDelete(uri); + } else if (HttpMethod.OPTIONS.equals(httpMethod)) { + return new HttpOptions(uri); + } else if (HttpMethod.TRACE.equals(httpMethod)) { + return new HttpTrace(uri); + } else { + throw new IllegalArgumentException("Invalid HTTP method: " + httpMethod); + } + } + + /** + * {@link ClientHttpRequest} implementation using Apache HttpClient 5 Classic API. + */ + private static class HttpClient5ComponentsClientHttpRequest implements ClientHttpRequest { + + private final HttpClient httpClient; + private final ClassicHttpRequest httpRequest; + private final HttpHeaders headers; + private final ByteArrayOutputStream bufferedOutput = new ByteArrayOutputStream(1024); + + HttpClient5ComponentsClientHttpRequest(final HttpClient httpClient, final ClassicHttpRequest httpRequest) { + this.httpClient = httpClient; + this.httpRequest = httpRequest; + this.headers = new HttpHeaders(); + } + + @Override + public HttpMethod getMethod() { + return HttpMethod.valueOf(httpRequest.getMethod()); + } + + @Override + public String getMethodValue() { + return httpRequest.getMethod(); + } + + @Override + public URI getURI() { + try { + return httpRequest.getUri(); + } catch (Exception e) { + throw new RuntimeException("Failed to get URI from request", e); + } + } + + @Override + public HttpHeaders getHeaders() { + return headers; + } + + @Override + public OutputStream getBody() { + return bufferedOutput; + } + + @Override + public ClientHttpResponse execute() throws IOException { + final byte[] bytes = bufferedOutput.toByteArray(); + if (bytes.length > 0 && httpRequest instanceof HttpEntityContainer) { + // Determine content type from Spring headers first, then fallback to default + ContentType contentType = ContentType.APPLICATION_JSON; + final String contentTypeHeader = headers.getFirst(org.springframework.http.HttpHeaders.CONTENT_TYPE); + if (contentTypeHeader != null) { + try { + contentType = ContentType.parse(contentTypeHeader); + } catch (Exception e) { + logger.warn("Failed to parse Content-Type header '{}', using default", contentTypeHeader, e); + } + } + + final ByteArrayEntity requestEntity = new ByteArrayEntity(bytes, contentType); + ((HttpEntityContainer) httpRequest).setEntity(requestEntity); + } + + // Add headers after setting entity to avoid conflicts + addHeaders(httpRequest); + + final ClassicHttpResponse httpResponse = executeClassic(httpClient, httpRequest); + return new HttpClient5ComponentsClientHttpResponse(httpResponse); + } + + /** + * Execute the request while keeping the response stream open for callers (e.g. RestTemplate) + * to consume. Avoids using response handlers which auto-close streams. + * + *

    GoodDataHttpClient provides direct execute() methods that return ClassicHttpResponse + * without auto-closing streams. For standard CloseableHttpClient, we use executeOpen().

    + */ + private ClassicHttpResponse executeClassic(final HttpClient httpClient, + final ClassicHttpRequest httpRequest) throws IOException { + if (logger.isDebugEnabled()) { + try { + logger.debug("Executing request: {} {}", httpRequest.getMethod(), httpRequest.getUri()); + } catch (Exception e) { + logger.debug("Executing request: {}", httpRequest.getMethod()); + } + } + + // GoodDataHttpClient has direct execute() that returns ClassicHttpResponse + // without auto-closing streams - preferred for authenticated GoodData API calls + if (httpClient instanceof GoodDataHttpClient) { + logger.debug("Using GoodDataHttpClient execute"); + return ((GoodDataHttpClient) httpClient).execute(httpRequest); + } + + // For CloseableHttpClient (and subclasses), use executeOpen to keep streams alive + if (httpClient instanceof CloseableHttpClient) { + logger.debug("Using CloseableHttpClient executeOpen"); + return ((CloseableHttpClient) httpClient).executeOpen(null, httpRequest, null); + } + + // Fallback for other HttpClient implementations + logger.debug("Using standard HttpClient executeOpen"); + return httpClient.executeOpen(null, httpRequest, null); + } + + /** + * Add the headers from the HttpHeaders to the HttpRequest. + * Excludes headers that HttpClient 5 manages internally or that were already set. + */ + private void addHeaders(final ClassicHttpRequest httpRequest) { + for (Map.Entry> entry : headers.entrySet()) { + final String headerName = entry.getKey(); + + // Skip headers that HttpClient manages internally or that would cause conflicts + if ("Content-Length".equalsIgnoreCase(headerName) || + "Transfer-Encoding".equalsIgnoreCase(headerName) || + "Connection".equalsIgnoreCase(headerName) || + "Host".equalsIgnoreCase(headerName)) { + continue; + } + + // Remove any existing headers with the same name first to avoid duplicates + httpRequest.removeHeaders(headerName); + + // Add all values for this header + for (String headerValue : entry.getValue()) { + if (headerValue != null) { + httpRequest.addHeader(headerName, headerValue); + } + } + } + } + } + + /** + * {@link ClientHttpResponse} implementation backed by Apache HttpClient 5 Classic API. + */ + private static class HttpClient5ComponentsClientHttpResponse implements ClientHttpResponse { + + private final ClassicHttpResponse httpResponse; + private HttpHeaders headers; + + public HttpClient5ComponentsClientHttpResponse(ClassicHttpResponse httpResponse) { + this.httpResponse = httpResponse; + } + + @Override + public HttpStatusCode getStatusCode() throws IOException { + return HttpStatusCode.valueOf(httpResponse.getCode()); + } + + @Override + public int getRawStatusCode() throws IOException { + return httpResponse.getCode(); + } + + @Override + public String getStatusText() throws IOException { + return httpResponse.getReasonPhrase(); + } + + @Override + public HttpHeaders getHeaders() { + if (headers == null) { + headers = new HttpHeaders(); + for (org.apache.hc.core5.http.Header header : httpResponse.getHeaders()) { + headers.add(header.getName(), header.getValue()); + } + } + return headers; + } + + @Override + public InputStream getBody() throws IOException { + final HttpEntity entity = httpResponse.getEntity(); + if (entity == null) { + logger.debug("No entity in response, returning empty stream"); + return InputStream.nullInputStream(); + } + + try { + final InputStream content = entity.getContent(); + if (content == null) { + logger.debug("Entity content is null, returning empty stream"); + return InputStream.nullInputStream(); + } + + // Log entity details for debugging + if (logger.isTraceEnabled()) { + logger.trace("Returning entity content stream - repeatable: {}, streaming: {}, content length: {}", + entity.isRepeatable(), entity.isStreaming(), entity.getContentLength()); + } + + return content; + } catch (IllegalStateException e) { + logger.warn("Entity content stream is in illegal state (likely already consumed): {}", e.getMessage()); + throw new IOException("Response stream is no longer available: " + e.getMessage(), e); + } + } + + @Override + public void close() { + try { + logger.debug("Closing HTTP response"); + if (httpResponse != null) { + // For Apache HttpClient 5, we should just close the response directly + // The connection manager handles proper connection cleanup automatically + httpResponse.close(); + } + } catch (IOException e) { + logger.debug("Unable to close HTTP response", e); + } + } + } +} diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractPollHandler.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractPollHandler.java index b93d87653..1caf7cafc 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractPollHandler.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractPollHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -18,17 +18,17 @@ * * @param

    polling type * @param result type - * * @see FutureResult */ -public abstract class AbstractPollHandler extends AbstractPollHandlerBase { +public abstract class AbstractPollHandler extends AbstractPollHandlerBase { private URI pollingUri; /** * Creates a new instance of polling handler + * * @param pollingUri URI for polling - * @param pollClass class of the polling object (or {@link Void}) + * @param pollClass class of the polling object (or {@link Void}) * @param resultClass class of the result (or {@link Void}) */ public AbstractPollHandler(final String pollingUri, final Class

    pollClass, Class resultClass) { @@ -41,12 +41,12 @@ public final String getPollingUri() { return pollingUri.toString(); } + protected void setPollingUri(final String pollingUri) { + this.pollingUri = URI.create(notNull(pollingUri, "pollingUri")); + } + @Override public final URI getPolling() { return pollingUri; } - - protected void setPollingUri(final String pollingUri) { - this.pollingUri = URI.create(notNull(pollingUri, "pollingUri")); - } } diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractPollHandlerBase.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractPollHandlerBase.java index d70310f6b..2547dd9d0 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractPollHandlerBase.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractPollHandlerBase.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -17,7 +17,6 @@ * * @param

    polling type * @param result type - * * @see FutureResult */ public abstract class AbstractPollHandlerBase implements PollHandler { diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractService.java index fe53acb14..c7c117e87 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/AbstractService.java @@ -1,22 +1,18 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.service; -import static com.gooddata.sdk.common.util.Validate.notNull; -import static java.lang.String.format; -import static org.springframework.http.HttpMethod.GET; - import com.fasterxml.jackson.databind.ObjectMapper; import com.gooddata.sdk.common.GoodDataException; import com.gooddata.sdk.common.GoodDataRestException; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; +import org.springframework.http.HttpStatusCode; import org.springframework.http.client.ClientHttpResponse; import org.springframework.util.FileCopyUtils; -import org.springframework.util.StreamUtils; import org.springframework.web.client.HttpMessageConverterExtractor; import org.springframework.web.client.ResponseExtractor; import org.springframework.web.client.RestTemplate; @@ -25,19 +21,21 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.util.Objects; import java.util.concurrent.TimeUnit; +import static com.gooddata.sdk.common.util.Validate.notNull; +import static java.lang.String.format; +import static org.springframework.http.HttpMethod.GET; + /** * Parent for GoodData services providing helpers for REST API calls and polling. */ public abstract class AbstractService { protected final RestTemplate restTemplate; - - private final GoodDataSettings settings; - protected final ObjectMapper mapper = new ObjectMapper(); - + private final GoodDataSettings settings; private final ResponseExtractor reusableResponseExtractor = ReusableClientHttpResponse::new; /** @@ -45,14 +43,14 @@ public abstract class AbstractService { * this abstract one. * * @param restTemplate RESTful HTTP Spring template - * @param settings settings + * @param settings settings */ public AbstractService(final RestTemplate restTemplate, final GoodDataSettings settings) { this.restTemplate = notNull(restTemplate, "restTemplate"); this.settings = notNull(settings, "settings"); } - final R poll(final PollHandler handler, long timeout, final TimeUnit unit) { + final R poll(final PollHandler handler, long timeout, final TimeUnit unit) { notNull(handler, "handler"); final long start = System.currentTimeMillis(); while (true) { @@ -66,12 +64,13 @@ final R poll(final PollHandler handler, long timeout, final TimeUnit un try { Thread.sleep(settings.getPollSleep()); } catch (InterruptedException e) { + Thread.currentThread().interrupt(); throw new GoodDataException("interrupted"); } } } - final

    boolean pollOnce(final PollHandler handler) { + final

    boolean pollOnce(final PollHandler handler) { notNull(handler, "handler"); final ClientHttpResponse response; try { @@ -85,7 +84,7 @@ final

    boolean pollOnce(final PollHandler handler) { if (handler.isFinished(response)) { final P data = extractData(response, handler.getPollClass()); handler.handlePollResult(data); - } else if (HttpStatus.Series.CLIENT_ERROR.equals(response.getStatusCode().series())) { + } else if (HttpStatus.Series.CLIENT_ERROR.equals(HttpStatus.Series.resolve(response.getStatusCode().value()))) { throw new GoodDataException( format("Polling returned client error HTTP status %s", response.getStatusCode().value()) ); @@ -107,20 +106,18 @@ protected final T extractData(ClientHttpResponse response, Class cls) thr private static class ReusableClientHttpResponse implements ClientHttpResponse { - private byte[] body; - private final HttpStatus statusCode; + private final HttpStatusCode statusCode; private final int rawStatusCode; private final String statusText; private final HttpHeaders headers; + private final byte[] body; public ReusableClientHttpResponse(ClientHttpResponse response) { try { final InputStream bodyStream = response.getBody(); - if (bodyStream != null) { - body = FileCopyUtils.copyToByteArray(bodyStream); - } + body = FileCopyUtils.copyToByteArray(bodyStream); statusCode = response.getStatusCode(); - rawStatusCode = response.getRawStatusCode(); + rawStatusCode = response.getStatusCode().value(); statusText = response.getStatusText(); headers = response.getHeaders(); } catch (IOException e) { @@ -134,7 +131,7 @@ public ReusableClientHttpResponse(ClientHttpResponse response) { @Override public HttpStatus getStatusCode() { - return statusCode; + return Objects.requireNonNull(HttpStatus.resolve(statusCode.value())); } @Override @@ -154,7 +151,7 @@ public HttpHeaders getHeaders() { @Override public InputStream getBody() { - return body != null ? new ByteArrayInputStream(body) : StreamUtils.emptyInput(); + return body != null ? new ByteArrayInputStream(body) : InputStream.nullInputStream(); } @Override diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/DeprecationWarningRequestInterceptor.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/DeprecationWarningRequestInterceptor.java index 681817069..57a1d13d7 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/DeprecationWarningRequestInterceptor.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/DeprecationWarningRequestInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2018, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/FutureResult.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/FutureResult.java index 45a7af5a5..ca96f7f91 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/FutureResult.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/FutureResult.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodData.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodData.java index ddffd067e..767757343 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodData.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodData.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,7 +7,6 @@ import com.gooddata.sdk.service.account.AccountService; import com.gooddata.sdk.service.auditevent.AuditEventService; -import com.gooddata.sdk.service.hierarchicalconfig.HierarchicalConfigService; import com.gooddata.sdk.service.connector.ConnectorService; import com.gooddata.sdk.service.dataload.OutputStageService; import com.gooddata.sdk.service.dataload.processes.ProcessService; @@ -17,6 +16,7 @@ import com.gooddata.sdk.service.featureflag.FeatureFlagService; import com.gooddata.sdk.service.gdc.DataStoreService; import com.gooddata.sdk.service.gdc.GdcService; +import com.gooddata.sdk.service.hierarchicalconfig.HierarchicalConfigService; import com.gooddata.sdk.service.httpcomponents.LoginPasswordGoodDataRestProvider; import com.gooddata.sdk.service.lcm.LcmService; import com.gooddata.sdk.service.md.MetadataService; @@ -29,8 +29,10 @@ import org.springframework.context.annotation.Bean; import org.springframework.web.client.RestTemplate; -import static com.gooddata.sdk.service.GoodDataEndpoint.*; import static com.gooddata.sdk.common.util.Validate.notNull; +import static com.gooddata.sdk.service.GoodDataEndpoint.HOSTNAME; +import static com.gooddata.sdk.service.GoodDataEndpoint.PORT; +import static com.gooddata.sdk.service.GoodDataEndpoint.PROTOCOL; /** * Entry point for GoodData SDK usage. @@ -144,6 +146,7 @@ public GoodData(String hostname, String login, String password, int port, String /** * Create instance based on given {@link GoodDataRestProvider}. + * * @param goodDataRestProvider configured provider */ protected GoodData(final GoodDataRestProvider goodDataRestProvider) { @@ -321,9 +324,8 @@ public OutputStageService getOutputStageService() { * Get initialized service for project templates * * @return initialized service for project templates - * * @deprecated The project templates are deprecated and stopped working on May 15, 2019. - * See https://support.gooddata.com/hc/en-us/articles/360016126334-April-4-2019 + * See ... * Deprecated since version 3.0.1. Will be removed in one of future versions. */ @Deprecated @@ -334,6 +336,7 @@ public ProjectTemplateService getProjectTemplateService() { /** * Get initialized service for audit events + * * @return initialized service for audit events */ @Bean("goodDataAuditEventService") @@ -343,6 +346,7 @@ public AuditEventService getAuditEventService() { /** * Get initialized service for afm execution + * * @return initialized service for afm execution */ @Bean("goodDataExecuteAfmService") @@ -352,6 +356,7 @@ public ExecuteAfmService getExecuteAfmService() { /** * Get initialized service for Life Cycle Management + * * @return initialized service for Life Cycle Management */ @Bean("goodDataLcmService") @@ -361,6 +366,7 @@ public LcmService getLcmService() { /** * Get initialized service for hierarchical config management + * * @return hierarchical config service */ @Bean("goodDataHierarchicalConfigService") diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataEndpoint.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataEndpoint.java index f861cada7..95694a5b0 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataEndpoint.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataEndpoint.java @@ -1,11 +1,11 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.service; -import org.apache.http.HttpHost; +import org.apache.hc.core5.http.HttpHost; import static com.gooddata.sdk.common.util.Validate.notEmpty; @@ -24,9 +24,10 @@ public class GoodDataEndpoint { /** * Create GoodData endpoint for given hostname, port and protocol - * @param hostname GoodData Platform's host name (e.g. secure.gooddata.com) - * @param port GoodData Platform's API port (e.g. 443) - * @param protocol GoodData Platform's API protocol (e.g. https) + * + * @param hostname GoodData Platform's host name (e.g. secure.gooddata.com) + * @param port GoodData Platform's API port (e.g. 443) + * @param protocol GoodData Platform's API protocol (e.g. https) */ public GoodDataEndpoint(final String hostname, final int port, final String protocol) { this.hostname = notEmpty(hostname, "hostname"); @@ -36,8 +37,9 @@ public GoodDataEndpoint(final String hostname, final int port, final String prot /** * Create GoodData endpoint for given hostname, port using HTTPS protocol - * @param hostname GoodData Platform's host name (e.g. secure.gooddata.com) - * @param port GoodData Platform's API port (e.g. 443) + * + * @param hostname GoodData Platform's host name (e.g. secure.gooddata.com) + * @param port GoodData Platform's API port (e.g. 443) */ public GoodDataEndpoint(String hostname, int port) { this(hostname, port, PROTOCOL); @@ -45,6 +47,7 @@ public GoodDataEndpoint(String hostname, int port) { /** * Create GoodData endpoint for given hostname using 443 port and HTTPS protocol + * * @param hostname GoodData Platform's host name (e.g. secure.gooddata.com) */ public GoodDataEndpoint(String hostname) { @@ -62,7 +65,7 @@ public GoodDataEndpoint() { * @return the host URI, as a string. */ public String toUri() { - return new HttpHost(hostname, port, protocol).toURI(); + return new HttpHost(protocol, hostname, port).toURI(); } /** diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataRestProvider.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataRestProvider.java index 461054a1b..52b61ff45 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataRestProvider.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataRestProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -22,7 +22,7 @@ *

  • applying {@link GoodDataSettings} - especially user agent, headers and connection settings
  • *
  • configuring proper error handler (i.e. {@link com.gooddata.sdk.service.util.ResponseErrorHandler})
  • * - * + *

    * The default implementation (internally used by {@link GoodData} is {@link com.gooddata.sdk.service.httpcomponents.LoginPasswordGoodDataRestProvider}. */ public interface GoodDataRestProvider { diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataServices.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataServices.java index d9afb3ca0..462a7a8f1 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataServices.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataServices.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,7 +7,6 @@ import com.gooddata.sdk.service.account.AccountService; import com.gooddata.sdk.service.auditevent.AuditEventService; -import com.gooddata.sdk.service.hierarchicalconfig.HierarchicalConfigService; import com.gooddata.sdk.service.connector.ConnectorService; import com.gooddata.sdk.service.dataload.OutputStageService; import com.gooddata.sdk.service.dataload.processes.ProcessService; @@ -17,6 +16,7 @@ import com.gooddata.sdk.service.featureflag.FeatureFlagService; import com.gooddata.sdk.service.gdc.DataStoreService; import com.gooddata.sdk.service.gdc.GdcService; +import com.gooddata.sdk.service.hierarchicalconfig.HierarchicalConfigService; import com.gooddata.sdk.service.lcm.LcmService; import com.gooddata.sdk.service.md.MetadataService; import com.gooddata.sdk.service.md.maintenance.ExportImportService; diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataSettings.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataSettings.java index c88fa36ad..ddae3d5b7 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataSettings.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/GoodDataSettings.java @@ -1,16 +1,16 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.service; import com.gooddata.sdk.common.gdc.Header; -import com.gooddata.sdk.service.retry.RetrySettings; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.service.retry.RetrySettings; import org.apache.commons.lang3.StringUtils; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.util.VersionInfo; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.core5.util.VersionInfo; import org.springframework.http.MediaType; import org.springframework.util.StreamUtils; @@ -22,18 +22,20 @@ import java.util.concurrent.TimeUnit; import static com.gooddata.sdk.common.util.Validate.notNull; -import static org.apache.http.util.VersionInfo.loadVersionInfo; +import static org.apache.hc.core5.util.VersionInfo.loadVersionInfo; import static org.springframework.util.Assert.isTrue; /** * Gather various additional settings of {@link GoodData}. Can be passed to the {@link GoodData} constructor to tune up - * it's behaviour. + * its behaviour. *

    * Settings are applied only once at the beginning. Changing this bean after it's passed to {@link GoodData} has * no effect. */ public class GoodDataSettings { + private static final String UNKNOWN_VERSION = "UNKNOWN"; + private final Map presetHeaders = new HashMap<>(2); private int maxConnections = 20; private int connectionTimeout = secondsToMillis(10); private int connectionRequestTimeout = secondsToMillis(10); @@ -41,26 +43,22 @@ public class GoodDataSettings { private int pollSleep = secondsToMillis(5); private String userAgent; private RetrySettings retrySettings; - private Map presetHeaders = new HashMap<>(2); - - private static final String UNKNOWN_VERSION = "UNKNOWN"; public GoodDataSettings() { presetHeaders.put("Accept", MediaType.APPLICATION_JSON_VALUE); presetHeaders.put(Header.GDC_VERSION, readApiVersion()); } - /** - * Set maximum number of connections used. This applies same for connections per host as for total connections. - * (As we assume GoodData connects to single host). - *

    - * The default value is 20. - * - * @param maxConnections maximum number of connections used. - */ - public void setMaxConnections(int maxConnections) { - isTrue(maxConnections > 0, "maxConnections must be greater than zero"); - this.maxConnections = maxConnections; + private static int secondsToMillis(int seconds) { + return (int) TimeUnit.SECONDS.toMillis(seconds); + } + + private static String readApiVersion() { + try { + return StreamUtils.copyToString(GoodData.class.getResourceAsStream("/GoodDataApiVersion"), Charset.defaultCharset()); + } catch (IOException e) { + throw new IllegalStateException("Cannot read GoodDataApiVersion from classpath", e); + } } /** @@ -73,17 +71,16 @@ public int getMaxConnections() { } /** - * Set timeout milliseconds until connection established. - *

    - * The default value is 10 seconds (10000 ms). + * Set maximum number of connections used. This applies same for connections per host as for total connections. + * (As we assume GoodData connects to single host). *

    - * Set to 0 for infinite. + * The default value is 20. * - * @param connectionTimeout connection timeout milliseconds + * @param maxConnections maximum number of connections used. */ - public void setConnectionTimeout(int connectionTimeout) { - isTrue(connectionTimeout >= 0, "connectionTimeout must be not negative"); - this.connectionTimeout = connectionTimeout; + public void setMaxConnections(int maxConnections) { + isTrue(maxConnections > 0, "maxConnections must be greater than zero"); + this.maxConnections = maxConnections; } /** @@ -109,17 +106,17 @@ public int getConnectionTimeout() { } /** - * Set timeout in milliseconds used when requesting a connection from the connection manager. + * Set timeout milliseconds until connection established. *

    * The default value is 10 seconds (10000 ms). *

    * Set to 0 for infinite. * - * @param connectionRequestTimeout connection request timeout milliseconds + * @param connectionTimeout connection timeout milliseconds */ - public void setConnectionRequestTimeout(final int connectionRequestTimeout) { - isTrue(connectionRequestTimeout >= 0, "connectionRequestTimeout must not be negative"); - this.connectionRequestTimeout = connectionRequestTimeout; + public void setConnectionTimeout(int connectionTimeout) { + isTrue(connectionTimeout >= 0, "connectionTimeout must be not negative"); + this.connectionTimeout = connectionTimeout; } /** @@ -146,17 +143,17 @@ public int getConnectionRequestTimeout() { } /** - * Set socket timeout (maximum period inactivity between two consecutive data packets) milliseconds. + * Set timeout in milliseconds used when requesting a connection from the connection manager. *

    - * The default value is 60 seconds (60000 ms). + * The default value is 10 seconds (10000 ms). *

    * Set to 0 for infinite. * - * @param socketTimeout socket timeout milliseconds + * @param connectionRequestTimeout connection request timeout milliseconds */ - public void setSocketTimeout(int socketTimeout) { - isTrue(socketTimeout >= 0, "socketTimeout must be not negative"); - this.socketTimeout = socketTimeout; + public void setConnectionRequestTimeout(final int connectionRequestTimeout) { + isTrue(connectionRequestTimeout >= 0, "connectionRequestTimeout must not be negative"); + this.connectionRequestTimeout = connectionRequestTimeout; } /** @@ -181,6 +178,20 @@ public int getSocketTimeout() { return socketTimeout; } + /** + * Set socket timeout (maximum period inactivity between two consecutive data packets) milliseconds. + *

    + * The default value is 60 seconds (60000 ms). + *

    + * Set to 0 for infinite. + * + * @param socketTimeout socket timeout milliseconds + */ + public void setSocketTimeout(int socketTimeout) { + isTrue(socketTimeout >= 0, "socketTimeout must be not negative"); + this.socketTimeout = socketTimeout; + } + /** * Get sleep time in milliseconds between poll retries * @@ -213,6 +224,7 @@ public void setPollSleepSeconds(final int pollSleep) { /** * GoodData User agent + * * @return user agent string formatted with default suffix (identifying the SDK) */ public String getGoodDataUserAgent() { @@ -221,6 +233,7 @@ public String getGoodDataUserAgent() { /** * User agent + * * @return user agent string */ public String getUserAgent() { @@ -229,6 +242,7 @@ public String getUserAgent() { /** * Set custom user agent as prefix for default user agent + * * @param userAgent user agent string */ public void setUserAgent(String userAgent) { @@ -241,6 +255,7 @@ public RetrySettings getRetrySettings() { /** * Set retry settings + * * @param retrySettings retry settings */ public void setRetrySettings(RetrySettings retrySettings) { @@ -249,8 +264,9 @@ public void setRetrySettings(RetrySettings retrySettings) { /** * Set preset header + * * @param header header name - * @param value header value + * @param value header value */ public void setPresetHeader(String header, String value) { presetHeaders.put(notNull(header, "header"), notNull(value, "value")); @@ -258,6 +274,7 @@ public void setPresetHeader(String header, String value) { /** * Preset headers + * * @return preset headers set by SDK on each HTTP call */ public Map getPresetHeaders() { @@ -290,31 +307,16 @@ public String toString() { return GoodDataToStringBuilder.defaultToString(this); } - private static int secondsToMillis(int seconds) { - return (int) TimeUnit.SECONDS.toMillis(seconds); - } - private String getDefaultUserAgent() { final Package pkg = Package.getPackage("com.gooddata.sdk.service"); final String clientVersion = pkg != null && pkg.getImplementationVersion() != null ? pkg.getImplementationVersion() : UNKNOWN_VERSION; - final VersionInfo vi = loadVersionInfo("org.apache.http.client", HttpClientBuilder.class.getClassLoader()); + final VersionInfo vi = loadVersionInfo("org.apache.hc.client5", HttpClientBuilder.class.getClassLoader()); final String apacheVersion = vi != null ? vi.getRelease() : UNKNOWN_VERSION; return String.format("%s/%s (%s; %s) %s/%s", "GoodData-Java-SDK", clientVersion, System.getProperty("os.name"), System.getProperty("java.specification.version"), "Apache-HttpClient", apacheVersion); } - - private static String readApiVersion() { - try { - return StreamUtils.copyToString(GoodData.class.getResourceAsStream("/GoodDataApiVersion"), Charset.defaultCharset()); - } catch (IOException e) { - throw new IllegalStateException("Cannot read GoodDataApiVersion from classpath", e); - } - } - - - } diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/HeaderSettingRequestInterceptor.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/HeaderSettingRequestInterceptor.java index 05c042aa7..e63e73836 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/HeaderSettingRequestInterceptor.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/HeaderSettingRequestInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/PollHandler.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/PollHandler.java index 0a26a0ac3..f011d13a1 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/PollHandler.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/PollHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -13,12 +13,12 @@ /** * For internal use by services employing polling.

    + * * @param

    polling type * @param result type - * * @see FutureResult */ -public interface PollHandler { +public interface PollHandler { /** * Get URI used for polling. @@ -84,6 +84,7 @@ default URI getPolling() { * Handle exception while polling. * The implementing class should throw instance of {@link com.gooddata.sdk.common.GoodDataException} * (or ancestor) with the given argument as cause. + * * @param e the exception */ void handlePollException(GoodDataRestException e); diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/PollResult.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/PollResult.java index 05073be4c..1cfed0f95 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/PollResult.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/PollResult.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -16,7 +16,7 @@ public final class PollResult implements FutureResult { private final AbstractService service; - private final PollHandler handler; + private final PollHandler handler; /** * Creates a new instance of the result to be eventually retrieved by polling on the REST API.

    diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/RequestIdInterceptor.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/RequestIdInterceptor.java new file mode 100644 index 000000000..c799438ba --- /dev/null +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/RequestIdInterceptor.java @@ -0,0 +1,40 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.service; + +import org.apache.commons.lang3.RandomStringUtils; +import org.apache.hc.core5.annotation.Contract; +import org.apache.hc.core5.annotation.ThreadingBehavior; +import org.apache.hc.core5.http.EntityDetails; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpException; +import org.apache.hc.core5.http.HttpRequest; +import org.apache.hc.core5.http.HttpRequestInterceptor; +import org.apache.hc.core5.http.protocol.HttpContext; + +import java.io.IOException; + +import static com.gooddata.sdk.common.gdc.Header.GDC_REQUEST_ID; + +/** + * Intercepts the client-side requests on low-level in order to be able to catch requests also from the Sardine, + * that is working independently of Spring {@link org.springframework.web.client.RestTemplate} to set + * the X-GDC-REQUEST header to them. + */ +@Contract(threading = ThreadingBehavior.IMMUTABLE) +public class RequestIdInterceptor implements HttpRequestInterceptor { + + @Override + public void process(final HttpRequest request, final EntityDetails entityDetails, final HttpContext context) throws HttpException, IOException { + final StringBuilder requestIdBuilder = new StringBuilder(); + final Header requestIdHeader = request.getFirstHeader(GDC_REQUEST_ID); + if (requestIdHeader != null) { + requestIdBuilder.append(requestIdHeader.getValue()).append(":"); + } + final String requestId = requestIdBuilder.append(RandomStringUtils.secure().nextAlphanumeric(16)).toString(); + request.setHeader(GDC_REQUEST_ID, requestId); + } +} diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/ResponseMissingRequestIdInterceptor.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/ResponseMissingRequestIdInterceptor.java new file mode 100644 index 000000000..504fa1470 --- /dev/null +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/ResponseMissingRequestIdInterceptor.java @@ -0,0 +1,38 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.service; + +import org.apache.hc.core5.annotation.Contract; +import org.apache.hc.core5.annotation.ThreadingBehavior; +import org.apache.hc.core5.http.EntityDetails; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpException; +import org.apache.hc.core5.http.HttpResponse; +import org.apache.hc.core5.http.HttpResponseInterceptor; +import org.apache.hc.core5.http.protocol.HttpContext; +import org.apache.hc.core5.http.protocol.HttpCoreContext; + +import java.io.IOException; + +import static com.gooddata.sdk.common.gdc.Header.GDC_REQUEST_ID; + +/** + * Intercepts responses to check if they have set the X-GDC-REQUEST header for easier debugging. + * If not, it takes this header from the request sent. + */ +@Contract(threading = ThreadingBehavior.IMMUTABLE) +public class ResponseMissingRequestIdInterceptor implements HttpResponseInterceptor { + + @Override + public void process(final HttpResponse response, final EntityDetails entityDetails, final HttpContext context) throws HttpException, IOException { + + if (response.getFirstHeader(GDC_REQUEST_ID) == null) { + final HttpCoreContext coreContext = HttpCoreContext.cast(context); + final Header requestIdHeader = coreContext.getRequest().getFirstHeader(GDC_REQUEST_ID); + response.setHeader(GDC_REQUEST_ID, requestIdHeader.getValue()); + } + } +} diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/SimplePollHandler.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/SimplePollHandler.java index 29d014c24..9f6a08fe2 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/SimplePollHandler.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/SimplePollHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,7 +10,6 @@ * A simple poll handler using same type for polling and result. * * @param polling and result type - * * @see FutureResult */ public abstract class SimplePollHandler extends AbstractPollHandler { diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/account/AccountNotFoundException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/account/AccountNotFoundException.java index 4bb1dfb7b..6caffedfc 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/account/AccountNotFoundException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/account/AccountNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -20,6 +20,12 @@ public AccountNotFoundException(String uri, GoodDataRestException cause) { this.accountUri = uri; } + public AccountNotFoundException(final String message, + final String accountUri) { + super(message + " failed on " + accountUri); + this.accountUri = accountUri; + } + public String getAccountUri() { return accountUri; } diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/account/AccountService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/account/AccountService.java index 9506381b6..ab8a148a9 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/account/AccountService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/account/AccountService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,10 +8,13 @@ import com.gooddata.sdk.common.GoodDataException; import com.gooddata.sdk.common.GoodDataRestException; import com.gooddata.sdk.model.account.Account; +import com.gooddata.sdk.model.account.Accounts; import com.gooddata.sdk.model.account.SeparatorSettings; import com.gooddata.sdk.model.gdc.UriResponse; import com.gooddata.sdk.service.AbstractService; import com.gooddata.sdk.service.GoodDataSettings; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.http.converter.json.MappingJacksonValue; import org.springframework.web.client.RestClientException; @@ -27,15 +30,19 @@ */ public class AccountService extends AbstractService { + private static final Logger logger = LoggerFactory.getLogger(AccountService.class); + public static final UriTemplate ACCOUNT_TEMPLATE = new UriTemplate(Account.URI); public static final UriTemplate ACCOUNTS_TEMPLATE = new UriTemplate(Account.ACCOUNTS_URI); + public static final UriTemplate ACCOUNT_BY_LOGIN_TEMPLATE = new UriTemplate(Account.ACCOUNT_BY_EMAIL_URI); public static final UriTemplate LOGIN_TEMPLATE = new UriTemplate(Account.LOGIN_URI); public static final UriTemplate SEPARATORS_TEMPLATE = new UriTemplate(SeparatorSettings.URI); /** * Constructs service for GoodData account management. + * * @param restTemplate RESTful HTTP Spring template - * @param settings settings + * @param settings settings */ public AccountService(final RestTemplate restTemplate, final GoodDataSettings settings) { super(restTemplate, settings); @@ -60,15 +67,52 @@ public void logout() { try { final String id = getCurrent().getId(); restTemplate.delete(Account.LOGIN_URI, id); + } catch (GoodDataRestException e) { + if (isAlreadyLoggedOutError(e)) { + logger.debug("User already logged out (status={}, errorCode={}, message={})", + e.getStatusCode(), e.getErrorCode(), e.getMessage()); + return; + } + throw new GoodDataException("Unable to logout", e); } catch (GoodDataException | RestClientException e) { throw new GoodDataException("Unable to logout", e); } } + /** + * Checks if the exception indicates the user is already logged out. + * This is not an error condition - it means the logout goal is already achieved. + */ + private static boolean isAlreadyLoggedOutError(final GoodDataRestException e) { + // HTTP 400 indicates a client error, which includes "not logged in" + if (e.getStatusCode() != HttpStatus.BAD_REQUEST.value()) { + return false; + } + + // Prefer error code matching (API contract) over message content (locale-sensitive) + final String errorCode = e.getErrorCode(); + if (errorCode != null && !errorCode.isEmpty()) { + // Match known error codes for "not logged in" state + // Common patterns: gdc.login.not_logged_in, NOT_LOGGED_IN, etc. + final String lowerErrorCode = errorCode.toLowerCase(); + return lowerErrorCode.contains("not_logged") || lowerErrorCode.contains("notlogged"); + } + + // Fallback to message matching if error code is not available + final String message = e.getMessage(); + if (message != null) { + final String lowerMessage = message.toLowerCase(); + return lowerMessage.contains("not logged in") || lowerMessage.contains("not logged-in"); + } + + return false; + } + /** * Creates new account in given organization (domain). * Only domain admin is allowed create new accounts! This means rest request has to authorized as domain admin. - * @param account to create + * + * @param account to create * @param organizationName (domain) in which account should be created * @return new account * @throws GoodDataException when account can't be created @@ -87,9 +131,10 @@ public Account createAccount(Account account, String organizationName) { /** * Delete given account + * * @param account to remove * @throws AccountNotFoundException when given account wasn't found - * @throws GoodDataException when account can't be removed for other reason + * @throws GoodDataException when account can't be removed for other reason */ public void removeAccount(final Account account) { notNull(account, "account"); @@ -110,10 +155,11 @@ public void removeAccount(final Account account) { /** * Get account for given account id + * * @param id to search for * @return account for id * @throws AccountNotFoundException when account for given id can't be found - * @throws GoodDataException when different error occurs + * @throws GoodDataException when different error occurs */ public Account getAccountById(final String id) { notNull(id, "id"); @@ -130,12 +176,39 @@ public Account getAccountById(final String id) { } } + /** + * Get account by given login. + * Only domain admin is allowed to search users by login. + * + * @param email used as login + * @param organizationName (domain) in which account is present + * @return account found by given login + * @throws AccountNotFoundException when given account wasn't found + * @throws GoodDataException when different error occurs + */ + public Account getAccountByLogin(final String email, final String organizationName) { + notNull(email, "email"); + notNull(organizationName, "organizationName"); + try { + final Accounts accounts = restTemplate.getForObject( + Account.ACCOUNT_BY_EMAIL_URI, Accounts.class, organizationName, email); + if (accounts != null && !accounts.getPageItems().isEmpty()) { + return accounts.getPageItems().get(0); + } + throw new AccountNotFoundException("User was not found by email " + + email + " in organization " + organizationName, Account.ACCOUNT_BY_EMAIL_URI); + } catch (RestClientException e) { + throw new GoodDataException("Unable to get account", e); + } + } + /** * Get account for given account id + * * @param uri to search for * @return account for uri * @throws AccountNotFoundException when account for given uri can't be found - * @throws GoodDataException when different error occurs + * @throws GoodDataException when different error occurs */ public Account getAccountByUri(final String uri) { notEmpty(uri, "uri"); @@ -144,6 +217,7 @@ public Account getAccountByUri(final String uri) { /** * Updates account + * * @param account to be updated * @throws AccountNotFoundException when account for given uri can't be found */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventPageRequest.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventPageRequest.java index 1e5d3e26e..e74419728 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventPageRequest.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventPageRequest.java @@ -1,55 +1,41 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.service.auditevent; -import com.gooddata.sdk.common.collections.CustomPageRequest; import com.gooddata.sdk.common.util.GoodDataToStringBuilder; -import com.gooddata.sdk.common.util.ISOZonedDateTime; import com.gooddata.sdk.common.util.MutableUri; import org.springframework.beans.BeanUtils; -import java.time.ZonedDateTime; +import java.util.Objects; -import static java.time.ZoneOffset.UTC; import static org.apache.commons.lang3.Validate.notNull; /** * Class to encapsulate time filtering and paging parameters */ -public final class AuditEventPageRequest extends CustomPageRequest { - - private ZonedDateTime from; - - private ZonedDateTime to; +public final class AuditEventPageRequest extends TimeFilterPageRequest { private String type; public AuditEventPageRequest() { } - public ZonedDateTime getFrom() { - return from; - } - /** - * Specify lower bound of interval + * Copy constructor + * + * @param source source object (not null) to create copy of + * @return new instance, which fields has same value as fields of source */ - public void setFrom(final ZonedDateTime from) { - this.from = from; - } + public static AuditEventPageRequest copy(final AuditEventPageRequest source) { + notNull(source, "source cannot be null"); - public ZonedDateTime getTo() { - return to; - } + final AuditEventPageRequest copy = new AuditEventPageRequest(); + BeanUtils.copyProperties(source, copy); - /** - * Specify upper bound of interval - */ - public void setTo(final ZonedDateTime to) { - this.to = to; + return copy; } public String getType() { @@ -65,24 +51,9 @@ public void setType(final String type) { this.type = type; } - /** - * Copy constructor - * - * @param source source object (not null) to create copy of - * @return new instance, which fields has same value as fields of source - */ - public static AuditEventPageRequest copy(final AuditEventPageRequest source) { - notNull(source, "source cannot be null"); - - final AuditEventPageRequest copy = new AuditEventPageRequest(); - BeanUtils.copyProperties(source, copy); - - return copy; - } - /** * Copy this request parameters and increment request parameter limit. - * If Limit is negative, than sanitized limit is taken and incremented. + * If Limit is negative, then sanitized limit is taken and incremented. * * @return new instance with incremented limit */ @@ -95,12 +66,7 @@ public AuditEventPageRequest withIncrementedLimit() { @Override public MutableUri updateWithPageParams(final MutableUri builder) { MutableUri builderWithPaging = super.updateWithPageParams(builder); - if (from != null) { - builderWithPaging.replaceQueryParam("from", ISOZonedDateTime.FORMATTER.format(from.withZoneSameInstant(UTC))); - } - if (to != null) { - builderWithPaging.replaceQueryParam("to", ISOZonedDateTime.FORMATTER.format(to.withZoneSameInstant(UTC))); - } + if (type != null) { builderWithPaging.replaceQueryParam("type", type); } @@ -116,15 +82,14 @@ protected boolean canEqual(final Object o) { @Override public boolean equals(final Object o) { if (this == o) return true; - if (!(o instanceof AuditEventPageRequest)) return false; + if (!(o instanceof AuditEventPageRequest that)) return false; if (!super.equals(o)) return false; - final AuditEventPageRequest that = (AuditEventPageRequest) o; if (!that.canEqual(this)) return false; - if (from != null ? !from.equals(that.from) : that.from != null) return false; - if (to != null ? !to.equals(that.to) : that.to != null) return false; - return type != null ? type.equals(that.type) : that.type == null; + if (!Objects.equals(from, that.from)) return false; + if (!Objects.equals(to, that.to)) return false; + return Objects.equals(type, that.type); } @Override diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventService.java index 664b552f6..7d19d9613 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -36,9 +36,10 @@ public class AuditEventService extends AbstractService { /** * Service for audit events - * @param restTemplate rest template + * + * @param restTemplate rest template * @param accountService account service - * @param settings settings + * @param settings settings */ public AuditEventService(final RestTemplate restTemplate, final AccountService accountService, final GoodDataSettings settings) { super(restTemplate, settings); @@ -47,6 +48,7 @@ public AuditEventService(final RestTemplate restTemplate, final AccountService a /** * Get list of audit events for the given domain id + * * @param domainId domain id * @return non-null paged list of events * @throws AuditEventsForbiddenException if current user is not admin of the given domain @@ -57,8 +59,9 @@ public PageBrowser listAuditEvents(final String domainId) { /** * Get list of audit events for the given domain id + * * @param domainId domain id - * @param page request parameters + * @param page request parameters * @return non-null paged list of events * @throws AuditEventsForbiddenException if current user is not admin of the given domain */ @@ -72,10 +75,11 @@ public PageBrowser listAuditEvents(final String domainId, final Page /** * Get list of audit events for the given account + * * @param account account with valid id * @return non-null paged list of events * @throws AuditEventsForbiddenException if audit events are not enabled for the given user or the current user is - * not domain admin + * not domain admin */ public PageBrowser listAuditEvents(final Account account) { return listAuditEvents(account, new AuditEventPageRequest()); @@ -83,11 +87,12 @@ public PageBrowser listAuditEvents(final Account account) { /** * Get list of audit events for the given account + * * @param account account with valid id - * @param page request parameters + * @param page request parameters * @return non-null paged list of events * @throws AuditEventsForbiddenException if audit events are not enabled for the given user or the current user is - * not domain admin + * not domain admin */ public PageBrowser listAuditEvents(final Account account, final PageRequest page) { notNull(account, "account"); @@ -101,6 +106,7 @@ public PageBrowser listAuditEvents(final Account account, final Page /** * Get list of audit events for current account + * * @return non-null paged list of events * @throws AuditEventsForbiddenException if audit events are not enabled for current user */ @@ -110,6 +116,7 @@ public PageBrowser listAuditEvents() { /** * Get list of audit events for current account + * * @param page request parameters * @return non-null paged list of events * @throws AuditEventsForbiddenException if audit events are not enabled for current user diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventsForbiddenException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventsForbiddenException.java index 163f61cb3..d89996be7 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventsForbiddenException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/AuditEventsForbiddenException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/TimeFilterPageRequest.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/TimeFilterPageRequest.java new file mode 100644 index 000000000..fd4d8f9dd --- /dev/null +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/auditevent/TimeFilterPageRequest.java @@ -0,0 +1,103 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.service.auditevent; + +import com.gooddata.sdk.common.collections.CustomPageRequest; +import com.gooddata.sdk.common.util.GoodDataToStringBuilder; +import com.gooddata.sdk.common.util.ISOZonedDateTime; +import com.gooddata.sdk.common.util.MutableUri; +import com.gooddata.sdk.common.util.Validate; +import org.springframework.beans.BeanUtils; + +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.util.Objects; + +/** + * Class to encapsulate time filtering + */ +public class TimeFilterPageRequest extends CustomPageRequest { + protected ZonedDateTime from; + protected ZonedDateTime to; + + public TimeFilterPageRequest() { + } + + public static TimeFilterPageRequest copy(TimeFilterPageRequest source) { + Validate.notNull(source, "source cannot be null"); + TimeFilterPageRequest copy = new TimeFilterPageRequest(); + BeanUtils.copyProperties(source, copy); + return copy; + } + + public ZonedDateTime getFrom() { + return this.from; + } + + public void setFrom(ZonedDateTime from) { + this.from = from; + } + + public ZonedDateTime getTo() { + return this.to; + } + + public void setTo(ZonedDateTime to) { + this.to = to; + } + + public TimeFilterPageRequest withIncrementedLimit() { + TimeFilterPageRequest copy = copy(this); + copy.setLimit(this.getSanitizedLimit() + 1); + return copy; + } + + @Override + public MutableUri updateWithPageParams(MutableUri builder) { + MutableUri builderWithPaging = super.updateWithPageParams(builder); + if (this.from != null) { + builderWithPaging.replaceQueryParam("from", ISOZonedDateTime.FORMATTER.format(this.from.withZoneSameInstant(ZoneOffset.UTC))); + } + + if (this.to != null) { + builderWithPaging.replaceQueryParam("to", ISOZonedDateTime.FORMATTER.format(this.to.withZoneSameInstant(ZoneOffset.UTC))); + } + + return builderWithPaging; + } + + @Override + protected boolean canEqual(Object o) { + return o instanceof TimeFilterPageRequest; + } + + @Override + public boolean equals(final Object o) { + if (this == o) return true; + if (!(o instanceof TimeFilterPageRequest that)) return false; + if (!super.equals(o)) return false; + + if (!that.canEqual(this)) return false; + + if (!Objects.equals(from, that.from)) return false; + return Objects.equals(to, that.to); + } + + @Override + public int hashCode() { + int result = super.hashCode(); + result = 31 * result + (this.from != null ? this.from.hashCode() : 0); + result = 31 * result + (this.to != null ? this.to.hashCode() : 0); + return result; + } + + @Override + public String toString() { + return GoodDataToStringBuilder.defaultToString(this, new String[0]); + } + +} + diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/ConnectorException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/ConnectorException.java index e53043a2b..846efda7f 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/ConnectorException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/ConnectorException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/ConnectorService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/ConnectorService.java index cc1f80a84..fe4757f46 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/ConnectorService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/ConnectorService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,11 +7,22 @@ import com.gooddata.sdk.common.GoodDataException; import com.gooddata.sdk.common.GoodDataRestException; -import com.gooddata.sdk.model.connector.*; +import com.gooddata.sdk.model.connector.ConnectorType; +import com.gooddata.sdk.model.connector.Integration; +import com.gooddata.sdk.model.connector.IntegrationProcessStatus; +import com.gooddata.sdk.model.connector.ProcessExecution; +import com.gooddata.sdk.model.connector.ProcessStatus; +import com.gooddata.sdk.model.connector.Reload; +import com.gooddata.sdk.model.connector.Settings; +import com.gooddata.sdk.model.connector.Zendesk4Settings; import com.gooddata.sdk.model.gdc.UriResponse; import com.gooddata.sdk.model.project.Project; import com.gooddata.sdk.model.project.ProjectTemplate; -import com.gooddata.sdk.service.*; +import com.gooddata.sdk.service.AbstractService; +import com.gooddata.sdk.service.FutureResult; +import com.gooddata.sdk.service.GoodDataSettings; +import com.gooddata.sdk.service.PollResult; +import com.gooddata.sdk.service.SimplePollHandler; import com.gooddata.sdk.service.project.ProjectService; import org.springframework.http.HttpStatus; import org.springframework.http.client.ClientHttpResponse; @@ -22,8 +33,8 @@ import java.io.IOException; import java.util.Collection; import java.util.Map; +import java.util.Optional; -import static com.gooddata.sdk.common.util.Validate.isTrue; import static com.gooddata.sdk.common.util.Validate.notNull; import static com.gooddata.sdk.common.util.Validate.notNullState; import static java.lang.String.format; @@ -46,7 +57,7 @@ public ConnectorService(final RestTemplate restTemplate, final ProjectService pr * * @param project project * @param connectorType connector type - * @return integration + * @return integration * @throws ConnectorException if integration can't be retrieved */ public Integration getIntegration(final Project project, final ConnectorType connectorType) { @@ -155,7 +166,7 @@ public void deleteIntegration(final Project project, final ConnectorType connect notNull(project, "project"); notNull(project.getId(), "project.id"); notNull(connectorType, "connector"); - + try { restTemplate.delete(Integration.URL, project.getId(), connectorType.getName()); } catch (GoodDataRestException e) { @@ -171,6 +182,7 @@ public void deleteIntegration(final Project project, final ConnectorType connect /** * Get settings for zendesk4 connector. + * * @param project project * @return settings for zendesk4 connector */ @@ -181,10 +193,10 @@ public Zendesk4Settings getZendesk4Settings(Project project) { /** * Get settings for given connector of given class. * - * @param project project + * @param project project * @param connectorType type of connector to fetch settings ofr * @param settingsClass class of settings fetched - * @param type of fetched settings + * @param type of fetched settings * @return settings of connector */ public T getSettings(final Project project, final ConnectorType connectorType, @@ -263,21 +275,26 @@ public FutureResult getProcessStatus(final IntegrationProcessStat /** * Get Zendesk reload. - * + *

    * You should use the result of {@link #scheduleZendesk4Reload} to see changes in {@link Reload#getStatus()} and * {@link Reload#getProcessId()} or retrieve process URI {@link Reload#getProcessUri()}. * - * @param reload existing reload. + * @param reload existing reload (self link must be present). * @return same reload with refreshed properties (status, processId, process URI) */ public Reload getZendesk4Reload(final Reload reload) { notNull(reload, "reload"); - isTrue(reload.getUri().isPresent(), "reload.uri"); - return getZendesk4ReloadByUri(reload.getUri().get()); + final Optional reloadUri = reload.getUri(); + if (reloadUri.isPresent()) { + return getZendesk4ReloadByUri(reloadUri.get()); + } else { + throw new IllegalArgumentException("Self link in the Reload must be present!"); + } } /** * Get Zendesk reload. + * * @param reloadUri existing reload URI * @return reload */ @@ -292,8 +309,9 @@ public Reload getZendesk4ReloadByUri(final String reloadUri) { /** * Scheduler new reload. + * * @param project project to reload - * @param reload reload parameters + * @param reload reload parameters * @return created reload */ public Reload scheduleZendesk4Reload(final Project project, final Reload reload) { diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/IntegrationNotFoundException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/IntegrationNotFoundException.java index 6d2b67ea6..a41824780 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/IntegrationNotFoundException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/connector/IntegrationNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/OutputStageService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/OutputStageService.java index b2a6d3244..5982f9c41 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/OutputStageService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/OutputStageService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -19,7 +19,9 @@ import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriTemplate; -import static com.gooddata.sdk.common.util.Validate.*; +import static com.gooddata.sdk.common.util.Validate.isTrue; +import static com.gooddata.sdk.common.util.Validate.notEmpty; +import static com.gooddata.sdk.common.util.Validate.notNull; /** * Service to manage output stage. @@ -31,8 +33,9 @@ public class OutputStageService extends AbstractService { /** * Sets RESTful HTTP Spring template. Should be called from constructor of concrete service extending * this abstract one. + * * @param restTemplate RESTful HTTP Spring template - * @param settings settings + * @param settings settings */ public OutputStageService(final RestTemplate restTemplate, final GoodDataSettings settings) { super(restTemplate, settings); @@ -40,6 +43,7 @@ public OutputStageService(final RestTemplate restTemplate, final GoodDataSetting /** * Get output stage by given URI. + * * @param uri output stage uri * @return output stage object * @throws ProcessNotFoundException when the process doesn't exist @@ -56,6 +60,7 @@ public OutputStage getOutputStageByUri(final String uri) { /** * Get output stage by given project. + * * @param project project to which the process belongs * @return output stage * @throws ProcessNotFoundException when the process doesn't exist diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessExecutionException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessExecutionException.java index c6fee4e3b..e884957ba 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessExecutionException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessExecutionException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessNotFoundException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessNotFoundException.java index 4b8c3ff76..33a0589b7 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessNotFoundException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessService.java index 31ff9ef2e..cd8e06d09 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ProcessService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -54,6 +54,7 @@ import java.net.URI; import java.nio.file.Files; import java.util.Collection; +import java.util.Objects; import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; @@ -72,7 +73,7 @@ public class ProcessService extends AbstractService { public static final UriTemplate PROCESSES_TEMPLATE = new UriTemplate(DataloadProcesses.URI); public static final UriTemplate USER_PROCESSES_TEMPLATE = new UriTemplate(DataloadProcesses.USER_PROCESSES_URI); private static final MediaType MEDIA_TYPE_ZIP = MediaType.parseMediaType("application/zip"); - private static final long MAX_MULTIPART_SIZE = 1024 * 1024; + private static final long MAX_MULTIPART_SIZE = 1024L * 1024L; private final AccountService accountService; private final DataStoreService dataStoreService; @@ -82,10 +83,11 @@ public class ProcessService extends AbstractService { /** * Sets RESTful HTTP Spring template. Should be called from constructor of concrete service extending * this abstract one. - * @param restTemplate RESTful HTTP Spring template - * @param accountService service to access accounts + * + * @param restTemplate RESTful HTTP Spring template + * @param accountService service to access accounts * @param dataStoreService service for upload process data - * @param settings settings + * @param settings settings */ public ProcessService(final RestTemplate restTemplate, final AccountService accountService, final DataStoreService dataStoreService, final GoodDataSettings settings) { @@ -94,12 +96,42 @@ public ProcessService(final RestTemplate restTemplate, final AccountService acco this.accountService = notNull(accountService, "accountService"); } + private static URI getScheduleUri(Project project, String id) { + notNull(project, "project"); + notNull(project.getId(), "project.id"); + notEmpty(id, "id"); + + return SCHEDULE_TEMPLATE.expand(project.getId(), id); + } + + private static URI getSchedulesUri(final Project project) { + notNull(project, "project"); + notNull(project.getId(), "project.id"); + return SCHEDULES_TEMPLATE.expand(project.getId()); + } + + private static URI getSchedulesUri(final Project project, final PageRequest page) { + return page.getPageUri(new SpringMutableUri(getSchedulesUri(project))); + } + + private static URI getProcessUri(Project project, String id) { + notNull(project, "project"); + notNull(project.getId(), "project.id"); + notEmpty(id, "id"); + + return PROCESS_TEMPLATE.expand(project.getId(), id); + } + + private static URI getProcessesUri(Project project) { + return PROCESSES_TEMPLATE.expand(project.getId()); + } + /** * Create new process with given data by given project. * Process must have null path to prevent clashes with deploying from appstore. * - * @param project project to which the process belongs - * @param process to create + * @param project project to which the process belongs + * @param process to create * @param processData process data to upload * @return created process */ @@ -147,7 +179,7 @@ public FutureResult createProcessFromAppstore(Project project, * Update process with given data by given project. * Process must have null path to prevent clashes with deploying from appstore. * - * @param process to create + * @param process to create * @param processData process data to upload * @return updated process */ @@ -176,6 +208,7 @@ public FutureResult updateProcessFromAppstore(DataloadProcess p /** * Get process by given URI. + * * @param uri process uri * @return found process * @throws ProcessNotFoundException when the process doesn't exist @@ -197,8 +230,9 @@ public DataloadProcess getProcessByUri(String uri) { /** * Get process by given id and project. + * * @param project project to which the process belongs - * @param id process id + * @param id process id * @return found process * @throws ProcessNotFoundException when the process doesn't exist */ @@ -210,6 +244,7 @@ public DataloadProcess getProcessById(Project project, String id) { /** * Get list of processes by given project. + * * @param project project of processes * @return list of found processes or empty list */ @@ -220,6 +255,7 @@ public Collection listProcesses(Project project) { /** * Get list of current user processes by given user account. + * * @return list of found processes or empty list */ public Collection listUserProcesses() { @@ -228,6 +264,7 @@ public Collection listUserProcesses() { /** * Delete given process + * * @param process to delete */ public void removeProcess(DataloadProcess process) { @@ -242,7 +279,7 @@ public void removeProcess(DataloadProcess process) { /** * Get process source data. Source data are fetched as zip and written to given stream. * - * @param process process to fetch data of + * @param process process to fetch data of * @param outputStream stream where to write fetched data */ public void getProcessSource(DataloadProcess process, OutputStream outputStream) { @@ -258,8 +295,9 @@ public void getProcessSource(DataloadProcess process, OutputStream outputStream) /** * Get process execution log + * * @param executionDetail execution to log of - * @param outputStream stream to write the log to + * @param outputStream stream to write the log to */ public void getExecutionLog(ProcessExecutionDetail executionDetail, OutputStream outputStream) { notNull(executionDetail, "executionDetail"); @@ -315,7 +353,8 @@ public void handlePollException(final GoodDataRestException e) { ProcessExecutionDetail detail = null; try { detail = getProcessExecutionDetailByUri(detailLink); - } catch (GoodDataException ignored) { } + } catch (GoodDataException ignored) { + } throw new ProcessExecutionException("Can't execute " + e.getText(), detail, e); } @@ -428,7 +467,7 @@ public PageBrowser listSchedules(final Project project) { * @return {@link PageBrowser} list of found schedules or empty list */ public PageBrowser listSchedules(final Project project, - final PageRequest startPage) { + final PageRequest startPage) { notNull(project, "project"); notNull(startPage, "startPage"); return new PageBrowser<>(startPage, page -> listSchedules(getSchedulesUri(project, page))); @@ -468,7 +507,7 @@ public FutureResult executeSchedule(final Schedule schedule) } return new PollResult<>(this, new AbstractPollHandler( - notNullState(scheduleExecution, "created schedule execution").getUri(), + notNullState(Objects.requireNonNull(scheduleExecution), "created schedule execution").getUri(), ScheduleExecution.class, ScheduleExecution.class) { @Override public boolean isFinished(ClientHttpResponse response) throws IOException { @@ -500,24 +539,6 @@ private Page listSchedules(URI uri) { } } - private static URI getScheduleUri(Project project, String id) { - notNull(project, "project"); - notNull(project.getId(), "project.id"); - notEmpty(id, "id"); - - return SCHEDULE_TEMPLATE.expand(project.getId(), id); - } - - private static URI getSchedulesUri(final Project project) { - notNull(project, "project"); - notNull(project.getId(), "project.id"); - return SCHEDULES_TEMPLATE.expand(project.getId()); - } - - private static URI getSchedulesUri(final Project project, final PageRequest page) { - return page.getPageUri(new SpringMutableUri(getSchedulesUri(project))); - } - private Schedule postSchedule(Schedule schedule, URI postUri) { try { return restTemplate.postForObject(postUri, schedule, Schedule.class); @@ -540,18 +561,6 @@ private Collection listProcesses(URI uri) { } } - private static URI getProcessUri(Project project, String id) { - notNull(project, "project"); - notNull(project.getId(), "project.id"); - notEmpty(id, "id"); - - return PROCESS_TEMPLATE.expand(project.getId(), id); - } - - private static URI getProcessesUri(Project project) { - return PROCESSES_TEMPLATE.expand(project.getId()); - } - private DataloadProcess postProcess(DataloadProcess process, File processData, URI postUri) { File tempFile = createTempFile("process", ".zip"); diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ScheduleExecutionException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ScheduleExecutionException.java index f9bc3dd5f..5f98e9606 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ScheduleExecutionException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ScheduleExecutionException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ScheduleNotFoundException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ScheduleNotFoundException.java index 0e05b13cd..265e26d1b 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ScheduleNotFoundException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataload/processes/ScheduleNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataset/DatasetException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataset/DatasetException.java index ed01b86fe..1a54dece1 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataset/DatasetException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataset/DatasetException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -37,6 +37,7 @@ public DatasetException(String message, Collection datasets) { /** * Get datasets. + * * @return dataset names */ public Collection getDatasets() { diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataset/DatasetService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataset/DatasetService.java index 78cfd7993..92cf60cfb 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/dataset/DatasetService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/dataset/DatasetService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,12 +7,30 @@ import com.gooddata.sdk.common.GoodDataException; import com.gooddata.sdk.common.GoodDataRestException; -import com.gooddata.sdk.model.dataset.*; +import com.gooddata.sdk.model.dataset.DatasetLinks; +import com.gooddata.sdk.model.dataset.DatasetManifest; +import com.gooddata.sdk.model.dataset.DatasetManifests; +import com.gooddata.sdk.model.dataset.DatasetNotFoundException; +import com.gooddata.sdk.model.dataset.EtlMode; +import com.gooddata.sdk.model.dataset.EtlModeType; +import com.gooddata.sdk.model.dataset.LookupMode; +import com.gooddata.sdk.model.dataset.MaqlDml; +import com.gooddata.sdk.model.dataset.Pull; +import com.gooddata.sdk.model.dataset.PullTask; +import com.gooddata.sdk.model.dataset.TaskState; +import com.gooddata.sdk.model.dataset.Upload; +import com.gooddata.sdk.model.dataset.UploadStatistics; +import com.gooddata.sdk.model.dataset.Uploads; +import com.gooddata.sdk.model.dataset.UploadsInfo; import com.gooddata.sdk.model.gdc.AboutLinks.Link; import com.gooddata.sdk.model.gdc.TaskStatus; import com.gooddata.sdk.model.gdc.UriResponse; import com.gooddata.sdk.model.project.Project; -import com.gooddata.sdk.service.*; +import com.gooddata.sdk.service.AbstractPollHandler; +import com.gooddata.sdk.service.AbstractService; +import com.gooddata.sdk.service.FutureResult; +import com.gooddata.sdk.service.GoodDataSettings; +import com.gooddata.sdk.service.PollResult; import com.gooddata.sdk.service.gdc.DataStoreException; import com.gooddata.sdk.service.gdc.DataStoreService; import com.gooddata.sdk.service.project.model.ModelService; @@ -29,6 +47,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.Objects; import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; @@ -184,7 +203,7 @@ private FutureResult pullLoad(Project project, final String dirPath, final .postForObject(Pull.URI, new Pull(dirPath), PullTask.class, project.getId()); return new PollResult<>(this, new AbstractPollHandler( - notNullState(pullTask, "created pull task").getPollUri(), TaskStatus.class, Void.class) { + notNullState(Objects.requireNonNull(pullTask), "created pull task").getPollUri(), TaskStatus.class, Void.class) { @Override public void handlePollResult(TaskStatus pollResult) { if (!pollResult.isSuccess()) { @@ -250,34 +269,34 @@ public FutureResult optimizeSliHash(final Project project) { return new PollResult<>(this, new AbstractPollHandler( - notNullState(uriResponse, "created optimize task").getUri(), + notNullState(Objects.requireNonNull(uriResponse), "created optimize task").getUri(), TaskStatus.class, Void.class) { - @Override - public void handlePollResult(final TaskStatus pollResult) { - if (!pollResult.isSuccess()) { - throw new GoodDataException("Unable to optimize SLI hash for project " + project.getId()); - } - setResult(null); - } - - @Override - public boolean isFinished(final ClientHttpResponse response) throws IOException { - if (!super.isFinished(response)) { - return false; - } - final TaskStatus maqlDdlTaskStatus = extractData(response, TaskStatus.class); - if (maqlDdlTaskStatus.isSuccess()) { - return true; - } - throw new GoodDataException("Unable to optimize SLI hash: " + maqlDdlTaskStatus.getMessages()); - } - - @Override - public void handlePollException(final GoodDataRestException e) { - throw new GoodDataException("Unable to optimize SLI hash: " + getPollingUri(), e); - } - - }); + @Override + public void handlePollResult(final TaskStatus pollResult) { + if (!pollResult.isSuccess()) { + throw new GoodDataException("Unable to optimize SLI hash for project " + project.getId()); + } + setResult(null); + } + + @Override + public boolean isFinished(final ClientHttpResponse response) throws IOException { + if (!super.isFinished(response)) { + return false; + } + final TaskStatus maqlDdlTaskStatus = extractData(response, TaskStatus.class); + if (maqlDdlTaskStatus.isSuccess()) { + return true; + } + throw new GoodDataException("Unable to optimize SLI hash: " + maqlDdlTaskStatus.getMessages()); + } + + @Override + public void handlePollException(final GoodDataRestException e) { + throw new GoodDataException("Unable to optimize SLI hash: " + getPollingUri(), e); + } + + }); } @@ -301,39 +320,39 @@ public FutureResult updateProjectData(final Project project, final String return new PollResult<>(this, new AbstractPollHandler( - notNullState(uriResponse, "created update project task").getUri(), + notNullState(Objects.requireNonNull(uriResponse), "created update project task").getUri(), TaskState.class, Void.class) { - @Override - public void handlePollResult(final TaskState pollResult) { - if (!pollResult.isSuccess()) { - throw new GoodDataException(errorMessage); - } - setResult(null); - } - - @Override - public boolean isFinished(final ClientHttpResponse response) throws IOException { - final TaskState taskState = extractData(response, TaskState.class); - if (taskState.isSuccess()) { - return true; - } else if (!taskState.isFinished()) { - return false; - } - throw new GoodDataException(errorMessage + ": " + taskState.getMessage()); - } - - @Override - public void handlePollException(final GoodDataRestException e) { - throw new GoodDataException(errorMessage + ": " + getPollingUri(), e); - } - }); + @Override + public void handlePollResult(final TaskState pollResult) { + if (!pollResult.isSuccess()) { + throw new GoodDataException(errorMessage); + } + setResult(null); + } + + @Override + public boolean isFinished(final ClientHttpResponse response) throws IOException { + final TaskState taskState = extractData(response, TaskState.class); + if (taskState.isSuccess()) { + return true; + } else if (!taskState.isFinished()) { + return false; + } + throw new GoodDataException(errorMessage + ": " + taskState.getMessage()); + } + + @Override + public void handlePollException(final GoodDataRestException e) { + throw new GoodDataException(errorMessage + ": " + getPollingUri(), e); + } + }); } /** * Lists all uploads for the dataset with the given identifier in the given project. Returns empty list if there * are no uploads for the given dataset. * - * @param project GoodData project + * @param project GoodData project * @param datasetId dataset identifier * @return collection of {@link Upload} objects or empty list */ @@ -349,7 +368,7 @@ public Collection listUploadsForDataset(Project project, String datasetI if (result == null) { throw new GoodDataException("Empty response from '" + dataSet.getUploadsUri() + "'."); - } else if (result.items() == null){ + } else if (result.items() == null) { return emptyList(); } @@ -363,7 +382,7 @@ public Collection listUploadsForDataset(Project project, String datasetI * Returns last upload for the dataset with given identifier in the given project. Returns null if the last upload * doesn't exist. * - * @param project GoodData project + * @param project GoodData project * @param datasetId dataset identifier * @return last dataset upload or {@code null} if the upload doesn't exist */ @@ -400,7 +419,7 @@ public UploadStatistics getUploadStatistics(Project project) { /** * Returns {@link UploadsInfo.DataSet} object containing upload information for the given dataset in the given project. - * + *

    * Package-private for testing purposes. */ UploadsInfo.DataSet getDataSetInfo(Project project, String datasetId) { diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/executeafm/ExecuteAfmService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/executeafm/ExecuteAfmService.java index 4a7f44427..07aa8a8ad 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/executeafm/ExecuteAfmService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/executeafm/ExecuteAfmService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -13,7 +13,11 @@ import com.gooddata.sdk.model.executeafm.response.ExecutionResponse; import com.gooddata.sdk.model.executeafm.result.ExecutionResult; import com.gooddata.sdk.model.project.Project; -import com.gooddata.sdk.service.*; +import com.gooddata.sdk.service.AbstractService; +import com.gooddata.sdk.service.FutureResult; +import com.gooddata.sdk.service.GoodDataSettings; +import com.gooddata.sdk.service.PollResult; +import com.gooddata.sdk.service.SimplePollHandler; import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriComponentsBuilder; @@ -51,6 +55,7 @@ public class ExecuteAfmService extends AbstractService { /** * Constructor. + * * @param restTemplate rest template * @param settings settings */ @@ -60,7 +65,8 @@ public ExecuteAfmService(final RestTemplate restTemplate, final GoodDataSettings /** * Executes the given AFM execution returning the execution response - * @param project project of the execution + * + * @param project project of the execution * @param execution execution * @return response of the submitted execution */ @@ -86,7 +92,8 @@ public ExecutionResponse executeAfm(final Project project, final Execution execu /** * Executes the given execution returning the execution response - * @param project project of the execution + * + * @param project project of the execution * @param execution execution * @return response of the submitted execution */ @@ -112,6 +119,7 @@ public ExecutionResponse executeVisualization(final Project project, final Visua /** * Get for result of given response. + * * @param executionResponse response to get the result * @return future of execution result */ @@ -121,8 +129,9 @@ public FutureResult getResult(final ExecutionResponse execution /** * Get for page of result of given response. + * * @param executionResponse response to get the result - * @param page desired result page specification + * @param page desired result page specification * @return future of execution result */ public FutureResult getResult(final ExecutionResponse executionResponse, final ResultPage page) { diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/executeafm/ExecutionResultException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/executeafm/ExecutionResultException.java index 1bf8c090a..869cce998 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/executeafm/ExecutionResultException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/executeafm/ExecutionResultException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -17,6 +17,7 @@ public class ExecutionResultException extends GoodDataException { /** * Creates new instance + * * @param cause cause */ ExecutionResultException(GoodDataRestException cause) { diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/export/ExportException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/export/ExportException.java index d77bef22d..4bb47e079 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/export/ExportException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/export/ExportException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/export/ExportService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/export/ExportService.java index c6c5019e2..b03b0a6be 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/export/ExportService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/export/ExportService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,7 +9,11 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import com.gooddata.sdk.common.GoodDataException; import com.gooddata.sdk.common.GoodDataRestException; -import com.gooddata.sdk.model.export.*; +import com.gooddata.sdk.model.export.ClientExport; +import com.gooddata.sdk.model.export.ExecuteReport; +import com.gooddata.sdk.model.export.ExecuteReportDefinition; +import com.gooddata.sdk.model.export.ExportFormat; +import com.gooddata.sdk.model.export.ReportRequest; import com.gooddata.sdk.model.gdc.AsyncTask; import com.gooddata.sdk.model.gdc.UriResponse; import com.gooddata.sdk.model.md.AbstractObj; @@ -19,8 +23,14 @@ import com.gooddata.sdk.model.md.report.Report; import com.gooddata.sdk.model.md.report.ReportDefinition; import com.gooddata.sdk.model.project.Project; -import com.gooddata.sdk.service.*; +import com.gooddata.sdk.service.AbstractService; +import com.gooddata.sdk.service.FutureResult; +import com.gooddata.sdk.service.GoodDataEndpoint; +import com.gooddata.sdk.service.GoodDataSettings; +import com.gooddata.sdk.service.PollResult; +import com.gooddata.sdk.service.SimplePollHandler; import org.springframework.http.HttpEntity; +import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.client.ClientHttpResponse; import org.springframework.web.client.RestClientException; @@ -29,6 +39,7 @@ import java.io.IOException; import java.io.OutputStream; +import java.util.Objects; import static com.gooddata.sdk.common.util.Validate.notNull; import static com.gooddata.sdk.common.util.Validate.notNullState; @@ -42,23 +53,30 @@ public class ExportService extends AbstractService { public static final String EXPORTING_URI = "/gdc/exporter/executor"; - - private static final String CLIENT_EXPORT_URI = "/gdc/projects/{projectId}/clientexport"; - - private static final String RAW_EXPORT_URI = "/gdc/projects/{projectId}/execute/raw"; - public static final UriTemplate OBJ_TEMPLATE = new UriTemplate(Obj.OBJ_URI); public static final UriTemplate PROJECT_TEMPLATE = new UriTemplate(Project.URI); + private static final String CLIENT_EXPORT_URI = "/gdc/projects/{projectId}/clientexport"; + private static final String RAW_EXPORT_URI = "/gdc/projects/{projectId}/execute/raw"; /** * Service for data export + * * @param restTemplate REST template - * @param settings settings + * @param settings settings */ public ExportService(final RestTemplate restTemplate, final GoodDataSettings settings) { super(restTemplate, settings); } + static String extractProjectId(final AbstractObj obj) { + notNull(obj, "obj"); + notNull(obj.getUri(), "obj.uri"); + + final String projectId = OBJ_TEMPLATE.match(obj.getUri()).get("projectId"); + notNull(projectId, "obj uri - project id"); + return projectId; + } + /** * Export the given report definition in the given format to the given output stream * @@ -101,16 +119,14 @@ private FutureResult exportReport(final ReportRequest request, final Expor return new PollResult<>(this, new SimplePollHandler(uri, Void.class) { @Override public boolean isFinished(ClientHttpResponse response) throws IOException { - switch (response.getStatusCode()) { - case OK: - return true; - case ACCEPTED: - return false; - case NO_CONTENT: - throw new NoDataExportException(); - default: - throw new ExportException("Unable to export report, unknown HTTP response code: " + response.getStatusCode()); - } + HttpStatus status = HttpStatus.resolve(response.getStatusCode().value()); + return switch (status) { + case OK -> true; + case ACCEPTED -> false; + case NO_CONTENT -> throw new NoDataExportException(); + default -> + throw new ExportException("Unable to export report, unknown HTTP response code: " + response.getStatusCode()); + }; } @Override @@ -152,7 +168,7 @@ private String exportReport(final JsonNode execResult, final ExportFormat format root.set("result_req", child); try { - return notNullState(restTemplate.postForObject(EXPORTING_URI, root, UriResponse.class), "exported report").getUri(); + return notNullState(Objects.requireNonNull(restTemplate.postForObject(EXPORTING_URI, root, UriResponse.class)), "exported report").getUri(); } catch (GoodDataException | RestClientException e) { throw new ExportException("Unable to export report", e); } @@ -189,7 +205,8 @@ public FutureResult exportPdf(final GoodDataEndpoint endpoint, final Proje return new PollResult<>(this, new SimplePollHandler(notNullState(task, "export pdf task").getUri(), Void.class) { @Override public boolean isFinished(ClientHttpResponse response) throws IOException { - switch (response.getStatusCode()) { + HttpStatus status = HttpStatus.resolve(response.getStatusCode().value()); + switch (status) { case OK: return true; case ACCEPTED: @@ -218,6 +235,7 @@ public void handlePollException(final GoodDataRestException e) { /** * Export the given Report using the raw export (without columns/rows limitations) + * * @param report report * @param output output * @return polling result @@ -230,8 +248,9 @@ public FutureResult exportCsv(final Report report, final OutputStream outp /** * Export the given Report Definition using the raw export (without columns/rows limitations) + * * @param definition report definition - * @param output output + * @param output output * @return polling result * @throws ExportException in case export fails */ @@ -261,17 +280,14 @@ private FutureResult exportCsv(final AbstractObj obj, final ReportRequest return new PollResult<>(this, new SimplePollHandler(response.getUri(), Void.class) { @Override public boolean isFinished(ClientHttpResponse response) throws IOException { - switch (response.getStatusCode()) { - case OK: - return true; - case ACCEPTED: - return false; - case NO_CONTENT: - throw new NoDataExportException(); - default: - throw new ExportException("Unable to export: " + uri + - ", unknown HTTP response code: " + response.getStatusCode()); - } + HttpStatus status = HttpStatus.resolve(response.getStatusCode().value()); + return switch (status) { + case OK -> true; + case ACCEPTED -> false; + case NO_CONTENT -> throw new NoDataExportException(); + default -> throw new ExportException("Unable to export: " + uri + + ", unknown HTTP response code: " + response.getStatusCode()); + }; } @Override @@ -289,13 +305,4 @@ public void handlePollException(final GoodDataRestException e) { } }); } - - static String extractProjectId(final AbstractObj obj) { - notNull(obj, "obj"); - notNull(obj.getUri(), "obj.uri"); - - final String projectId = OBJ_TEMPLATE.match(obj.getUri()).get("projectId"); - notNull(projectId, "obj uri - project id"); - return projectId; - } } diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/export/NoDataExportException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/export/NoDataExportException.java index ac8157e8c..484b6257e 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/export/NoDataExportException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/export/NoDataExportException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/featureflag/FeatureFlagService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/featureflag/FeatureFlagService.java index 814c81ece..fde25bf3f 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/featureflag/FeatureFlagService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/featureflag/FeatureFlagService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,8 +9,8 @@ import com.gooddata.sdk.model.featureflag.FeatureFlags; import com.gooddata.sdk.model.featureflag.ProjectFeatureFlag; import com.gooddata.sdk.model.featureflag.ProjectFeatureFlags; -import com.gooddata.sdk.model.project.Project; import com.gooddata.sdk.model.hierarchicalconfig.ConfigItem; +import com.gooddata.sdk.model.project.Project; import com.gooddata.sdk.service.AbstractService; import com.gooddata.sdk.service.GoodDataSettings; import com.gooddata.sdk.service.hierarchicalconfig.HierarchicalConfigService; @@ -26,6 +26,7 @@ /** * Provides feature flag management. Feature flag is a boolean flag used for enabling / disabling some specific feature * of GoodData platform. It can be used in various scopes (per project, per project group, per user, global etc.). + * * @deprecated Use {@link HierarchicalConfigService}. */ @Deprecated @@ -37,8 +38,9 @@ public class FeatureFlagService extends AbstractService { /** * Constructs service for GoodData feature flags management. + * * @param restTemplate RESTful HTTP Spring template - * @param settings settings + * @param settings settings */ public FeatureFlagService(final RestTemplate restTemplate, final GoodDataSettings settings) { super(restTemplate, settings); @@ -98,7 +100,7 @@ public ProjectFeatureFlags listProjectFeatureFlags(final Project project) { * flags from all scopes) for given project by its unique name (aka "key"). * It doesn't matter whether feature flag is enabled or not, it'll be included in both cases. * - * @param project project, cannot be null + * @param project project, cannot be null * @param featureFlagName unique name (key) of feature flag, cannot be empty * @return feature flag for given project with given name (key) * @deprecated Use {@link HierarchicalConfigService#getProjectConfigItem(Project, String)}. @@ -108,13 +110,7 @@ public ProjectFeatureFlag getProjectFeatureFlag(final Project project, final Str notEmpty(featureFlagName, "featureFlagName"); try { - final ProjectFeatureFlag flag = getProjectFeatureFlag(getProjectFeatureFlagUri(project, featureFlagName)); - - if (flag == null) { - throw new GoodDataException("empty response from API call"); - } - - return flag; + return getProjectFeatureFlag(getProjectFeatureFlagUri(project, featureFlagName)); } catch (GoodDataException | RestClientException e) { throw new GoodDataException("Unable to get project feature flag: " + featureFlagName, e); } @@ -127,7 +123,7 @@ public ProjectFeatureFlag getProjectFeatureFlag(final Project project, final Str * this is the same as having no feature flag at all. * * @param project project for which the feature flag should be created, cannot be null - * @param flag feature flag to be created, cannot be null + * @param flag feature flag to be created, cannot be null * @return created feature flag * @deprecated Use {@link HierarchicalConfigService#setProjectConfigItem(Project, ConfigItem)}. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/DataStoreException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/DataStoreException.java index fd4699fd3..49b23e732 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/DataStoreException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/DataStoreException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/DataStoreService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/DataStoreService.java index 79ca14611..ae263f399 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/DataStoreService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/DataStoreService.java @@ -1,36 +1,48 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.service.gdc; -import com.github.sardine.Sardine; import com.github.sardine.impl.SardineException; +import com.gooddata.sdk.common.GoodDataRestException; import com.gooddata.sdk.common.UriPrefixer; import com.gooddata.sdk.service.httpcomponents.SingleEndpointGoodDataRestProvider; -import org.apache.http.*; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.http.Header; +import org.apache.http.HeaderIterator; +import org.apache.http.HttpEntity; +import org.apache.http.HttpHost; +import org.apache.http.HttpRequest; +import org.apache.http.NoHttpResponseException; +import org.apache.http.ProtocolVersion; +import org.apache.http.StatusLine; import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.HttpClient; import org.apache.http.client.NonRepeatableRequestException; -import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.conn.ClientConnectionManager; +import org.apache.http.entity.InputStreamEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.message.BasicHeader; +import org.apache.http.message.BasicHeaderIterator; import org.apache.http.params.HttpParams; +import org.apache.http.protocol.HTTP; import org.apache.http.protocol.HttpContext; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.util.Collections; +import java.util.List; import java.util.Locale; +import java.util.Objects; import java.util.function.Supplier; import static com.gooddata.sdk.common.util.Validate.notEmpty; @@ -41,7 +53,7 @@ */ public class DataStoreService { - private final Sardine sardine; + private final GdcSardine sardine; private final Supplier stagingUriSupplier; private final URI gdcUri; private final RestTemplate restTemplate; @@ -51,7 +63,8 @@ public class DataStoreService { /** * Creates new DataStoreService - * @param restProvider restProvider to make datastore connection + * + * @param restProvider restProvider to make datastore connection * @param stagingUriSupplier used to obtain datastore URI */ public DataStoreService(SingleEndpointGoodDataRestProvider restProvider, Supplier stagingUriSupplier) { @@ -74,6 +87,7 @@ private UriPrefixer getPrefixer() { /** * Returns uri for given path (which is used by this service for upload, download or delete) + * * @param path path the uri is constructed for * @return uri for given path */ @@ -83,7 +97,8 @@ public URI getUri(String path) { /** * Uploads given stream to given datastore path - * @param path path where to upload to + * + * @param path path where to upload to * @param stream stream to upload * @throws DataStoreException in case upload failed */ @@ -95,7 +110,10 @@ public void upload(String path, InputStream stream) { private void upload(URI url, InputStream stream) { try { - sardine.put(url.toString(), stream); + // We need to use it this way, if we want to track request_id in the stacktrace. + InputStreamEntity entity = new InputStreamEntity(stream); + List

    headers = Collections.singletonList(new BasicHeader(HTTP.EXPECT_DIRECTIVE, HTTP.EXPECT_CONTINUE)); + sardine.put(url.toString(), entity, headers, new GdcSardineResponseHandler()); } catch (SardineException e) { if (HttpStatus.INTERNAL_SERVER_ERROR.value() == e.getStatusCode()) { // this error may occur when user issues request to WebDAV before SST and TT were obtained @@ -129,6 +147,7 @@ private String createUnAuthRequestWarningMessage(final URI url) { /** * Download given path and return data as stream + * * @param path path from where to download * @return download stream * @throws DataStoreException in case download failed @@ -137,7 +156,7 @@ public InputStream download(String path) { notEmpty(path, "path"); final URI uri = getUri(path); try { - return sardine.get(uri.toString()); + return sardine.get(uri.toString(), Collections.emptyList(), new GdcSardineResponseHandler()); } catch (IOException e) { throw new DataStoreException("Unable to download from " + uri, e); } @@ -145,6 +164,7 @@ public InputStream download(String path) { /** * Delete given path from datastore. + * * @param path path to delete * @throws DataStoreException in case delete failed */ @@ -152,272 +172,388 @@ public void delete(String path) { notEmpty(path, "path"); final URI uri = getUri(path); try { - final ResponseEntity result = restTemplate.exchange(uri, HttpMethod.DELETE, org.springframework.http.HttpEntity.EMPTY, Void.class); + final ResponseEntity result = restTemplate.exchange(uri, HttpMethod.DELETE, org.springframework.http.HttpEntity.EMPTY, Void.class); // in case we get redirect (i.e. when we want to delete collection) we will follow redirect to the new location if (HttpStatus.MOVED_PERMANENTLY.equals(result.getStatusCode())) { - restTemplate.exchange(result.getHeaders().getLocation(), HttpMethod.DELETE, org.springframework.http.HttpEntity.EMPTY, Void.class); + restTemplate.exchange(Objects.requireNonNull(result.getHeaders().getLocation()), HttpMethod.DELETE, org.springframework.http.HttpEntity.EMPTY, Void.class); } - } catch (RestClientException e) { + } catch (GoodDataRestException e) { throw new DataStoreException("Unable to delete " + uri, e); } } /** - * This class is needed to provide Sardine with instance of {@link CloseableHttpClient}, because - * used {@link com.gooddata.http.client.GoodDataHttpClient} is not Closeable at all (on purpose). - * Thanks to that we can use proper GoodData authentication mechanism instead of basic auth. - * - * It creates simple closeable wrapper around plain {@link HttpClient} where {@code close()} - * is implemented as noop (respectively for the response used). + * This builder returns a {@link CloseableHttpClient} facade that adapts the internal HttpClient5 + * into the HttpClient4 API required by Sardine. */ - private static class CustomHttpClientBuilder extends HttpClientBuilder { + static class CustomHttpClientBuilder extends HttpClientBuilder { private final HttpClient client; private CustomHttpClientBuilder(HttpClient client) { - this.client = client; + this.client = notNull(client, "client"); } @Override public CloseableHttpClient build() { - return new FakeCloseableHttpClient(client); + return new ShadowHttpClient4Adapter(client); } } - private static class FakeCloseableHttpClient extends CloseableHttpClient { + /** + * Adapter bridging the (shaded) HttpClient4 API expected by Sardine to the HttpClient5 implementation used by the SDK. + */ + static final class ShadowHttpClient4Adapter extends CloseableHttpClient { + private final HttpClient client; - private FakeCloseableHttpClient(HttpClient client) { - notNull(client, "client"); + private ShadowHttpClient4Adapter(HttpClient client) { this.client = client; } - @Override - protected CloseableHttpResponse doExecute(HttpHost target, HttpRequest request, HttpContext context) throws IOException, ClientProtocolException { - // nothing to do - this method is never called, because we override all methods from CloseableHttpClient + private static org.apache.hc.core5.http.protocol.HttpContext adaptContext(final HttpContext context) { + if (context instanceof org.apache.hc.core5.http.protocol.HttpContext) { + return (org.apache.hc.core5.http.protocol.HttpContext) context; + } return null; } - @Override - public void close() throws IOException { - // nothing to close - wrappedClient doesn't have to implement CloseableHttpClient + private static org.apache.hc.core5.http.HttpHost adaptHost(final HttpHost target, final HttpRequest request) { + if (target != null) { + return new org.apache.hc.core5.http.HttpHost(target.getSchemeName(), target.getHostName(), target.getPort()); + } + if (request instanceof HttpUriRequest uriRequest) { + final java.net.URI uri = uriRequest.getURI(); + if (uri.isAbsolute()) { + return new org.apache.hc.core5.http.HttpHost(uri.getScheme(), uri.getHost(), uri.getPort()); + } + } + return null; } - /** - * @deprecated because supertype's {@link HttpClient#getParams()} is deprecated. - */ - @Override - @Deprecated - public HttpParams getParams() { - return client.getParams(); - } + private static org.apache.hc.core5.http.ClassicHttpRequest adaptRequest( + final org.apache.hc.core5.http.HttpHost target, final HttpRequest request) throws IOException { - /** - * @deprecated because supertype's {@link HttpClient#getConnectionManager()} is deprecated. - */ - @Override - @Deprecated - public ClientConnectionManager getConnectionManager() { - return client.getConnectionManager(); - } + final String method = request.getRequestLine().getMethod(); + final java.net.URI uri = resolveUri(target, request); + final org.apache.hc.client5.http.classic.methods.HttpUriRequestBase builder = + new org.apache.hc.client5.http.classic.methods.HttpUriRequestBase(method, uri); - @Override - public CloseableHttpResponse execute(HttpUriRequest request) throws IOException, ClientProtocolException { - return new FakeCloseableHttpResponse(client.execute(request)); + for (Header header : request.getAllHeaders()) { + builder.addHeader(header.getName(), header.getValue()); + } + + if (request instanceof org.apache.http.HttpEntityEnclosingRequest) { + final HttpEntity entity = ((org.apache.http.HttpEntityEnclosingRequest) request).getEntity(); + if (entity != null) { + builder.setEntity(adaptEntity(entity)); + } + } + return builder; } - @Override - public CloseableHttpResponse execute(HttpUriRequest request, HttpContext context) throws IOException, ClientProtocolException { - return new FakeCloseableHttpResponse(client.execute(request, context)); + private static java.net.URI resolveUri(final org.apache.hc.core5.http.HttpHost target, final HttpRequest request) { + if (request instanceof HttpUriRequest) { + final java.net.URI requestUri = ((HttpUriRequest) request).getURI(); + if (requestUri.isAbsolute() || target == null) { + return requestUri; + } + return java.net.URI.create(target.toURI()).resolve(requestUri.toString()); + } + + final String uri = request.getRequestLine().getUri(); + final java.net.URI parsed = java.net.URI.create(uri); + if (parsed.isAbsolute() || target == null) { + return parsed; + } + return java.net.URI.create(target.toURI()).resolve(uri); } - @Override - public CloseableHttpResponse execute(HttpHost target, HttpRequest request) throws IOException, ClientProtocolException { - return new FakeCloseableHttpResponse(client.execute(target, request)); + private static org.apache.hc.core5.http.HttpEntity adaptEntity(final HttpEntity entity) throws IOException { + final org.apache.hc.core5.http.ContentType contentType = entity.getContentType() != null + ? org.apache.hc.core5.http.ContentType.parse(entity.getContentType().getValue()) + : null; + return new org.apache.hc.core5.http.io.entity.InputStreamEntity(entity.getContent(), entity.getContentLength(), contentType); } @Override - public CloseableHttpResponse execute(HttpHost target, HttpRequest request, HttpContext context) throws IOException, ClientProtocolException { - return new FakeCloseableHttpResponse(client.execute(target, request, context)); + protected CloseableHttpResponse doExecute(final HttpHost target, final HttpRequest request, + final HttpContext context) throws IOException, ClientProtocolException { + notNull(request, "request"); + final org.apache.hc.core5.http.HttpHost target5 = adaptHost(target, request); + final org.apache.hc.core5.http.ClassicHttpRequest request5 = adaptRequest(target5, request); + final org.apache.hc.core5.http.ClassicHttpResponse response5 = execute(target5, request5, context); + return new ShadowedCloseableHttpResponse(response5); } - @Override - public T execute(HttpUriRequest request, ResponseHandler responseHandler) throws IOException, ClientProtocolException { - return client.execute(request, responseHandler); + private org.apache.hc.core5.http.ClassicHttpResponse execute( + final org.apache.hc.core5.http.HttpHost target, final org.apache.hc.core5.http.ClassicHttpRequest request, + final HttpContext context) throws IOException { + if (target != null) { + return client.execute(target, request, adaptContext(context), response -> response); + } + return client.execute(request, adaptContext(context), response -> response); } @Override - public T execute(HttpUriRequest request, ResponseHandler responseHandler, HttpContext context) throws IOException, ClientProtocolException { - return client.execute(request, responseHandler, context); + public void close() { + // HttpClient5 instance is managed by the SDK and must not be closed by Sardine. } @Override - public T execute(HttpHost target, HttpRequest request, ResponseHandler responseHandler) throws IOException, ClientProtocolException { - return client.execute(target, request, responseHandler); + @Deprecated + public HttpParams getParams() { + return null; } @Override - public T execute(HttpHost target, HttpRequest request, ResponseHandler responseHandler, HttpContext context) throws IOException, ClientProtocolException { - return client.execute(target, request, responseHandler, context); + @Deprecated + public ClientConnectionManager getConnectionManager() { + return null; } - } - private static class FakeCloseableHttpResponse implements CloseableHttpResponse { + static final class ShadowedCloseableHttpResponse implements CloseableHttpResponse { - private final HttpResponse wrappedResponse; + private final org.apache.hc.core5.http.ClassicHttpResponse response; - public FakeCloseableHttpResponse(HttpResponse wrappedResponse) { - notNull(wrappedResponse, "wrappedResponse"); - this.wrappedResponse = wrappedResponse; - } + private ShadowedCloseableHttpResponse(org.apache.hc.core5.http.ClassicHttpResponse response) { + this.response = notNull(response, "response"); + } + + private static org.apache.hc.core5.http.Header[] convert(Header[] headers) { + final org.apache.hc.core5.http.Header[] converted = new org.apache.hc.core5.http.Header[headers.length]; + for (int i = 0; i < headers.length; i++) { + converted[i] = new org.apache.hc.core5.http.message.BasicHeader(headers[i].getName(), headers[i].getValue()); + } + return converted; + } @Override public void close() throws IOException { // nothing to close - wrappedClient doesn't have to implement CloseableHttpResponse } - @Override - public StatusLine getStatusLine() { - return wrappedResponse.getStatusLine(); - } + @Override + public StatusLine getStatusLine() { + final org.apache.hc.core5.http.ProtocolVersion version = response.getVersion(); + final ProtocolVersion protocolVersion = new ProtocolVersion(version.getProtocol(), + version.getMajor(), version.getMinor()); + return new org.apache.http.message.BasicStatusLine(protocolVersion, response.getCode(), response.getReasonPhrase()); + } - @Override - public void setStatusLine(StatusLine statusline) { - wrappedResponse.setStatusLine(statusline); - } + @Override + public void setStatusLine(StatusLine statusline) { + response.setCode(statusline.getStatusCode()); + } - @Override - public void setStatusLine(ProtocolVersion ver, int code) { - wrappedResponse.setStatusLine(ver, code); - } + @Override + public void setStatusLine(ProtocolVersion ver, int code) { + response.setVersion(new org.apache.hc.core5.http.ProtocolVersion(ver.getProtocol(), ver.getMajor(), ver.getMinor())); + response.setCode(code); + } - @Override - public void setStatusLine(ProtocolVersion ver, int code, String reason) { - wrappedResponse.setStatusLine(ver, code, reason); - } + @Override + public void setStatusLine(ProtocolVersion ver, int code, String reason) { + setStatusLine(ver, code); + response.setReasonPhrase(reason); + } - @Override - public void setStatusCode(int code) throws IllegalStateException { - wrappedResponse.setStatusCode(code); - } + @Override + public void setStatusCode(int code) throws IllegalStateException { + response.setCode(code); + } - @Override - public void setReasonPhrase(String reason) throws IllegalStateException { - wrappedResponse.setReasonPhrase(reason); - } + @Override + public void setReasonPhrase(String reason) throws IllegalStateException { + response.setReasonPhrase(reason); + } - @Override - public HttpEntity getEntity() { - return wrappedResponse.getEntity(); - } + @Override + public HttpEntity getEntity() { + final org.apache.hc.core5.http.HttpEntity entity = response.getEntity(); + return entity == null ? null : new ShadowedHttpEntity(entity); + } - @Override - public void setEntity(HttpEntity entity) { - wrappedResponse.setEntity(entity); - } + @Override + public void setEntity(HttpEntity entity) { + if (entity == null) { + response.setEntity(null); + return; + } + try { + response.setEntity(adaptEntity(entity)); + } catch (IOException e) { + throw new IllegalStateException("Unable to set entity on the Sardine shadow response", e); + } + } - @Override - public Locale getLocale() { - return wrappedResponse.getLocale(); - } + @Override + public Locale getLocale() { + return Locale.getDefault(); + } - @Override - public void setLocale(Locale loc) { - wrappedResponse.setLocale(loc); - } + @Override + public void setLocale(Locale loc) { + // no-op + } - @Override - public ProtocolVersion getProtocolVersion() { - return wrappedResponse.getProtocolVersion(); - } + @Override + public ProtocolVersion getProtocolVersion() { + final org.apache.hc.core5.http.ProtocolVersion version = response.getVersion(); + return new ProtocolVersion(version.getProtocol(), version.getMajor(), version.getMinor()); + } - @Override - public boolean containsHeader(String name) { - return wrappedResponse.containsHeader(name); - } + @Override + public boolean containsHeader(String name) { + return response.containsHeader(name); + } - @Override - public Header[] getHeaders(String name) { - return wrappedResponse.getHeaders(name); - } + @Override + public Header[] getHeaders(String name) { + final org.apache.hc.core5.http.Header[] headers = response.getHeaders(name); + final Header[] converted = new Header[headers.length]; + for (int i = 0; i < headers.length; i++) { + converted[i] = new BasicHeader(headers[i].getName(), headers[i].getValue()); + } + return converted; + } - @Override - public Header getFirstHeader(String name) { - return wrappedResponse.getFirstHeader(name); - } + @Override + public Header getFirstHeader(String name) { + final org.apache.hc.core5.http.Header header = response.getFirstHeader(name); + return header == null ? null : new BasicHeader(header.getName(), header.getValue()); + } - @Override - public Header getLastHeader(String name) { - return wrappedResponse.getLastHeader(name); - } + @Override + public Header getLastHeader(String name) { + final org.apache.hc.core5.http.Header header = response.getLastHeader(name); + return header == null ? null : new BasicHeader(header.getName(), header.getValue()); + } - @Override - public Header[] getAllHeaders() { - return wrappedResponse.getAllHeaders(); - } + @Override + public Header[] getAllHeaders() { + final org.apache.hc.core5.http.Header[] headers = response.getHeaders(); + final Header[] converted = new Header[headers.length]; + for (int i = 0; i < headers.length; i++) { + converted[i] = new BasicHeader(headers[i].getName(), headers[i].getValue()); + } + return converted; + } - @Override - public void addHeader(Header header) { - wrappedResponse.addHeader(header); - } + @Override + public void addHeader(Header header) { + response.addHeader(header.getName(), header.getValue()); + } - @Override - public void addHeader(String name, String value) { - wrappedResponse.addHeader(name, value); - } + @Override + public void addHeader(String name, String value) { + response.addHeader(name, value); + } - @Override - public void setHeader(Header header) { - wrappedResponse.setHeader(header); - } + @Override + public void setHeader(Header header) { + response.setHeader(header.getName(), header.getValue()); + } - @Override - public void setHeader(String name, String value) { - wrappedResponse.setHeader(name, value); - } + @Override + public void setHeader(String name, String value) { + response.setHeader(name, value); + } - @Override - public void setHeaders(Header[] headers) { - wrappedResponse.setHeaders(headers); - } + @Override + public void setHeaders(Header[] headers) { + response.setHeaders(convert(headers)); + } - @Override - public void removeHeader(Header header) { - wrappedResponse.removeHeader(header); - } + @Override + public void removeHeader(Header header) { + response.removeHeaders(header.getName()); + } - @Override - public void removeHeaders(String name) { - wrappedResponse.removeHeaders(name); - } + @Override + public void removeHeaders(String name) { + response.removeHeaders(name); + } - @Override - public HeaderIterator headerIterator() { - return wrappedResponse.headerIterator(); - } + @Override + public HeaderIterator headerIterator() { + return new BasicHeaderIterator(getAllHeaders(), null); + } - @Override - public HeaderIterator headerIterator(String name) { - return wrappedResponse.headerIterator(name); - } + @Override + public HeaderIterator headerIterator(String name) { + return new BasicHeaderIterator(getHeaders(name), name); + } - /** - * @deprecated because supertype's {@link HttpMessage#getParams()} is deprecated. - */ - @Deprecated - @Override - public HttpParams getParams() { - return wrappedResponse.getParams(); + @Deprecated + @Override + public HttpParams getParams() { + return null; + } + + @Deprecated + @Override + public void setParams(HttpParams params) { + // no-op + } } - /** - * @deprecated because supertype's {@link HttpMessage#setParams(HttpParams)} is deprecated. - */ - @Deprecated - @Override - public void setParams(HttpParams params) { - wrappedResponse.setParams(params); + static final class ShadowedHttpEntity implements HttpEntity { + + private final org.apache.hc.core5.http.HttpEntity delegate; + + private ShadowedHttpEntity(org.apache.hc.core5.http.HttpEntity delegate) { + this.delegate = delegate; + } + + @Override + public boolean isRepeatable() { + return delegate.isRepeatable(); + } + + @Override + public boolean isChunked() { + return delegate.isChunked(); + } + + @Override + public long getContentLength() { + return delegate.getContentLength(); + } + + @Override + public Header getContentType() { + final String type = delegate.getContentType(); + return type == null ? null : new BasicHeader(org.apache.http.HttpHeaders.CONTENT_TYPE, type); + } + + @Override + public Header getContentEncoding() { + final String encoding = delegate.getContentEncoding(); + return encoding == null ? null : new BasicHeader(org.apache.http.HttpHeaders.CONTENT_ENCODING, encoding); + } + + @Override + public InputStream getContent() throws IOException { + return delegate.getContent(); + } + + @Override + public void writeTo(java.io.OutputStream outstream) throws IOException { + delegate.writeTo(outstream); + } + + @Override + public boolean isStreaming() { + return delegate.isStreaming(); + } + + @Deprecated + @Override + public void consumeContent() throws IOException { + org.apache.hc.core5.http.io.entity.EntityUtils.consume(delegate); + } } } -} +} \ No newline at end of file diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcSardine.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcSardine.java index d81995504..b2024341e 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcSardine.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcSardine.java @@ -1,18 +1,25 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.service.gdc; -import static com.gooddata.sdk.common.util.Validate.notNull; - import com.github.sardine.impl.SardineImpl; +import com.github.sardine.impl.io.ContentLengthInputStream; +import com.github.sardine.impl.io.HttpMethodReleaseInputStream; +import org.apache.http.Header; +import org.apache.http.HttpResponse; import org.apache.http.client.ResponseHandler; +import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.impl.client.HttpClientBuilder; import java.io.IOException; +import java.util.List; +import java.util.Map; + +import static com.gooddata.sdk.common.util.Validate.notNull; /** * This class extends SardineImpl, connections were not correctly closed by parent @@ -28,11 +35,41 @@ public GdcSardine(HttpClientBuilder builder) { */ @Override protected T execute(HttpRequestBase request, ResponseHandler responseHandler) throws IOException { - notNull(request,"request"); + notNull(request, "request"); try { return super.execute(request, responseHandler); } finally { request.releaseConnection(); } } + + /** + * The method body is retrieved from {@link SardineImpl#get(String, Map)} and extended about the response handler + * to be able to handle responses arbitrarily. + * + * @param url Path to the resource including protocol and hostname + * @param headers Additional HTTP headers to add to the request + * @param responseHandler Arbitrary response handler to manipulate with responses + * @return Data stream to read from + * @throws IOException I/O error or HTTP response validation failure + */ + public ContentLengthInputStream get(final String url, final List
    headers, + final ResponseHandler responseHandler) throws IOException { + + final HttpGet get = new HttpGet(url); + for (Header header : headers) { + get.addHeader(header); + } + // Must use #execute without handler, otherwise the entity is consumed + // already after the handler exits. + final HttpResponse response = this.execute(get); + try { + responseHandler.handleResponse(response); + // Will abort the read when closed before EOF. + return new ContentLengthInputStream(new HttpMethodReleaseInputStream(response), response.getEntity().getContentLength()); + } catch (IOException ex) { + get.abort(); + throw ex; + } + } } diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcSardineException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcSardineException.java new file mode 100644 index 000000000..7625e8cf4 --- /dev/null +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcSardineException.java @@ -0,0 +1,35 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.service.gdc; + +import com.github.sardine.impl.SardineException; + +/** + * Extended Sardine exception about X-GDC-REQUEST header value. + */ +public class GdcSardineException extends SardineException { + + private final String requestId; + + /** + * @param msg Custom description of failure + * @param statusCode Error code returned by server + * @param responsePhrase Response phrase following the error code + * @param requestId The X-GDC-REQUEST identifier. + */ + public GdcSardineException(String requestId, String msg, int statusCode, String responsePhrase) { + super(msg, statusCode, responsePhrase); + this.requestId = requestId; + } + + @Override + public String getMessage() { + return String.format("[request_id=%s]: %s (%d %s)", this.requestId, super.getMessage(), this.getStatusCode(), + this.getResponsePhrase() + ); + } + +} diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcSardineResponseHandler.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcSardineResponseHandler.java new file mode 100644 index 000000000..358895b43 --- /dev/null +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcSardineResponseHandler.java @@ -0,0 +1,42 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.service.gdc; + +import com.github.sardine.impl.SardineException; +import com.github.sardine.impl.handler.ValidatingResponseHandler; +import org.apache.http.Header; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.StatusLine; +import org.apache.http.client.ResponseHandler; + +import java.io.IOException; + +import static com.gooddata.sdk.common.gdc.Header.GDC_REQUEST_ID; + +/** + * A basic validation response handler that extends the functionality of {@link ValidatingResponseHandler} + * about the addition of X-GDC-REQUEST header to exception. + */ +class GdcSardineResponseHandler implements ResponseHandler { + + @Override + public Void handleResponse(final HttpResponse response) throws IOException { + final StatusLine statusLine = response.getStatusLine(); + final int statusCode = statusLine.getStatusCode(); + if (statusCode >= HttpStatus.SC_OK && statusCode < HttpStatus.SC_MULTIPLE_CHOICES) { + return null; + } + final Header requestIdHeader = response.getFirstHeader(GDC_REQUEST_ID); + if (requestIdHeader != null) { + throw new GdcSardineException(requestIdHeader.getValue(), "Unexpected response", statusLine.getStatusCode(), + statusLine.getReasonPhrase() + ); + } else { + throw new SardineException("Unexpected response", statusLine.getStatusCode(), statusLine.getReasonPhrase()); + } + } +} diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcService.java index 2d7755c11..028722f80 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/gdc/GdcService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/hierarchicalconfig/HierarchicalConfigService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/hierarchicalconfig/HierarchicalConfigService.java index 6b4d42b8e..fb41e12c5 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/hierarchicalconfig/HierarchicalConfigService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/hierarchicalconfig/HierarchicalConfigService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2021, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -20,7 +20,7 @@ /** * Provides hierarchical configuration management a.k.a. platform settings a.k.a. feature flags. - * For more detailed description, see this documentation https://help.gooddata.com/api#/reference/hierarchical-configuration + * For more detailed description, see this documentation ... */ public class HierarchicalConfigService extends AbstractService { @@ -54,7 +54,7 @@ public ConfigItems listProjectConfigItems(final Project project) { /** * Returns config item for given project (even if it's inherited from its hierarchy). * - * @param project project, cannot be null + * @param project project, cannot be null * @param configName unique name (key) of config item, cannot be empty * @return config item for given project with given name (key) */ @@ -73,7 +73,7 @@ public ConfigItem getProjectConfigItem(final Project project, final String confi /** * Creates or updates config item for given project. * - * @param project project for which the config item should be created/updated, cannot be null + * @param project project for which the config item should be created/updated, cannot be null * @param configItem config item to be created/updated, cannot be null * @return created/updated project config item */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/GoodDataHttpClientBuilder.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/GoodDataHttpClientBuilder.java index bef45833e..48e890e19 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/GoodDataHttpClientBuilder.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/GoodDataHttpClientBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,8 +7,8 @@ import com.gooddata.sdk.service.GoodDataEndpoint; import com.gooddata.sdk.service.GoodDataSettings; -import org.apache.http.client.HttpClient; -import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; /** * Custom GoodData http client builder providing custom functionality by descendants of @@ -20,7 +20,7 @@ public interface GoodDataHttpClientBuilder { /** * Builds {@link HttpClient} from given builder, configured to connect to given endpoint applying given settings. * - * @param builder pre-configured builder + * @param builder pre-configured builder * @param endpoint endpoint of GoodData API * @param settings settings * @return configured http client. diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/LoginPasswordGoodDataRestProvider.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/LoginPasswordGoodDataRestProvider.java index 0ae40d17d..58ae9ebde 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/LoginPasswordGoodDataRestProvider.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/LoginPasswordGoodDataRestProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,25 +10,26 @@ import com.gooddata.http.client.SSTRetrievalStrategy; import com.gooddata.sdk.service.GoodDataEndpoint; import com.gooddata.sdk.service.GoodDataSettings; -import org.apache.http.HttpHost; -import org.apache.http.client.HttpClient; -import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.core5.http.HttpHost; import static com.gooddata.sdk.common.util.Validate.notNull; /** * The default {@link com.gooddata.sdk.service.GoodDataRestProvider} used internally by {@link com.gooddata.sdk.service.GoodData}. * Provides configured single endpoint REST connection using standard GoodData login and password authentication. - * - * See https://help.gooddata.com/display/API/API+Reference#/reference/authentication/log-in + *

    + * See ... */ public final class LoginPasswordGoodDataRestProvider extends SingleEndpointGoodDataRestProvider { /** * Creates new instance. + * * @param endpoint endpoint of GoodData API * @param settings settings - * @param login API user login + * @param login API user login * @param password API user password */ public LoginPasswordGoodDataRestProvider(final GoodDataEndpoint endpoint, final GoodDataSettings settings, @@ -38,9 +39,10 @@ public LoginPasswordGoodDataRestProvider(final GoodDataEndpoint endpoint, final /** * Creates http client using given builder and endpoint, authenticating by login and password. - * @param builder builder to build client from + * + * @param builder builder to build client from * @param endpoint API endpoint to connect client to - * @param login login + * @param login login * @param password password * @return configured http client */ @@ -53,7 +55,7 @@ public static HttpClient createHttpClient(final HttpClientBuilder builder, final final HttpClient httpClient = builder.build(); final SSTRetrievalStrategy strategy = new LoginSSTRetrievalStrategy(login, password); - final HttpHost httpHost = new HttpHost(endpoint.getHostname(), endpoint.getPort(), endpoint.getProtocol()); + final HttpHost httpHost = new HttpHost(endpoint.getProtocol(), endpoint.getHostname(), endpoint.getPort()); return new GoodDataHttpClient(httpClient, httpHost, strategy); } } diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/RestTemplateUriPrefixingClientHttpRequestFactory.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/RestTemplateUriPrefixingClientHttpRequestFactory.java new file mode 100644 index 000000000..afdcb0e6b --- /dev/null +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/RestTemplateUriPrefixingClientHttpRequestFactory.java @@ -0,0 +1,44 @@ +/* + * (C) 2025 GoodData Corporation. + * This source code is licensed under the BSD-style license found in the + * LICENSE.txt file in the root directory of this source tree. + */ +package com.gooddata.sdk.service.httpcomponents; + +import com.gooddata.sdk.common.UriPrefixer; +import org.springframework.http.HttpMethod; +import org.springframework.http.client.AbstractClientHttpRequestFactoryWrapper; +import org.springframework.http.client.ClientHttpRequest; +import org.springframework.http.client.ClientHttpRequestFactory; + +import java.io.IOException; +import java.net.URI; + +import static com.gooddata.sdk.common.util.Validate.notNull; + +/** + * {@link ClientHttpRequestFactory} wrapper that prefixes relative URIs with the GoodData API endpoint. + *

    + * RestTemplate requires absolute URIs, while the SDK uses relative paths everywhere. The historical + * {@code UriPrefixingClientHttpRequestFactory} from rest-common handled this for HttpClient4. As part of + * the HttpClient5 migration we keep the same behaviour locally while delegating to the HttpClient5-aware + * request factory provided by Spring. + */ +class RestTemplateUriPrefixingClientHttpRequestFactory extends AbstractClientHttpRequestFactoryWrapper { + + private final UriPrefixer prefixer; + + RestTemplateUriPrefixingClientHttpRequestFactory(final ClientHttpRequestFactory requestFactory, + final URI endpointUri) { + super(notNull(requestFactory, "requestFactory")); + final URI apiEndpoint = notNull(endpointUri, "endpointUri"); + this.prefixer = new UriPrefixer(apiEndpoint); + } + + @Override + protected ClientHttpRequest createRequest(final URI uri, final HttpMethod httpMethod, + final ClientHttpRequestFactory requestFactory) throws IOException { + final URI targetUri = uri.isAbsolute() ? uri : prefixer.mergeUris(uri); + return requestFactory.createRequest(targetUri, httpMethod); + } +} diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/SingleEndpointGoodDataRestProvider.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/SingleEndpointGoodDataRestProvider.java index 8fdbfe990..51e93677e 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/SingleEndpointGoodDataRestProvider.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/SingleEndpointGoodDataRestProvider.java @@ -1,24 +1,33 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ package com.gooddata.sdk.service.httpcomponents; -import com.gooddata.sdk.common.UriPrefixingClientHttpRequestFactory; -import com.gooddata.sdk.service.*; + +import com.gooddata.sdk.common.HttpClient5ComponentsClientHttpRequestFactory; +import com.gooddata.sdk.service.DeprecationWarningRequestInterceptor; +import com.gooddata.sdk.service.GoodDataEndpoint; +import com.gooddata.sdk.service.GoodDataRestProvider; +import com.gooddata.sdk.service.GoodDataSettings; +import com.gooddata.sdk.service.HeaderSettingRequestInterceptor; +import com.gooddata.sdk.service.RequestIdInterceptor; +import com.gooddata.sdk.service.ResponseMissingRequestIdInterceptor; import com.gooddata.sdk.service.gdc.DataStoreService; import com.gooddata.sdk.service.retry.RetryableRestTemplate; import com.gooddata.sdk.service.util.ResponseErrorHandler; -import org.apache.http.client.HttpClient; -import org.apache.http.client.config.CookieSpecs; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.config.SocketConfig; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.cookie.StandardCookieSpec; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder; +import org.apache.hc.core5.http.io.SocketConfig; +import org.apache.hc.core5.util.Timeout; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; import java.util.Optional; @@ -31,23 +40,21 @@ * {@link GoodDataRestProvider} capable to be used with single API endpoint using the * Apache {@link HttpClient} to perform HTTP operations. It provides following functionality: *

      - *
    • Prepends the URI path with API endpoint (using {@link UriPrefixingClientHttpRequestFactory}
    • + *
    • Prepends the URI path with API endpoint (using {@link RestTemplateUriPrefixingClientHttpRequestFactory}
    • *
    • Configures {@link ResponseErrorHandler}
    • *
    • Configures connection according to {@link GoodDataSettings}
    • *
    • Set default headers from {@link GoodDataSettings} including User-Agent
    • *
    • Configures retries in case it's requested
    • *
    - * + *

    * To provide complete implementation, this class must be extended and descendants should implement own logic by providing - * {@link GoodDataHttpClientBuilder} to the constructor. Namely the authentication logic remains to be provided by descendants. + * {@link GoodDataHttpClientBuilder} to the constructor. Namely, the authentication logic remains to be provided by descendants. */ public abstract class SingleEndpointGoodDataRestProvider implements GoodDataRestProvider { - private final Logger logger = LoggerFactory.getLogger(SingleEndpointGoodDataRestProvider.class); - protected final GoodDataEndpoint endpoint; protected final GoodDataSettings settings; - + private final Logger logger = LoggerFactory.getLogger(SingleEndpointGoodDataRestProvider.class); protected HttpClient httpClient; protected RestTemplate restTemplate; @@ -56,7 +63,7 @@ public abstract class SingleEndpointGoodDataRestProvider implements GoodDataRest * * @param endpoint API endpoint * @param settings settings - * @param builder custom GoodData http client builder + * @param builder custom GoodData http client builder */ protected SingleEndpointGoodDataRestProvider(final GoodDataEndpoint endpoint, final GoodDataSettings settings, final GoodDataHttpClientBuilder builder) { @@ -103,8 +110,9 @@ public HttpClient getHttpClient() { /** * Creates configured REST template - * @param endpoint API endpoint - * @param settings settings + * + * @param endpoint API endpoint + * @param settings settings * @param httpClient http client to build RestTemplate on * @return configured REST template */ @@ -113,9 +121,10 @@ protected RestTemplate createRestTemplate(final GoodDataEndpoint endpoint, final notNull(settings, "settings"); this.httpClient = notNull(httpClient, "httpClient"); - final UriPrefixingClientHttpRequestFactory factory = new UriPrefixingClientHttpRequestFactory( - new HttpComponentsClientHttpRequestFactory(httpClient), - endpoint.toUri() + final ClientHttpRequestFactory httpClientFactory = new HttpClient5ComponentsClientHttpRequestFactory(httpClient); + final ClientHttpRequestFactory factory = new RestTemplateUriPrefixingClientHttpRequestFactory( + httpClientFactory, + java.net.URI.create(endpoint.toUri()) ); final RestTemplate restTemplate; @@ -135,27 +144,32 @@ protected RestTemplate createRestTemplate(final GoodDataEndpoint endpoint, final /** * Creates http client builder, applying given settings. + * * @param settings settings to apply * @return configured builder */ protected HttpClientBuilder createHttpClientBuilder(final GoodDataSettings settings) { - final PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(); - connectionManager.setDefaultMaxPerRoute(settings.getMaxConnections()); - connectionManager.setMaxTotal(settings.getMaxConnections()); - - final SocketConfig.Builder socketConfig = SocketConfig.copy(SocketConfig.DEFAULT); - socketConfig.setSoTimeout(settings.getSocketTimeout()); - connectionManager.setDefaultSocketConfig(socketConfig.build()); - - final RequestConfig.Builder requestConfig = RequestConfig.copy(RequestConfig.DEFAULT); - requestConfig.setConnectTimeout(settings.getConnectionTimeout()); - requestConfig.setConnectionRequestTimeout(settings.getConnectionRequestTimeout()); - requestConfig.setSocketTimeout(settings.getSocketTimeout()); - requestConfig.setCookieSpec(CookieSpecs.STANDARD); + // Create connection manager using HttpClient 5.x builder pattern + final PoolingHttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create() + .setDefaultSocketConfig(SocketConfig.custom() + .setSoTimeout(Timeout.ofMilliseconds(settings.getSocketTimeout())) + .build()) + .setMaxConnPerRoute(settings.getMaxConnections()) + .setMaxConnTotal(settings.getMaxConnections()) + .build(); + + // Create request config using HttpClient 5.x APIs + final RequestConfig requestConfig = RequestConfig.custom() + .setConnectionRequestTimeout(Timeout.ofMilliseconds(settings.getConnectionRequestTimeout())) + .setResponseTimeout(Timeout.ofMilliseconds(settings.getSocketTimeout())) + .setCookieSpec(StandardCookieSpec.STRICT) + .build(); return HttpClientBuilder.create() .setUserAgent(settings.getGoodDataUserAgent()) .setConnectionManager(connectionManager) - .setDefaultRequestConfig(requestConfig.build()); + .addRequestInterceptorFirst(new RequestIdInterceptor()) + .addResponseInterceptorFirst(new ResponseMissingRequestIdInterceptor()) + .setDefaultRequestConfig(requestConfig); } } diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/SstGoodDataRestProvider.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/SstGoodDataRestProvider.java index a376b9f66..a66baa7cb 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/SstGoodDataRestProvider.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/httpcomponents/SstGoodDataRestProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -10,9 +10,9 @@ import com.gooddata.http.client.SimpleSSTRetrievalStrategy; import com.gooddata.sdk.service.GoodDataEndpoint; import com.gooddata.sdk.service.GoodDataSettings; -import org.apache.http.HttpHost; -import org.apache.http.client.HttpClient; -import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.hc.client5.http.classic.HttpClient; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.core5.http.HttpHost; import static com.gooddata.sdk.common.util.Validate.notNull; @@ -24,9 +24,10 @@ public final class SstGoodDataRestProvider extends SingleEndpointGoodDataRestPro /** * Create SST REST provider + * * @param endpoint endpoint of GoodData API * @param settings settings - * @param sst super secure token + * @param sst super secure token */ public SstGoodDataRestProvider(final GoodDataEndpoint endpoint, final GoodDataSettings settings, final String sst) { super(endpoint, settings, (b, e, s) -> createHttpClient(b, e, sst)); @@ -34,9 +35,10 @@ public SstGoodDataRestProvider(final GoodDataEndpoint endpoint, final GoodDataSe /** * Creates http client using given builder and endpoint, authenticating by sst. - * @param builder builder to build client from + * + * @param builder builder to build client from * @param endpoint API endpoint to connect client to - * @param sst token used for authentication + * @param sst token used for authentication * @return configured http client */ public static HttpClient createHttpClient(HttpClientBuilder builder, GoodDataEndpoint endpoint, String sst) { @@ -46,7 +48,7 @@ public static HttpClient createHttpClient(HttpClientBuilder builder, GoodDataEnd final HttpClient httpClient = builder.build(); final SSTRetrievalStrategy strategy = new SimpleSSTRetrievalStrategy(sst); - final HttpHost httpHost = new HttpHost(endpoint.getHostname(), endpoint.getPort(), endpoint.getProtocol()); + final HttpHost httpHost = new HttpHost(endpoint.getProtocol(), endpoint.getHostname(), endpoint.getPort()); return new GoodDataHttpClient(httpClient, httpHost, strategy); } } diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/lcm/LcmService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/lcm/LcmService.java index 65b540dbe..aa93b7e67 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/lcm/LcmService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/lcm/LcmService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -8,8 +8,8 @@ import com.gooddata.sdk.common.GoodDataException; import com.gooddata.sdk.common.collections.CustomPageRequest; import com.gooddata.sdk.common.collections.Page; -import com.gooddata.sdk.common.collections.PageRequest; import com.gooddata.sdk.common.collections.PageBrowser; +import com.gooddata.sdk.common.collections.PageRequest; import com.gooddata.sdk.common.util.SpringMutableUri; import com.gooddata.sdk.model.account.Account; import com.gooddata.sdk.model.lcm.LcmEntities; @@ -35,8 +35,9 @@ public class LcmService extends AbstractService { /** * Constructs service for GoodData Life Cycle Management. + * * @param restTemplate RESTful HTTP Spring template - * @param settings settings + * @param settings settings */ public LcmService(final RestTemplate restTemplate, final GoodDataSettings settings) { super(restTemplate, settings); @@ -62,7 +63,7 @@ public PageBrowser listLcmEntities(final Account account) { * over all pages, or {@link PageBrowser#getAllItems()} to load the entire list. * * @param account account to list LCM entities for - * @param filter filter of the entities + * @param filter filter of the entities * @return {@link PageBrowser} first page of list of lcm entitiesor empty list */ public PageBrowser listLcmEntities(final Account account, final LcmEntityFilter filter) { @@ -74,7 +75,7 @@ public PageBrowser listLcmEntities(final Account account, final LcmEn * Returns empty list in case there is no {@link LcmEntity}. * Returns requested page (by page limit and offset). Use {@link #listLcmEntities(Account)} to get first page with default setting. * - * @param account account to list LCM entities for + * @param account account to list LCM entities for * @param startPage page to be listed * @return {@link PageBrowser} requested page of list of lcm entities or empty list */ @@ -87,8 +88,8 @@ public PageBrowser listLcmEntities(final Account account, final PageR * Returns empty list in case there is no {@link LcmEntity}. * Returns requested page (by page limit and offset). Use {@link #listLcmEntities(Account)} to get first page with default setting. * - * @param account account to list LCM entities for - * @param filter filter of the entities + * @param account account to list LCM entities for + * @param filter filter of the entities * @param startPage page to be listed * @return {@link PageBrowser} requested page of list of lcm entities or empty list */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/MetadataService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/MetadataService.java index 92e766c74..e34b82703 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/MetadataService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/MetadataService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,7 +7,25 @@ import com.gooddata.sdk.common.GoodDataException; import com.gooddata.sdk.common.GoodDataRestException; -import com.gooddata.sdk.model.md.*; +import com.gooddata.sdk.model.md.Attribute; +import com.gooddata.sdk.model.md.AttributeElement; +import com.gooddata.sdk.model.md.AttributeElements; +import com.gooddata.sdk.model.md.BulkGet; +import com.gooddata.sdk.model.md.BulkGetUris; +import com.gooddata.sdk.model.md.DisplayForm; +import com.gooddata.sdk.model.md.Entry; +import com.gooddata.sdk.model.md.IdentifierToUri; +import com.gooddata.sdk.model.md.IdentifiersAndUris; +import com.gooddata.sdk.model.md.InUseMany; +import com.gooddata.sdk.model.md.Obj; +import com.gooddata.sdk.model.md.Query; +import com.gooddata.sdk.model.md.Queryable; +import com.gooddata.sdk.model.md.Restriction; +import com.gooddata.sdk.model.md.Service; +import com.gooddata.sdk.model.md.Updatable; +import com.gooddata.sdk.model.md.Usage; +import com.gooddata.sdk.model.md.UseMany; +import com.gooddata.sdk.model.md.UseManyEntries; import com.gooddata.sdk.model.md.report.ReportDefinition; import com.gooddata.sdk.model.project.Project; import com.gooddata.sdk.service.AbstractService; @@ -18,12 +36,20 @@ import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriTemplate; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import static com.gooddata.sdk.common.util.Validate.noNullElements; +import static com.gooddata.sdk.common.util.Validate.notEmpty; import static com.gooddata.sdk.common.util.Validate.notNull; import static com.gooddata.sdk.common.util.Validate.notNullState; +import static com.gooddata.sdk.model.md.Service.TIMEZONE_URI; import static java.util.Arrays.asList; /** @@ -45,11 +71,11 @@ public MetadataService(final RestTemplate restTemplate, final GoodDataSettings s * @param obj metadata object to be created * @param type of the object to be created * @return new metadata object - * @throws ObjCreateException if creation failed - * @throws ObjNotFoundException if new metadata object not found after creation - * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code when getting - * the new object - * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error when getting the new object + * @throws ObjCreateException if creation failed + * @throws ObjNotFoundException if new metadata object not found after creation + * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code when getting + * the new object + * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error when getting the new object */ @SuppressWarnings("unchecked") public T createObj(Project project, T obj) { @@ -59,7 +85,7 @@ public T createObj(Project project, T obj) { final T response; try { - response = restTemplate.postForObject(Obj.CREATE_WITH_ID_URI, obj, (Class)obj.getClass(), project.getId()); + response = restTemplate.postForObject(Obj.CREATE_WITH_ID_URI, obj, (Class) obj.getClass(), project.getId()); } catch (GoodDataRestException | RestClientException e) { throw new ObjCreateException(obj, e); } @@ -77,9 +103,9 @@ public T createObj(Project project, T obj) { * @param cls class of the resulting object * @param type of the object to be returned * @return the metadata object - * @throws ObjNotFoundException if metadata object not found - * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code - * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error + * @throws ObjNotFoundException if metadata object not found + * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code + * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error */ public T getObjByUri(String uri, Class cls) { notNull(uri, "uri"); @@ -107,7 +133,7 @@ public T getObjByUri(String uri, Class cls) { * Retrieves a collection of objects corresponding to the supplied collection of URIs. * * @param project project that contains the objects to be retrieved - * @param uris collection of URIs + * @param uris collection of URIs * @return collection of metadata objects corresponding to the supplied URIs */ public Collection getObjsByUris(Project project, Collection uris) { @@ -152,9 +178,9 @@ public T updateObj(T obj) { * Remove metadata object URI * * @param obj metadata object to remove - * @throws ObjNotFoundException if metadata object not found - * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code - * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error + * @throws ObjNotFoundException if metadata object not found + * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code + * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error */ public void removeObj(Obj obj) { notNull(obj, "obj"); @@ -176,9 +202,9 @@ public void removeObj(Obj obj) { * Remove metadata object by URI (format is /gdc/md/{PROJECT_ID}/obj/{OBJECT_ID}) * * @param uri URI in format /gdc/md/{PROJECT_ID}/obj/{OBJECT_ID} - * @throws ObjNotFoundException if metadata object not found - * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code - * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error + * @throws ObjNotFoundException if metadata object not found + * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code + * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error */ public void removeObjByUri(String uri) { notNull(uri, "uri"); @@ -203,9 +229,9 @@ public void removeObjByUri(String uri) { * @param cls class of the resulting object * @param type of the object to be returned * @return the metadata object - * @throws ObjNotFoundException if metadata object not found - * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code - * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error + * @throws ObjNotFoundException if metadata object not found + * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code + * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error */ public T getObjById(Project project, String id, Class cls) { notNull(project, "project"); @@ -307,6 +333,7 @@ public Collection findUris(Project project, /** * Find all objects which use the given object. + * * @param project project * @param obj object to find using objects for * @param nearest find nearest objects only @@ -322,6 +349,7 @@ public Collection usedBy(Project project, Obj obj, boolean nearest, Class /** * Find all objects which use the given object. + * * @param project project * @param uri URI of object to find using objects for * @param nearest find nearest objects only @@ -335,12 +363,13 @@ public Collection usedBy(Project project, String uri, boolean nearest, Cl notNull(uri, "uri"); notNull(project, "project"); - final Collection usages = usedBy(project, asList(uri), nearest, types); - return usages.size() > 0 ? usages.iterator().next().getUsedBy() : Collections.emptyList(); + final Collection usages = usedBy(project, List.of(uri), nearest, types); + return !usages.isEmpty() ? usages.iterator().next().getUsedBy() : Collections.emptyList(); } /** * Find all objects which use the given objects. Batch alternative to {@link #usedBy(Project, String, boolean, Class[])} + * * @param project project * @param uris URIs of object to find using objects for * @param nearest find nearest objects only @@ -376,11 +405,11 @@ public Collection usedBy(Project project, Collection uris, boolea * @throws com.gooddata.sdk.common.GoodDataException if unable to query metadata */ public Collection findUris(Project project, Restriction... restrictions) { - notNull(project, "project" ); + notNull(project, "project"); noNullElements(restrictions, "restrictions"); final List ids = new ArrayList<>(restrictions.length); - for (Restriction restriction: restrictions) { + for (Restriction restriction : restrictions) { if (!Restriction.Type.IDENTIFIER.equals(restriction.getType())) { throw new IllegalArgumentException("All restrictions have to be of type " + Restriction.Type.IDENTIFIER); } @@ -400,7 +429,7 @@ public Collection findUris(Project project, Restriction... restrictions) * @see #findUris(Project, Restriction...) */ public Map identifiersToUris(Project project, Collection identifiers) { - notNull(project, "project" ); + notNull(project, "project"); noNullElements(identifiers, "identifiers"); return getUrisForIdentifiers(project, identifiers).asIdentifierToUri(); @@ -440,6 +469,56 @@ public List getAttributeElements(DisplayForm displayForm) { } } + /** + * Get project/workspace timezone. + * + * @param project project from what to return the timezone + * @return string identifier of the timezone (see IANA/Olson tz database for possible values) + * @throws com.gooddata.sdk.common.GoodDataRestException if GoodData REST API returns unexpected status code + * @throws com.gooddata.sdk.common.GoodDataException if no response from API or client-side HTTP error + */ + public String getTimezone(final Project project) { + notNull(project, "project"); + notNull(project.getId(), "project.id"); + + try { + final Service result = restTemplate.getForObject(TIMEZONE_URI, Service.class, project.getId()); + + if (result != null) { + return result.getTimezone(); + } else { + throw new GoodDataException("Received empty response from API call."); + } + } catch (RestClientException e) { + throw new GoodDataException("Unable to get timezone of project/workspace " + project.getId(), e); + } + } + + /** + * Set project/workspace timezone. + * + * @param project the project/workspace where to set the timezone + * @param timezone the timezone to be set (see IANA/Olson tz database for possible values) + */ + public void setTimezone(final Project project, final String timezone) { + notNull(project, "project"); + notNull(project.getId(), "project.id"); + notNull(timezone, "timezone"); + notEmpty(timezone, "timezone"); + + try { + final Service result = restTemplate.postForObject(TIMEZONE_URI, new Service(timezone), Service.class, + project.getId()); + + if (result == null) { + throw new GoodDataException("Unexpected empty result from API call."); + } + } catch (RestClientException e) { + throw new GoodDataException("Unable to set timezone of project/workspace " + project.getId(), e); + } + } + + private Collection filterEntries(Collection entries, Restriction... restrictions) { if (restrictions == null || restrictions.length == 0) { return entries; diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/NonUniqueObjException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/NonUniqueObjException.java index 7f58e75c1..523646170 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/NonUniqueObjException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/NonUniqueObjException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjCreateException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjCreateException.java index 291da9f12..a08f3ec8b 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjCreateException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjCreateException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjNotFoundException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjNotFoundException.java index 42164a311..939b73705 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjNotFoundException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjUpdateException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjUpdateException.java index 72d955a86..e260d9397 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjUpdateException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/ObjUpdateException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/maintenance/ExportImportException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/maintenance/ExportImportException.java index a17ee1f7a..95043d64b 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/maintenance/ExportImportException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/maintenance/ExportImportException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/maintenance/ExportImportService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/maintenance/ExportImportService.java index fc06e45ae..68020c323 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/md/maintenance/ExportImportService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/md/maintenance/ExportImportService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2020, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -9,14 +9,24 @@ import com.gooddata.sdk.model.dataset.TaskState; import com.gooddata.sdk.model.gdc.TaskStatus; import com.gooddata.sdk.model.gdc.UriResponse; -import com.gooddata.sdk.model.md.maintenance.*; +import com.gooddata.sdk.model.md.maintenance.ExportProject; +import com.gooddata.sdk.model.md.maintenance.ExportProjectArtifact; +import com.gooddata.sdk.model.md.maintenance.ExportProjectToken; +import com.gooddata.sdk.model.md.maintenance.PartialMdArtifact; +import com.gooddata.sdk.model.md.maintenance.PartialMdExport; +import com.gooddata.sdk.model.md.maintenance.PartialMdExportToken; import com.gooddata.sdk.model.project.Project; -import com.gooddata.sdk.service.*; +import com.gooddata.sdk.service.AbstractPollHandler; +import com.gooddata.sdk.service.AbstractService; +import com.gooddata.sdk.service.FutureResult; +import com.gooddata.sdk.service.GoodDataSettings; +import com.gooddata.sdk.service.PollResult; import org.springframework.http.client.ClientHttpResponse; import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; import java.io.IOException; +import java.util.Objects; import static com.gooddata.sdk.common.util.Validate.notNull; import static com.gooddata.sdk.common.util.Validate.notNullState; @@ -35,7 +45,7 @@ public ExportImportService(final RestTemplate restTemplate, final GoodDataSettin * Exports partial metadata from project and returns token identifying this export * * @param project project from which metadata should be exported - * @param export export configuration to execute + * @param export export configuration to execute * @return {@link FutureResult} of the task containing token identifying partial export after the task is completed * @throws ExportImportException when export resource call fails, polling on export status fails or export status is ERROR */ @@ -52,7 +62,7 @@ public FutureResult partialExport(Project project, final P } return new PollResult<>(this, new AbstractPollHandler( - notNullState(partialMdArtifact, "partial export response").getStatusUri(), + notNullState(Objects.requireNonNull(partialMdArtifact), "partial export response").getStatusUri(), TaskStatus.class, PartialMdExportToken.class) { @Override public void handlePollResult(TaskStatus pollResult) { @@ -72,7 +82,7 @@ public void handlePollException(GoodDataRestException e) { /** * Imports partial metadata to project based on given token * - * @param project project to which metadata should be imported + * @param project project to which metadata should be imported * @param mdExportToken export token to be imported * @return {@link FutureResult} of the task * @throws ExportImportException when import resource call fails, polling on import status fails or import status is ERROR @@ -90,7 +100,7 @@ public FutureResult partialImport(Project project, PartialMdExportToken md + "' with token '" + mdExportToken.getToken() + "'.", e); } - return new PollResult<>(this, new AbstractPollHandler(notNullState(importResponse, "partial import response").getUri(), + return new PollResult<>(this, new AbstractPollHandler(notNullState(Objects.requireNonNull(importResponse), "partial import response").getUri(), TaskStatus.class, Void.class) { @Override public void handlePollResult(TaskStatus pollResult) { @@ -131,7 +141,7 @@ public FutureResult exportProject(final Project project, fin } return new PollResult<>(this, new AbstractPollHandler( - notNullState(exportProjectArtifact, "export response").getStatusUri(), + notNullState(Objects.requireNonNull(exportProjectArtifact), "export response").getStatusUri(), TaskState.class, ExportProjectToken.class) { @Override @@ -163,7 +173,7 @@ public void handlePollException(GoodDataRestException e) { /** * Imports complete project based on given token * - * @param project project to which metadata should be imported + * @param project project to which metadata should be imported * @param exportToken export token to be imported * @return {@link FutureResult} of the task * @throws ExportImportException when import resource call fails, polling on import status fails or import status is ERROR @@ -183,7 +193,7 @@ public FutureResult importProject(final Project project, final ExportProje } return new PollResult<>(this, new AbstractPollHandler( - notNullState(importResponse, "project import response").getUri(), + notNullState(Objects.requireNonNull(importResponse), "project import response").getUri(), TaskState.class, Void.class) { @Override public void handlePollResult(TaskState pollResult) { diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/notification/NotificationService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/notification/NotificationService.java index d3f330641..10b380631 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/notification/NotificationService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/notification/NotificationService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -33,7 +33,7 @@ public NotificationService(final RestTemplate restTemplate, final GoodDataSettin * Triggers given project event. * * @param project project of the event - * @param event event to trigger + * @param event event to trigger */ public void triggerEvent(final Project project, final ProjectEvent event) { notNull(project, "project"); @@ -84,8 +84,8 @@ public void removeChannel(final Channel channel) { /** * Create subscription for notifications * - * @param project to create subscription on - * @param account to create subscription for + * @param project to create subscription on + * @param account to create subscription for * @param subscription to create * @return created subscription */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectNotFoundException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectNotFoundException.java index 06851e520..37f5f7774 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectNotFoundException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectService.java index c856ddf01..4ca58de5c 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -7,6 +7,7 @@ import com.gooddata.sdk.common.GoodDataException; import com.gooddata.sdk.common.GoodDataRestException; +import com.gooddata.sdk.common.collections.CustomPageRequest; import com.gooddata.sdk.common.collections.Page; import com.gooddata.sdk.common.collections.PageBrowser; import com.gooddata.sdk.common.collections.PageRequest; @@ -50,6 +51,7 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; +import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; @@ -79,9 +81,10 @@ public class ProjectService extends AbstractService { /** * Constructs service for GoodData project management (list projects, create a project, ...). + * * @param restTemplate RESTful HTTP Spring template * @param accountService GoodData account service - * @param settings settings + * @param settings settings */ public ProjectService(final RestTemplate restTemplate, final AccountService accountService, final GoodDataSettings settings) { @@ -89,6 +92,29 @@ public ProjectService(final RestTemplate restTemplate, final AccountService acco this.accountService = notNull(accountService, "accountService"); } + private static URI getProjectsUri(final String userId) { + notEmpty(userId, "userId"); + return LIST_PROJECTS_TEMPLATE.expand(userId); + } + + private static URI getProjectsUri(final String userId, final PageRequest page) { + return page.getPageUri(new SpringMutableUri(getProjectsUri(userId))); + } + + private static URI getUsersUri(final Project project) { + notNull(project.getId(), "project.id"); + return PROJECT_USERS_TEMPLATE.expand(project.getId()); + } + + private static URI getUsersUri(final Project project, final PageRequest page) { + return page.getPageUri(new SpringMutableUri(getUsersUri(project))); + } + + private static URI getUserUri(final Project project, final Account account) { + notNull(account.getId(), "account.id"); + return PROJECT_USER_TEMPLATE.expand(project.getId(), account.getId()); + } + /** * Get all projects current user has access to. * @@ -124,6 +150,30 @@ public PageBrowser listProjects(final PageRequest startPage) { return new PageBrowser<>(startPage, page -> listProjects(getProjectsUri(userId, page))); } + /** + * Get defined page of paged list of projects that given user/account has access to. + * + * @param account user whose projects will be returned + * @param startPage page to be retrieved + * @return {@link PageBrowser} list of found projects for given user or empty list + */ + public PageBrowser listProjects(final Account account, final PageRequest startPage) { + notNull(startPage, "startPage"); + notNull(account, "account"); + notEmpty(account.getId(), "account.uri"); + return new PageBrowser<>(startPage, page -> listProjects(getProjectsUri(account.getId(), page))); + } + + /** + * Get browser of projects that given user/account has access to. + * + * @param account user whose projects will be returned + * @return {@link PageBrowser} list of found projects for given user or empty list + */ + public PageBrowser listProjects(final Account account) { + return listProjects(account, new CustomPageRequest()); + } + private Page listProjects(final URI uri) { try { final Projects projects = restTemplate.getForObject(uri, Projects.class); @@ -136,15 +186,6 @@ private Page listProjects(final URI uri) { } } - private static URI getProjectsUri(final String userId) { - notEmpty(userId, "userId"); - return LIST_PROJECTS_TEMPLATE.expand(userId); - } - - private static URI getProjectsUri(final String userId, final PageRequest page) { - return page.getPageUri(new SpringMutableUri(getProjectsUri(userId))); - } - /** * Create new project. * @@ -224,6 +265,7 @@ public Project getProjectById(String id) { /** * Removes given project + * * @param project project to be removed * @throws com.gooddata.sdk.common.GoodDataException when project can't be deleted */ @@ -281,7 +323,7 @@ public FutureResult validateProject(final Project proj /** * Validate project with given validations * - * @param project project to validate + * @param project project to validate * @param validations validations to use * @return results of validation */ @@ -292,7 +334,7 @@ public FutureResult validateProject(final Project proj /** * Validate project with given validations * - * @param project project to validate + * @param project project to validate * @param validations validations to use * @return results of validation */ @@ -309,7 +351,7 @@ public FutureResult validateProject(final Project proj return new PollResult<>(this, // PollHandler able to poll on different URIs (by the Location header) // poll class is Void because the object returned varies between invocations (even on the same URI) - new AbstractPollHandler(notNullState(task, "project validation task").getUri(), + new AbstractPollHandler(notNullState(Objects.requireNonNull(task), "project validation task").getUri(), Void.class, ProjectValidationResults.class) { @Override @@ -377,23 +419,9 @@ private Page listUsers(final URI uri) { } } - private static URI getUsersUri(final Project project) { - notNull(project.getId(), "project.id"); - return PROJECT_USERS_TEMPLATE.expand(project.getId()); - } - - private static URI getUsersUri(final Project project, final PageRequest page) { - return page.getPageUri(new SpringMutableUri(getUsersUri(project))); - } - - private static URI getUserUri(final Project project, final Account account) { - notNull(account.getId(), "account.id"); - return PROJECT_USER_TEMPLATE.expand(project.getId(), account.getId()); - } - /** * Get set of user role by given project. - * + *

    * Note: This makes n+1 API calls to retrieve all role details. * * @param project project of roles @@ -443,7 +471,8 @@ public Role getRoleByUri(String uri) { /** * Send project invitations to users - * @param project target project + * + * @param project target project * @param invitations invitations * @return created invitation */ @@ -486,10 +515,11 @@ public User getUser(final Project project, final Account account) { } } - /** Add user in to the project + /** + * Add user in to the project * - * @param project where to add user - * @param account to be added + * @param project where to add user + * @param account to be added * @param userRoles list of user roles * @return user added to the project * @throws ProjectUsersUpdateException in case of failure @@ -514,8 +544,8 @@ public User addUserToProject(final Project project, final Account account, final */ private void validateRoleURIs(final Role[] userRoles) { final List invalidRoles = new ArrayList<>(); - for(Role role: userRoles) { - if(role.getUri() == null) { + for (Role role : userRoles) { + if (role.getUri() == null) { invalidRoles.add(role.getIdentifier()); } } @@ -528,7 +558,7 @@ private void validateRoleURIs(final Role[] userRoles) { * Update user in the project * * @param project in which to update user - * @param users to update + * @param users to update * @throws ProjectUsersUpdateException in case of failure */ public void updateUserInProject(final Project project, final User... users) { @@ -545,11 +575,46 @@ private void doPostProjectUsersUpdate(final Project project, final User... users try { final ProjectUsersUpdateResult projectUsersUpdateResult = restTemplate.postForObject(usersUri, new Users(users), ProjectUsersUpdateResult.class); - if (! notNullState(projectUsersUpdateResult, "projectUsersUpdateResult").getFailed().isEmpty()) { + if (!notNullState(projectUsersUpdateResult, "projectUsersUpdateResult").getFailed().isEmpty()) { throw new ProjectUsersUpdateException("Unable to update users: " + projectUsersUpdateResult.getFailed()); } } catch (RestClientException e) { throw new GoodDataException("Unable to update users in project", e); } } + + /** + * Removes given account from a project without checking if really account is in project. + *

    + * You can: + *

      + *
    • Remove yourself from a project (leave the project). You cannot leave the project if you are the only admin in the project.
    • + *
    • Remove another user from a project. You need to have the canSuspendUser permission in this project.
    • + *
    + *

    + * + * @param account account to be removed + * @param project project from user will be removed + * @throws com.gooddata.sdk.common.GoodDataException when account can't be removed + */ + public void removeUserFromProject(final Project project, final Account account) { + notNull(project, "project"); + notNull(project.getId(), "project.id"); + notNull(account, "account"); + notNull(account.getId(), "account.id"); + + try { + restTemplate.delete(getUserUri(project, account)); + } catch (GoodDataRestException e) { + if (HttpStatus.FORBIDDEN.value() == e.getStatusCode()) { + throw new GoodDataException("You cannot leave the project " + project.getId() + " if you are the only admin in it. You can make another user an admin in this project, and then re-issue the call.", e); + } else if (HttpStatus.METHOD_NOT_ALLOWED.value() == e.getStatusCode()) { + throw new GoodDataException("You either misspelled your user ID or tried to remove another user but did not have the canSuspendUser permission in this project. Check your ID in the request and your permissions in the project " + project.getId() + ", then re-issue the call.", e); + } else { + throw e; + } + } catch (RestClientException e) { + throw new GoodDataException("Unable to remove account " + account.getUri() + " from project " + project.getUri(), e); + } + } } diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectUsersUpdateException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectUsersUpdateException.java index 83f585c0c..1766dc415 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectUsersUpdateException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/ProjectUsersUpdateException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/RoleNotFoundException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/RoleNotFoundException.java index 205cca062..1b083dfed 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/RoleNotFoundException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/RoleNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/UserInProjectNotFoundException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/UserInProjectNotFoundException.java index 52749453a..d14ad5539 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/UserInProjectNotFoundException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/UserInProjectNotFoundException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/model/ModelException.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/model/ModelException.java index ebaa5f8a6..8cafc8d7b 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/model/ModelException.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/model/ModelException.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/model/ModelService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/model/ModelService.java index 10bbe5c5b..01228caac 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/project/model/ModelService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/project/model/ModelService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -13,7 +13,12 @@ import com.gooddata.sdk.model.project.model.MaqlDdl; import com.gooddata.sdk.model.project.model.MaqlDdlLinks; import com.gooddata.sdk.model.project.model.ModelDiff; -import com.gooddata.sdk.service.*; +import com.gooddata.sdk.service.AbstractPollHandlerBase; +import com.gooddata.sdk.service.AbstractService; +import com.gooddata.sdk.service.FutureResult; +import com.gooddata.sdk.service.GoodDataSettings; +import com.gooddata.sdk.service.PollResult; +import com.gooddata.sdk.service.SimplePollHandler; import com.gooddata.sdk.service.dataset.DatasetService; import org.springframework.http.client.ClientHttpResponse; import org.springframework.util.FileCopyUtils; @@ -25,10 +30,10 @@ import java.util.Collection; import java.util.LinkedList; -import static com.gooddata.sdk.common.util.Validate.notNullState; -import static com.gooddata.sdk.model.project.model.ModelDiff.UpdateScript; import static com.gooddata.sdk.common.util.Validate.noNullElements; import static com.gooddata.sdk.common.util.Validate.notNull; +import static com.gooddata.sdk.common.util.Validate.notNullState; +import static com.gooddata.sdk.model.project.model.ModelDiff.UpdateScript; import static java.util.Arrays.asList; /** @@ -106,7 +111,6 @@ public FutureResult updateProjectModel(Project project, UpdateScript updat * @param project project to be updated * @param maqlDdl update script to be executed in the project * @return poll result - * * @see DatasetService#updateProjectData */ public FutureResult updateProjectModel(final Project project, final String... maqlDdl) { @@ -119,7 +123,6 @@ public FutureResult updateProjectModel(final Project project, final String * @param project project to be updated * @param maqlDdl update script to be executed in the project * @return poll result - * * @see DatasetService#updateProjectData */ public FutureResult updateProjectModel(final Project project, final Collection maqlDdl) { @@ -148,7 +151,7 @@ private boolean executeNextMaqlChunk() { } try { final MaqlDdlLinks links = restTemplate.postForObject(MaqlDdl.URI, new MaqlDdl(maqlChunks.poll()), - MaqlDdlLinks.class, projectId); + MaqlDdlLinks.class, projectId); this.pollUri = notNullState(links, "maqlDdlLinks").getStatusUri(); } catch (GoodDataRestException | RestClientException e) { throw new ModelException("Unable to update project model", e); diff --git a/gooddata-java/src/main/java/com/gooddata/sdk/service/projecttemplate/ProjectTemplateService.java b/gooddata-java/src/main/java/com/gooddata/sdk/service/projecttemplate/ProjectTemplateService.java index f892e5d75..0ca90dca1 100644 --- a/gooddata-java/src/main/java/com/gooddata/sdk/service/projecttemplate/ProjectTemplateService.java +++ b/gooddata-java/src/main/java/com/gooddata/sdk/service/projecttemplate/ProjectTemplateService.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2019, GoodData(R) Corporation. All rights reserved. + * (C) 2025 GoodData Corporation. * This source code is licensed under the BSD-style license found in the * LICENSE.txt file in the root directory of this source tree. */ @@ -35,8 +35,9 @@ public class ProjectTemplateService extends AbstractService { /** * Sets RESTful HTTP Spring template. Should be called from constructor of concrete service extending * this abstract one. + * * @param restTemplate RESTful HTTP Spring template - * @param settings settings + * @param settings settings */ public ProjectTemplateService(final RestTemplate restTemplate, final GoodDataSettings settings) { super(restTemplate, settings); @@ -44,6 +45,7 @@ public ProjectTemplateService(final RestTemplate restTemplate, final GoodDataSet /** * List of all projects' templates + * * @return list of templates */ public Collection