diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index b2707f61..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,2 +0,0 @@ -* @xernobyl -* @JcMinarro diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 7bcc6037..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: build - -on: [pull_request] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} - cancel-in-progress: true - -jobs: - build: - name: πŸ§ͺ Test & lint - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '17' - - - name: Commit message lint - uses: wagoid/commitlint-github-action@v4 - - - name: Restore cache - uses: actions/cache@v3 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - name: Test - env: - STREAM_KEY: ${{ secrets.STREAM_KEY }} - STREAM_SECRET: ${{ secrets.STREAM_SECRET }} - STREAM_APP_ID: ${{ secrets.STREAM_APP_ID }} - run: | - ./gradlew spotlessCheck --no-daemon - ./gradlew test --no-daemon diff --git a/.github/workflows/initiate_release.yml b/.github/workflows/initiate_release.yml deleted file mode 100644 index 59c1c98c..00000000 --- a/.github/workflows/initiate_release.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Create release PR - -on: - workflow_dispatch: - inputs: - version: - description: "The new version number with a 'v' prefix. Example: v1.40.1" - required: true - -jobs: - init_release: - name: πŸš€ Create release PR - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # gives the changelog generator access to all previous commits - - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '17' - - - name: Update CHANGELOG.md, build.gradle and push release branch - env: - VERSION: ${{ github.event.inputs.version }} - run: | - npx --yes standard-version@9.3.2 --release-as "$VERSION" --skip.tag --skip.commit --tag-prefix=v - git config --global user.name 'github-actions' - git config --global user.email 'release@getstream.io' - git checkout -q -b "release-$VERSION" - git commit -am "chore(release): $VERSION" - git push -q -u origin "release-$VERSION" - - - name: Get changelog diff - uses: actions/github-script@v5 - with: - script: | - const get_change_log_diff = require('./scripts/get_changelog_diff.js') - core.exportVariable('CHANGELOG', get_change_log_diff()) - - - name: Open pull request - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh pr create \ - -t "Release ${{ github.event.inputs.version }}" \ - -b "# :rocket: ${{ github.event.inputs.version }} - Make sure to use squash & merge when merging! - Once this is merged, another job will kick off automatically and publish the package. - # :memo: Changelog - ${{ env.CHANGELOG }}" diff --git a/.github/workflows/javadoc.yml b/.github/workflows/javadoc.yml deleted file mode 100644 index 30938502..00000000 --- a/.github/workflows/javadoc.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: javadoc -on: - push: - branches: - - main -jobs: - javadoc: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - persist-credentials: false - - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '17' - - name: Set up Node.js 16 - uses: actions/setup-node@v2 - with: - node-version: 16 - - name: Generate doc - run: ./gradlew --no-daemon javadoc - - name: Deploy - uses: JamesIves/github-pages-deploy-action@releases/v3 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: build/docs/javadoc/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index da5eba72..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Release - -on: - pull_request: - types: [closed] - branches: - - main - -jobs: - Release: - name: πŸš€ Release - if: github.event.pull_request.merged && startsWith(github.head_ref, 'release-') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '17' - - uses: actions/github-script@v5 - with: - script: | - const get_change_log_diff = require('./scripts/get_changelog_diff.js') - core.exportVariable('CHANGELOG', get_change_log_diff()) - - // Getting the release version from the PR source branch - // Source branch looks like this: release-1.0.0 - const version = context.payload.pull_request.head.ref.split('-')[1] - core.exportVariable('VERSION', version) - - - name: Build artifacts - run: ./gradlew jar javadocJar sourcesJar - - - name: Publish to MavenCentral - run: | - sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'" - ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository - env: - STREAM_KEY: ${{ secrets.STREAM_KEY }} - STREAM_SECRET: ${{ secrets.STREAM_SECRET }} - STREAM_APP_ID: ${{ secrets.STREAM_APP_ID }} - GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }} - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} - SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} - SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} - SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} - - - name: Create release on GitHub - uses: ncipollo/release-action@v1 - with: - body: ${{ env.CHANGELOG }} - tag: ${{ env.VERSION }} - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index f5614bdd..00000000 --- a/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -*.class -*.jar -*.war -*.ear -build/ - -.gradle/ -gradle.properties -gradle/* -!gradle/wrapper -!gradle/wrapper/*.jar -out/ -target/ -bin/ -.classpath -.project -.settings/ - -.idea/ -.vscode/ -.envrc -/local.properties diff --git a/.versionrc.js b/.versionrc.js deleted file mode 100644 index 2367c93c..00000000 --- a/.versionrc.js +++ /dev/null @@ -1,16 +0,0 @@ -const gradleUpdater = { - VERSION_REGEX: /version = '(.+)'/, - - readVersion: function (contents) { - const version = this.VERSION_REGEX.exec(contents)[1]; - return version; - }, - - writeVersion: function (contents, version) { - return contents.replace(this.VERSION_REGEX.exec(contents)[0], `version = '${version}'`); - } -} - -module.exports = { - bumpFiles: [{ filename: './build.gradle', updater: gradleUpdater }], -} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index b9a4c955..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,137 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [3.26.0](https://github.com/GetStream/stream-java/compare/v3.25.0...v3.26.0) (2026-02-20) - - -### Features - -* **moderation:** skip moderation ([b7738e2](https://github.com/GetStream/stream-java/commit/b7738e25c2553b4fc55edae0b05f1333fba1fc48)) - -## [3.25.0](https://github.com/GetStream/stream-java/compare/v3.24.0...v3.25.0) (2026-01-16) - -## [3.24.0](https://github.com/GetStream/stream-java/compare/v3.23.0...v3.24.0) (2025-11-27) - -## [3.23.0](https://github.com/GetStream/stream-java/compare/v3.22.0...v3.23.0) (2025-10-03) - -## [3.22.0](https://github.com/GetStream/stream-java/compare/v3.20.0...v3.22.0) (2025-07-09) - -## [3.21.0](https://github.com/GetStream/stream-java/compare/v3.20.0...v3.21.0) (2025-07-02) - -## [3.20.0](https://github.com/GetStream/stream-java/compare/v3.19.0...v3.20.0) (2025-04-17) - -## [3.19.0](https://github.com/GetStream/stream-java/compare/v3.17.1...v3.19.0) (2025-04-14) - -### [3.17.1](https://github.com/GetStream/stream-java/compare/v3.17.0...v3.17.1) (2025-04-11) - - -### Bug Fixes - -* update reaction should support moderation template ([08b282b](https://github.com/GetStream/stream-java/commit/08b282b64170961e3b2cc25f4cc434674651bc84)) - -## [3.17.0](https://github.com/GetStream/stream-java/compare/v3.16.0...v3.17.0) (2025-03-21) - -## [3.16.0](https://github.com/GetStream/stream-java/compare/v3.15.2...v3.16.0) (2025-03-10) - -### [3.15.2](https://github.com/GetStream/stream-java/compare/v3.15.1...v3.15.2) (2025-03-07) - - -### Bug Fixes - -* moderation response ([ec7db00](https://github.com/GetStream/stream-java/commit/ec7db0040062c2af6c9db9b3337d240594abf9b4)) - -### [3.15.1](https://github.com/GetStream/stream-java/compare/v3.15.0...v3.15.1) (2024-12-27) - - -### Bug Fixes - -* pass custom var to request ([99ea58e](https://github.com/GetStream/stream-java/commit/99ea58ef057d7a5eaa1f20aaceb6b28b819e825e)) - -## [3.15.0](https://github.com/GetStream/stream-java/compare/v3.14.0...v3.15.0) (2024-11-21) - -## [3.14.0](https://github.com/GetStream/stream-java/compare/v3.13.0...v3.14.0) (2024-11-11) - -## [3.13.0](https://github.com/GetStream/stream-java/compare/v3.12.0...v3.13.0) (2024-11-06) - -## [3.12.0](https://github.com/GetStream/stream-java/compare/v3.11.0...v3.12.0) (2024-11-05) - - -### Bug Fixes - -* fix tests ([4ae4d24](https://github.com/GetStream/stream-java/commit/4ae4d2434c81334c82115fd610caf507ce32ac5c)) -* fix tests, fix token moderation ([f4f6596](https://github.com/GetStream/stream-java/commit/f4f6596c240349c67f66094ccd5117a7fd3d60e6)) -* fix tests, fix token moderation ([1ea89d9](https://github.com/GetStream/stream-java/commit/1ea89d90e19c773dd120d96883d8bd08252e6d86)) - -## [3.11.0](https://github.com/GetStream/stream-java/compare/v3.10.0...v3.11.0) (2024-10-08) - -## [3.10.0](https://github.com/GetStream/stream-java/compare/v3.9.2...v3.10.0) (2024-03-12) - -### [3.9.2](https://github.com/GetStream/stream-java/compare/v3.9.1...v3.9.2) (2024-02-19) -* Ranking Variables in the Enriched Activities Endpoint - -### [3.9.1](https://github.com/GetStream/stream-java/compare/v3.8.2...v3.9.1) (2024-01-09) - -### [3.8.2](https://github.com/GetStream/stream-java/compare/v3.8.1...v3.8.2) (2024-01-03) - -### [3.8.1](https://github.com/GetStream/stream-java/compare/v3.8.0...v3.8.1) (2023-11-17) - -## [3.8.0](https://github.com/GetStream/stream-java/compare/v3.7.0...v3.8.0) (2023-10-23) -* Added support to force refresh -* Added support for soft deletions - -## [3.7.0](https://github.com/GetStream/stream-java/compare/v3.6.2...v3.7.0) (2023-08-16) - - -### Features - -* add capability in batch client to get enrichment activities to use enrichment flags ([cfcc86a](https://github.com/GetStream/stream-java/commit/cfcc86ae3b62fd16cbf733912e7b484a91bb7d8b)) - - -### Bug Fixes - -* spotless ([dad14c7](https://github.com/GetStream/stream-java/commit/dad14c7abedd6ca6d9cef7ea4c1a0133cb648e72)) - -### [3.6.2](https://github.com/GetStream/stream-java/compare/v3.5.0...v3.6.2) (2023-01-26) - - -### Features - -* **faye:** add websocket client ([#110](https://github.com/GetStream/stream-java/issues/110)) ([c0b29e5](https://github.com/GetStream/stream-java/commit/c0b29e51708e424f44686e20d9b2b426da661b4c)) - -### [3.6.1](https://github.com/GetStream/stream-java/compare/v3.5.0...v3.6.1) (2023-01-26) - - -### Features - -* **faye:** add websocket client ([#110](https://github.com/GetStream/stream-java/issues/110)) ([c0b29e5](https://github.com/GetStream/stream-java/commit/c0b29e51708e424f44686e20d9b2b426da661b4c)) - -## [3.6.0](https://github.com/GetStream/stream-java/compare/v3.5.0...v3.6.0) (2022-05-26) - - -### Features - -* **faye:** add websocket client ([#110](https://github.com/GetStream/stream-java/issues/110)) ([c0b29e5](https://github.com/GetStream/stream-java/commit/c0b29e51708e424f44686e20d9b2b426da661b4c)) - -## [3.5.0](https://github.com/GetStream/stream-java/compare/v3.4.1...v3.5.0) (2022-04-26) - - -### Features - -* **stats:** add followstats ([#108](https://github.com/GetStream/stream-java/issues/108)) ([56afa90](https://github.com/GetStream/stream-java/commit/56afa9098d6d21eac5e6c0b75975b32c6684358b)) - -## [3.4.1] - 2022-03-22 - -- Fix unmarshal of empty custom data - -## [3.4.0] - 2022-02-10 - -- Add unread/unseed counts into notification feed payloads - -## [3.3.0] - 2022-01-07 - -- Relax id checks for custom data in collections -- Add withOwnChildren support into reaction filtering -- Move to GitHub actions and add release automation -- Add proguard notes into readme and bump some deps due to security notices -- Add changelog diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 3655d4e0..00000000 --- a/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2016-2021, Stream.io Inc, and individual 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. diff --git a/README.md b/README.md deleted file mode 100644 index cd5b41d4..00000000 --- a/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# Official Java SDK for [Stream Feeds](https://getstream.io/activity-feeds/) - -[![build](https://github.com/GetStream/stream-java/workflows/build/badge.svg)](https://github.com/GetStream/stream-java/actions) - -

- -

-

- Official Java API client for Stream Feeds, a web service for building scalable newsfeeds and activity streams. -
- Explore the docs Β» -
-
- JavaDoc - Β· - Report Bug - Β· - Request Feature -

- -## πŸ“ About Stream - -You can sign up for a Stream account at our [Get Started](https://getstream.io/activity-feeds/docs/java/?language=java) page. - -You can use this library to access feeds API endpoints server-side. - -For the client-side integrations (web and mobile) have a look at the JavaScript, iOS and Android SDK libraries ([docs](https://getstream.io/activity-feeds/)). - -> πŸ’‘ Note: this is a library for the **Feeds** product. The Chat SDKs can be found [here](https://getstream.io/chat/docs/). - -## βš™οΈ Installation - -Add the following dependency to your `pom.xml`: - -```xml - - io.getstream.client - stream-java - ${stream_version} - -``` - -or in your `build.gradle`: - -```gradle -implementation 'io.getstream.client:stream-java:$stream_version' -``` - -In case you want to download the artifact and put it manually into your project, -you can download it from [here](https://github.com/GetStream/stream-java/releases). - -Snapshots of the development version are available in [Sonatype](https://oss.sonatype.org/content/repositories/snapshots/io/getstream/client/) snapshots repository. - -> πŸ’‘This API Client project requires Java SE 7. - -## πŸ™‹ FAQ - -1. Is Android supported? - -Yes. Use `client` for your backend and use `CloudClient` for your mobile application. - -2. Cannot construct an instance of `io.getstream.core.models.*`, a model object in android. What is the problem? - -If you're using proguard, ensure having following: `-keep class io.getstream.core.models.** { *; }` - -Additionally, we're using Jackson JSON processor and see [their definitions](https://github.com/FasterXML/jackson-docs/wiki/JacksonOnAndroid) too unless you're already using it. - -## πŸ“š Full documentation - -Documentation for this Java client are available at the [Stream website](https://getstream.io/docs/?language=java). - -For examples have a look [here](./example/Example.java). - -Docs are available on [GetStream.io](https://getstream.io/docs/?language=java). - -JavaDoc is available [here](https://getstream.github.io/stream-java/). - -## πŸ§ͺ Building & Testing - -Run `gradlew test` to execute integration tests - - -## ✍️ Contributing - -We welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github. We are very happy to merge your code in the official repository. Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first. See our [license file](./LICENSE) for more details. - -## πŸ§‘β€πŸ’» We are hiring! - -We've recently closed a [$38 million Series B funding round](https://techcrunch.com/2021/03/04/stream-raises-38m-as-its-chat-and-activity-feed-apis-power-communications-for-1b-users/) and we keep actively growing. -Our APIs are used by more than a billion end-users, and you'll have a chance to make a huge impact on the product within a team of the strongest engineers all over the world. - -Check out our current openings and apply via [Stream's website](https://getstream.io/team/#jobs). diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 4094801e..00000000 --- a/SECURITY.md +++ /dev/null @@ -1,16 +0,0 @@ -# Reporting a Vulnerability -At Stream we are committed to the security of our Software. We appreciate your efforts in disclosing vulnerabilities responsibly and we will make every effort to acknowledge your contributions. - -Report security vulnerabilities at the following email address: -``` -[security@getstream.io](mailto:security@getstream.io) -``` -Alternatively it is also possible to open a new issue in the affected repository, tagging it with the `security` tag. - -A team member will acknowledge the vulnerability and will follow-up with more detailed information. A representative of the security team will be in touch if more information is needed. - -# Information to include in a report -While we appreciate any information that you are willing to provide, please make sure to include the following: -* Which repository is affected -* Which branch, if relevant -* Be as descriptive as possible, the team will replicate the vulnerability before working on a fix. diff --git a/allclasses-index.html b/allclasses-index.html new file mode 100644 index 00000000..d676c1f5 --- /dev/null +++ b/allclasses-index.html @@ -0,0 +1,660 @@ + + + + + +All Classes (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes

+
+
+ +
+
+ + + diff --git a/allclasses.html b/allclasses.html new file mode 100644 index 00000000..66949465 --- /dev/null +++ b/allclasses.html @@ -0,0 +1,153 @@ + + + + + +All Classes (stream-java 3.6.2 API) + + + + + + + + + + + + +
+

All Classes

+
+ +
+
+ + diff --git a/allpackages-index.html b/allpackages-index.html new file mode 100644 index 00000000..19494bf2 --- /dev/null +++ b/allpackages-index.html @@ -0,0 +1,212 @@ + + + + + +All Packages (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
+ +
+
+ + + diff --git a/assets/logo.svg b/assets/logo.svg deleted file mode 100644 index 1c68c5cc..00000000 --- a/assets/logo.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - STREAM MARK - Created with Sketch. - - - - - - - - - - - \ No newline at end of file diff --git a/build.gradle b/build.gradle deleted file mode 100644 index c3146ce7..00000000 --- a/build.gradle +++ /dev/null @@ -1,89 +0,0 @@ -plugins { - id 'java-library' - id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' - id 'com.diffplug.spotless' version '5.14.0' -} - -group 'io.getstream.client' -version = '3.26.0' -description = 'Stream Feeds official Java SDK' - -repositories { - mavenLocal() - mavenCentral() - maven { url "https://plugins.gradle.org/m2/" } - maven { url uri('https://repo.maven.apache.org/maven2/') } -} - -var jackson_version = '2.14.2' - -dependencies { - java { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - } - - testImplementation 'junit:junit:4.13.1' - testImplementation 'com.pholser:junit-quickcheck-core:0.8.1' - testImplementation 'com.pholser:junit-quickcheck-generators:0.8.1' - testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.2.0' - - implementation 'com.google.guava:guava:31.1-jre' - implementation 'com.squareup.okhttp3:okhttp:4.10.0' - implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" - implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" - implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" - implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" - implementation 'com.auth0:java-jwt:4.2.2' - - api 'net.sourceforge.streamsupport:streamsupport:1.7.0' - api 'net.sourceforge.streamsupport:streamsupport-cfuture:1.7.0' -} - -def localProperties = new Properties() -def localPropertiesFile = project.rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - FileInputStream stream = new FileInputStream(localPropertiesFile) - localProperties.load(stream) -} - -test { - useJUnitPlatform() - - testLogging { - exceptionFormat = 'full' - events 'standard_out', 'standard_error', "passed", "skipped", "failed" - } - - doFirst { - // Inject local properties into tests runtime system properties - for (String key : localProperties.stringPropertyNames) { - systemProperty key, localProperties.getProperty(key).toString() - } - } -} - -def generatedVersionDir = "${buildDir}/generated-version" - -sourceSets { - main { - output.dir(generatedVersionDir, builtBy: 'generateVersionProperties') - } -} -/*spotless { - java { - googleJavaFormat() - } -}*/ -task generateVersionProperties { - doLast { - def propertiesFile = file "$generatedVersionDir/version.properties" - propertiesFile.parentFile.mkdirs() - def properties = new Properties() - properties.setProperty("version", rootProject.version.toString()) - propertiesFile.withWriter { properties.store(it, null) } - } -} -processResources.dependsOn generateVersionProperties - -apply from: "publish.gradle" diff --git a/constant-values.html b/constant-values.html new file mode 100644 index 00000000..a8003afa --- /dev/null +++ b/constant-values.html @@ -0,0 +1,287 @@ + + + + + +Constant Field Values (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Constant Field Values

+
+

Contents

+ +
+
+
+ + +
+

io.getstream.*

+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + +
    io.getstream.core.faye.Advice 
    Modifier and TypeConstant FieldValue
    + +public static final java.lang.StringHANDSHAKE"handshake"
    + +public static final java.lang.StringNONE"none"
    + +public static final java.lang.StringRETRY"retry"
    +
  • +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    io.getstream.core.faye.Channel 
    Modifier and TypeConstant FieldValue
    + +public static final java.lang.StringCONNECT"/meta/connect"
    + +public static final java.lang.StringDISCONNECT"/meta/disconnect"
    + +public static final java.lang.StringHANDSHAKE"/meta/handshake"
    + +public static final java.lang.StringSUBSCRIBE"/meta/subscribe"
    + +public static final java.lang.StringUNSUBSCRIBE"/meta/unsubscribe"
    +
  • +
+ +
+
+
+ + + diff --git a/data/test.jpg b/data/test.jpg deleted file mode 100644 index fd87cca4..00000000 Binary files a/data/test.jpg and /dev/null differ diff --git a/data/test.txt b/data/test.txt deleted file mode 100644 index f0c79c33..00000000 --- a/data/test.txt +++ /dev/null @@ -1 +0,0 @@ -Hello Stream! \ No newline at end of file diff --git a/deprecated-list.html b/deprecated-list.html new file mode 100644 index 00000000..3c9c2008 --- /dev/null +++ b/deprecated-list.html @@ -0,0 +1,146 @@ + + + + + +Deprecated List (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Deprecated API

+

Contents

+
+
+ + + diff --git a/element-list b/element-list new file mode 100644 index 00000000..c34816c1 --- /dev/null +++ b/element-list @@ -0,0 +1,13 @@ +io.getstream.client +io.getstream.cloud +io.getstream.core +io.getstream.core.exceptions +io.getstream.core.faye +io.getstream.core.faye.client +io.getstream.core.faye.emitter +io.getstream.core.faye.subscription +io.getstream.core.http +io.getstream.core.models +io.getstream.core.models.serialization +io.getstream.core.options +io.getstream.core.utils diff --git a/example/Example.java b/example/Example.java deleted file mode 100644 index 772aad5b..00000000 --- a/example/Example.java +++ /dev/null @@ -1,523 +0,0 @@ -package example; - -import static io.getstream.core.utils.Enrichment.createCollectionReference; -import static io.getstream.core.utils.Enrichment.createUserReference; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Lists; -import io.getstream.client.Client; -import io.getstream.client.FlatFeed; -import io.getstream.client.NotificationFeed; -import io.getstream.core.KeepHistory; -import io.getstream.core.LookupKind; -import io.getstream.core.Region; -import io.getstream.core.models.*; -import io.getstream.core.options.*; -import java.io.File; -import java.net.URL; -import java.time.LocalDateTime; -import java.util.Date; -import java.util.List; -import java.util.Map; - -class Example { - private static final String apiKey = System.getenv("STREAM_KEY") != null ? System.getenv("STREAM_KEY") - : System.getProperty("STREAM_KEY"); - private static final String secret = System.getenv("STREAM_SECRET") != null ? System.getenv("STREAM_SECRET") - : System.getProperty("STREAM_SECRET"); - - public static void main(String[] args) throws Exception { - Client client = Client.builder(apiKey, secret).build(); - - FlatFeed chris = client.flatFeed("user", "chris"); - // Add an Activity; message is a custom field - tip: you can add unlimited - // custom fields! - chris.addActivity(Activity.builder().actor("chris").verb("add").object("picture:10").foreignID("picture:10") - .extraField("message", "Beautiful bird!").build()); - - // Create a following relationship between Jack's "timeline" feed and Chris' - // "user" feed: - FlatFeed jack = client.flatFeed("timeline", "jack"); - jack.follow(chris); - - // Read Jack's timeline and Chris' post appears in the feed: - List response = jack.getActivities(new Pagination().limit(10)).join(); - for (Activity activity : response) { - // ... - } - - // Remove an Activity by referencing it's foreign_id - chris.removeActivityByForeignID("picture:10"); - - /* -------------------------------------------------------- */ - - // Instantiate a feed object - FlatFeed userFeed = client.flatFeed("user", "1"); - - // Add an activity to the feed, where actor, object and target are references to - // objects - // (`Eric`, `Hawaii`, `Places to Visit`) - Activity activity = Activity.builder().actor("User:1").verb("pin").object("Place:42").target("Board:1").build(); - userFeed.addActivity(activity); - - // Create a bit more complex activity - activity = Activity.builder().actor("User:1").verb("run").object("Exercise:42").foreignID("run:1") - .extra(new ImmutableMap.Builder() - .put("course", - new ImmutableMap.Builder().put("name", "Golden Gate park") - .put("distance", 10).build()) - .put("participants", new String[] { "Thierry", "Tommaso", }) - .put("started_at", LocalDateTime.now()) - .put("location", - new ImmutableMap.Builder().put("type", "point") - .put("coordinates", new double[] { 37.769722, -122.476944 }).build()) - .build()) - .build(); - userFeed.addActivity(activity); - - // Remove an activity by its id - userFeed.removeActivityByID("e561de8f-00f1-11e4-b400-0cc47a024be0"); - - // Remove activities with foreign_id 'run:1' - userFeed.removeActivityByForeignID("run:1"); - - activity = Activity.builder().actor("1").verb("like").object("3").time(new Date()).foreignID("like:3") - .extraField("popularity", 100).build(); - - // first time the activity is added - userFeed.addActivity(activity); - - // update the popularity value for the activity - activity = Activity.builder().fromActivity(activity).extraField("popularity", 10).build(); - - client.batch().updateActivities(activity); - - /* -------------------------------------------------------- */ - - // partial update by activity ID - - // prepare the set operations - Map set = new ImmutableMap.Builder().put("product.price", 19.99) - .put("shares", - new ImmutableMap.Builder().put("facebook", "...").put("twitter", "...").build()) - .build(); - // prepare the unset operations - String[] unset = new String[] { "daily_likes", "popularity" }; - - String id = "54a60c1e-4ee3-494b-a1e3-50c06acb5ed4"; - client.updateActivityByID(id, set, unset); - - String foreignID = "product:123"; - Date timestamp = new Date(); - client.updateActivityByForeignID(foreignID, timestamp, set, unset); - - FeedID[] add = new FeedID[0]; - FeedID[] remove = new FeedID[0]; - userFeed.updateActivityToTargets(activity, add, remove); - - FeedID[] newTargets = new FeedID[0]; - userFeed.replaceActivityToTargets(activity, newTargets); - - /* -------------------------------------------------------- */ - - Date now = new Date(); - Activity firstActivity = userFeed - .addActivity( - Activity.builder().actor("1").verb("like").object("3").time(now).foreignID("like:3").build()) - .join(); - Activity secondActivity = userFeed.addActivity(Activity.builder().actor("1").verb("like").object("3").time(now) - .extraField("extra", "extra_value").foreignID("like:3").build()).join(); - // foreign ID and time are the same for both activities - // hence only one activity is created and first and second IDs are equal - // firstActivity.ID == secondActivity.ID - - /* -------------------------------------------------------- */ - - // Get 5 activities with id less than the given UUID (Faster - Recommended!) - response = userFeed.getActivities(new Filter().idLessThan("e561de8f-00f1-11e4-b400-0cc47a024be0").limit(5)) - .join(); - // Get activities from 5 to 10 (Pagination-based - Slower) - response = userFeed.getActivities(new Pagination().offset(0).limit(5)).join(); - // Get activities sorted by rank (Ranked Feeds Enabled): - response = userFeed.getActivities(new Pagination().limit(5), "popularity").join(); - - /* -------------------------------------------------------- */ - - // timeline:timeline_feed_1 follows user:user_42 - FlatFeed user = client.flatFeed("user", "user_42"); - FlatFeed timeline = client.flatFeed("timeline", "timeline_feed_1"); - timeline.follow(user); - - // follow feed without copying the activities: - timeline.follow(user, 0); - - /* -------------------------------------------------------- */ - - // user := client.FlatFeed("user", "42") - - // Stop following feed user:user_42 - timeline.unfollow(user); - - // Stop following feed user:user_42 but keep history of activities - timeline.unfollow(user, KeepHistory.YES); - - // list followers - List followers = userFeed.getFollowers(new Pagination().offset(0).limit(10)).join(); - for (FollowRelation follow : followers) { - System.out.format("%s -> %s", follow.getSource(), follow.getTarget()); - // ... - } - - // Retrieve last 10 feeds followed by user_feed_1 - List followed = userFeed.getFollowed(new Pagination().offset(0).limit(10)).join(); - - // Retrieve 10 feeds followed by user_feed_1 starting from the 11th - followed = userFeed.getFollowed(new Pagination().offset(10).limit(10)).join(); - - // Check if user_feed_1 follows specific feeds - followed = userFeed - .getFollowed(new Pagination().offset(0).limit(2), new FeedID("user:42"), new FeedID("user", "43")) - .join(); - - /* -------------------------------------------------------- */ - - NotificationFeed notifications = client.notificationFeed("notifications", "1"); - // Mark all activities in the feed as seen - List> activityGroups = notifications.getActivities(new ActivityMarker().allSeen()) - .join(); - for (NotificationGroup group : activityGroups) { - // ... - } - // Mark some activities as read via specific Activity Group Ids - activityGroups = notifications.getActivities(new ActivityMarker().read("groupID1", "groupID2" /* ... */)) - .join(); - - /* -------------------------------------------------------- */ - - // Add an activity to the feed, where actor, object and target are references to - // objects - - // adding your ranking method as a parameter (in this case, "popularity"): - activity = Activity.builder().actor("User:1").verb("pin").object("place:42").target("board:1") - .extraField("popularity", 5).build(); - userFeed.addActivity(activity); - - // Get activities sorted by the ranking method labelled 'activity_popularity' - // (Ranked Feeds - // Enabled) - response = userFeed.getActivities(new Pagination().limit(5), "activity_popularity").join(); - - /* -------------------------------------------------------- */ - - // Add the activity to Eric's feed and to Jessica's notification feed - activity = Activity.builder().actor("User:Eric").verb("tweet").object("tweet:id") - .to(Lists.newArrayList(new FeedID("notification:Jessica"))) - .extraField("message", "@Jessica check out getstream.io it's so dang awesome.").build(); - userFeed.addActivity(activity); - - // The TO field ensures the activity is send to the player, match and team feed - activity = Activity.builder().actor("Player:Suarez").verb("foul").object("Player:Ramos") - .to(Lists.newArrayList(new FeedID("team:barcelona"), new FeedID("match:1"))) - .extraField("match", ImmutableMap.of("El Classico", 10)).build(); - // playerFeed.addActivity(activity); - userFeed.addActivity(activity); - - // Get activities sorted by the ranking method along with externalRankingVars - Map mp=new LinkedHashMap(); - - mp.put("boolVal",true); - mp.put("music",1); - mp.put("sports",2.1); - mp.put("string","str"); - response = userFeed.feed.getActivities( - new Limit(69), - new Offset(13), - DefaultOptions.DEFAULT_FILTER, - "rank", - new RankingVars(mp) - ); - /* -------------------------------------------------------- */ - - // Batch following many feeds - // Let timeline:1 will follow user:1, user:2 and user:3 - FollowRelation[] follows = new FollowRelation[] { new FollowRelation("timeline:1", "user:1"), - new FollowRelation("timeline:1", "user:2"), new FollowRelation("timeline:1", "user:3") }; - client.batch().followMany(follows); - // copy only the last 10 activities from every feed - client.batch().followMany(10, follows); - - /* -------------------------------------------------------- */ - - Activity[] activities = new Activity[] { - Activity.builder().actor("User:1").verb("tweet").object("Tweet:1").build(), - Activity.builder().actor("User:2").verb("watch").object("Movie:1").build() }; - userFeed.addActivities(activities); - - /* -------------------------------------------------------- */ - - // adds 1 activity to many feeds in one request - activity = Activity.builder().actor("User:2").verb("pin").object("Place:42").target("Board:1").build(); - FeedID[] feeds = new FeedID[] { new FeedID("timeline", "1"), new FeedID("timeline", "2"), - new FeedID("timeline", "3"), new FeedID("timeline", "4") }; - client.batch().addToMany(activity, feeds); - - /* -------------------------------------------------------- */ - - // retrieve two activities by ID - client.batch().getActivitiesByID("01b3c1dd-e7ab-4649-b5b3-b4371d8f7045", "ed2837a6-0a3b-4679-adc1-778a1704852"); - - // retrieve an activity by foreign ID and time - client.batch().getActivitiesByForeignID(new ForeignIDTimePair("foreignID1", new Date()), - new ForeignIDTimePair("foreignID2", new Date())); - - /* -------------------------------------------------------- */ - - // connect to the us-east region - client = Client.builder(apiKey, secret).region(Region.US_EAST).build(); - - /* -------------------------------------------------------- */ - Reaction like = new Reaction.Builder().kind("like").activityID(activity.getID()).build(); - - // add a like reaction to the activity with id activityId - like = client.reactions().add("john-doe", like).join(); - - Reaction comment = new Reaction.Builder().kind("comment").activityID(activity.getID()) - .extraField("text", "awesome post!").build(); - - // adds a comment reaction to the activity with id activityId - comment = client.reactions().add("john-doe", comment).join(); - - /* -------------------------------------------------------- */ - - // first let's read current user's timeline feed and pick one activity - response = client.flatFeed("timeline", "mike").getActivities().join(); - activity = response.get(0); - - // then let's add a like reaction to that activity - client.reactions().add("john-doe", Reaction.builder().kind("like").activityID(activity.getID()).build()); - - /* -------------------------------------------------------- */ - - comment = new Reaction.Builder().kind("comment").activityID(activity.getID()) - .extraField("text", "awesome post!").build(); - - // adds a comment reaction to the activity and notify Thierry's notification - // feed - client.reactions().add("john-doe", comment, new FeedID("notification:thierry")); - - /* -------------------------------------------------------- */ - - // read bob's timeline and include most recent reactions to all activities and - // their total count - client.flatFeed("timeline", "bob") - .getEnrichedActivities(new EnrichmentFlags().withRecentReactions().withReactionCounts()); - - // read bob's timeline and include most recent reactions to all activities and - // her own reactions - client.flatFeed("timeline", "bob").getEnrichedActivities( - new EnrichmentFlags().withOwnReactions().withRecentReactions().withReactionCounts()); - - /* -------------------------------------------------------- */ - - // retrieve all kind of reactions for an activity - List reactions = client.reactions() - .filter(LookupKind.ACTIVITY, "ed2837a6-0a3b-4679-adc1-778a1704852d").join(); - - // retrieve first 10 likes for an activity - reactions = client.reactions() - .filter(LookupKind.ACTIVITY, "ed2837a6-0a3b-4679-adc1-778a1704852d", new Filter().limit(10), "like") - .join(); - - // retrieve the next 10 likes using the id_lt param - reactions = client.reactions().filter(LookupKind.ACTIVITY, "ed2837a6-0a3b-4679-adc1-778a1704852d", - new Filter().idLessThan("e561de8f-00f1-11e4-b400-0cc47a024be0"), "like").join(); - - /* -------------------------------------------------------- */ - - // adds a like to the previously created comment - Reaction reaction = client.reactions() - .addChild("john-doe", comment.getId(), Reaction.builder().kind("like").build()).join(); - - /* -------------------------------------------------------- */ - - client.reactions().update(Reaction.builder().id(reaction.getId()).extraField("text", "love it!").build()); - - /* -------------------------------------------------------- */ - - client.reactions().delete(reaction.getId()); - - /* -------------------------------------------------------- */ - - client.collections().add("food", - new CollectionData("cheese-burger").set("name", "Cheese Burger").set("rating", "4 stars")); - - // if you don't have an id on your side, just use null as the ID and Stream will - // generate a - // unique ID - client.collections().add("food", new CollectionData().set("name", "Cheese Burger").set("rating", "4 stars")); - - /* -------------------------------------------------------- */ - - CollectionData collection = client.collections().get("food", "cheese-burger").join(); - - /* -------------------------------------------------------- */ - - client.collections().delete("food", "cheese-burger"); - - /* -------------------------------------------------------- */ - - client.collections().update("food", - new CollectionData("cheese-burger").set("name", "Cheese Burger").set("rating", "1 star")); - - /* -------------------------------------------------------- */ - - client.collections().upsert("visitor", - new CollectionData("123").set("name", "John").set("favorite_color", "blue"), - new CollectionData("124").set("name", "Jane").set("favorite_color", "purple").set("interests", - Lists.newArrayList("fashion", "jazz"))); - - /* -------------------------------------------------------- */ - - // select the entries with ID 123 and 124 from items collection - List objects = client.collections().select("items", "123", "124").join(); - - /* -------------------------------------------------------- */ - - // delete the entries with ID 123 and 124 from visitor collection - client.collections().deleteMany("visitor", "123", "124"); - - /* -------------------------------------------------------- */ - - // first we add our object to the food collection - CollectionData cheeseBurger = client.collections() - .add("food", new CollectionData("123").set("name", "Cheese Burger").set("ingredients", - Lists.newArrayList("cheese", "burger", "bread", "lettuce", "tomato"))) - .join(); - - // the object returned by .add can be embedded directly inside of an activity - userFeed.addActivity(Activity.builder().actor(createUserReference("john-doe")).verb("grill") - .object(createCollectionReference(cheeseBurger.getCollection(), cheeseBurger.getID())).build()); - - // if we now read the feed, the activity we just added will include the entire - // full object - userFeed.getEnrichedActivities(); - - // we can then update the object and Stream will propagate the change to all - // activities - client.collections() - .update(cheeseBurger.getCollection(), cheeseBurger.set("name", "Amazing Cheese Burger") - .set("ingredients", Lists.newArrayList("cheese", "burger", "bread", "lettuce", "tomato"))) - .join(); - - /* -------------------------------------------------------- */ - - // First create a collection entry with upsert api - client.collections().upsert("food", new CollectionData().set("name", "Cheese Burger")); - - // Then create a user - client.user("john-doe").create( - new Data().set("name", "John Doe").set("occupation", "Software Engineer").set("gender", "male")); - - // Since we know their IDs we can create references to both without reading from - // APIs - String cheeseBurgerRef = createCollectionReference("food", "cheese-burger"); - String johnDoeRef = createUserReference("john-doe"); - - client.flatFeed("user", "john") - .addActivity(Activity.builder().actor(johnDoeRef).verb("eat").object(cheeseBurgerRef).build()); - - /* -------------------------------------------------------- */ - - // create a new user, if the user already exist an error is returned - client.user("john-doe").create( - new Data().set("name", "John Doe").set("occupation", "Software Engineer").set("gender", "male")); - - // get or create a new user, if the user already exist the user is returned - client.user("john-doe").getOrCreate( - new Data().set("name", "John Doe").set("occupation", "Software Engineer").set("gender", "male")); - - /* -------------------------------------------------------- */ - - client.user("123").get(); - - /* -------------------------------------------------------- */ - - client.user("123").delete(); - - /* -------------------------------------------------------- */ - - client.user("123").update( - new Data().set("name", "Jane Doe").set("occupation", "Software Engineer").set("gender", "female")); - - /* -------------------------------------------------------- */ - - // Read the personalization feed for a given user - client.personalization().get("personalized_feed", - new ImmutableMap.Builder().put("user_id", 123).put("feed_slug", "timeline").build()); - - // Our data science team will typically tell you which endpoint to use - client.personalization().get("discovery_feed", new ImmutableMap.Builder().put("user_id", 123) - .put("source_feed_slug", "timeline").put("target_feed_slug", "user").build()); - - /* -------------------------------------------------------- */ - - client.analytics() - .trackEngagement(Engagement - .builder().feedID("user:thierry").content(new Content("message:34349698").set("verb", "share") - .set("actor", ImmutableMap.of("1", "user1"))) - .boost(2).location("profile_page").position(3).build()); - - /* -------------------------------------------------------- */ - - client.analytics().trackImpression(Impression.builder() - .contentList( - new Content("tweet:34349698").set("verb", "share").set("actor", ImmutableMap.of("1", "user1")), - new Content("tweet:34349699"), new Content("tweet:34349700")) - .feedID("flat:tommaso").location("android-app").build()); - - /* -------------------------------------------------------- */ - - // the URL to direct to - URL targetURL = new URL("http://mysite.com/detail"); - - // track the impressions and a click - List impressions = Lists.newArrayList( - Impression.builder().contentList(new Content("tweet:1"), new Content("tweet:2"), new Content("tweet:3")) - .userData(new UserData("tommaso", null)).location("email").feedID("user:global").build()); - List engagements = Lists - .newArrayList(Engagement.builder().content(new Content("tweet:2")).label("click").position(1) - .userData(new UserData("tommaso", null)).location("email").feedID("user:global").build()); - - // when the user opens the tracking URL in their browser gets redirected to the - // target URL - // the events are added to our analytics platform - URL trackingURL = client.analytics().createRedirectURL(targetURL, impressions, engagements); - - /* -------------------------------------------------------- */ - - File image = new File("..."); - URL imageURL = client.images().upload(image).join(); - - File file = new File("..."); - URL fileURL = client.files().upload(file).join(); - - /* -------------------------------------------------------- */ - - // deleting an image using the url returned by the APIs - client.images().delete(imageURL); - - // deleting a file using the url returned by the APIs - client.files().delete(fileURL); - - /* -------------------------------------------------------- */ - - // create a 50x50 thumbnail and crop from center - client.images().process(imageURL, new Resize(50, 50, Resize.Type.CROP)); - - // create a 50x50 thumbnail using clipping (keeps aspect ratio) - client.images().process(imageURL, new Resize(50, 50, Resize.Type.CLIP)); - - /* -------------------------------------------------------- */ - - OGData urlPreview = client.openGraph(new URL("http://www.imdb.com/title/tt0117500/")).join(); - } -} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 033e24c4..00000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 9f4197d5..00000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew deleted file mode 100755 index fcb6fca1..00000000 --- a/gradlew +++ /dev/null @@ -1,248 +0,0 @@ -#!/bin/sh - -# -# Copyright Β© 2015-2021 the original 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. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions Β«$varΒ», Β«${var}Β», Β«${var:-default}Β», Β«${var+SET}Β», -# Β«${var#prefix}Β», Β«${var%suffix}Β», and Β«$( cmd )Β»; -# * compound commands having a testable exit status, especially Β«caseΒ»; -# * various built-in commands including Β«commandΒ», Β«setΒ», and Β«ulimitΒ». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index 6689b85b..00000000 --- a/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/help-doc.html b/help-doc.html new file mode 100644 index 00000000..b87fea3d --- /dev/null +++ b/help-doc.html @@ -0,0 +1,272 @@ + + + + + +API Help (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +
    +

    Overview

    +

    The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

    +
    +
  • +
  • +
    +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain six categories:

    +
      +
    • Interfaces
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
    +
  • +
  • +
    +

    Class or Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class Inheritance Diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class or Interface Declaration
    • +
    • Class or Interface Description
    • +
    +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Property Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
    +
      +
    • Field Detail
    • +
    • Property Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
    +
  • +
  • +
    +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type Declaration
    • +
    • Annotation Type Description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
    +
  • +
  • +
    +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum Declaration
    • +
    • Enum Description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
    +
  • +
  • +
    +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking on "Tree" displays the hierarchy for only that package.
    • +
    +
    +
  • +
  • +
    +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
    +
  • +
  • +
    +

    Index

    +

    The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields, as well as lists of all packages and all classes.

    +
    +
  • +
  • +
    +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
    +
  • +
  • +
    +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
    +
  • +
  • +
    +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
    +
  • +
  • +
    +

    Search

    +

    You can search for definitions of modules, packages, types, fields, methods and other terms defined in the API, using some or all of the name. "Camel-case" abbreviations are supported: for example, "InpStr" will find "InputStream" and "InputStreamReader".

    +
    +
  • +
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+ +
+ + diff --git a/index-all.html b/index-all.html new file mode 100644 index 00000000..6b64998c --- /dev/null +++ b/index-all.html @@ -0,0 +1,3663 @@ + + + + + +Index (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
A B C D E F G H I J K L M N O P R S T U V W Y 
All Classes All Packages + + +

A

+
+
ACTIVITIES - io.getstream.core.utils.Auth.TokenResource
+
 
+
Activity - Class in io.getstream.core.models
+
 
+
ACTIVITY - io.getstream.core.LookupKind
+
 
+
ACTIVITY_WITH_DATA - io.getstream.core.LookupKind
+
 
+
Activity.Builder - Class in io.getstream.core.models
+
 
+
activityData(Map<String, Object>) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
activityID(String) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
ActivityMarker - Class in io.getstream.core.options
+
 
+
ActivityMarker() - Constructor for class io.getstream.core.options.ActivityMarker
+
 
+
ActivityUpdate - Class in io.getstream.core.models
+
 
+
ActivityUpdate.Builder - Class in io.getstream.core.models
+
 
+
actor(Data) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
actor(String) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
actor(String) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
add(Token, String, Reaction, FeedID...) - Method in class io.getstream.core.StreamReactions
+
 
+
add(Token, String, String, CollectionData) - Method in class io.getstream.core.StreamCollections
+
 
+
add(Reaction, FeedID...) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
add(Reaction, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
add(String, CollectionData) - Method in class io.getstream.client.CollectionsClient
+
 
+
add(String, CollectionData) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
add(String, Reaction, FeedID...) - Method in class io.getstream.client.ReactionsClient
+
 
+
add(String, Reaction, FeedID...) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
add(String, Reaction, Iterable<FeedID>) - Method in class io.getstream.client.ReactionsClient
+
 
+
add(String, Reaction, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
add(String, String, CollectionData) - Method in class io.getstream.client.CollectionsClient
+
 
+
add(String, String, CollectionData) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
add(String, String, FeedID...) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
add(String, String, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
add(String, String, String, FeedID...) - Method in class io.getstream.client.ReactionsClient
+
 
+
add(String, String, String, FeedID...) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
add(String, String, String, Iterable<FeedID>) - Method in class io.getstream.client.ReactionsClient
+
 
+
add(String, String, String, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
addActivities(Token, FeedID, Activity...) - Method in class io.getstream.core.Stream
+
 
+
addActivities(Activity...) - Method in class io.getstream.client.Feed
+
 
+
addActivities(Activity...) - Method in class io.getstream.cloud.CloudFeed
+
 
+
addActivities(Iterable<Activity>) - Method in class io.getstream.client.Feed
+
 
+
addActivities(Iterable<Activity>) - Method in class io.getstream.cloud.CloudFeed
+
 
+
addActivity(Token, FeedID, Activity) - Method in class io.getstream.core.Stream
+
 
+
addActivity(Activity) - Method in class io.getstream.client.Feed
+
 
+
addActivity(Activity) - Method in class io.getstream.cloud.CloudFeed
+
 
+
addChild(String, String, Reaction, FeedID...) - Method in class io.getstream.client.ReactionsClient
+
 
+
addChild(String, String, Reaction, FeedID...) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
addChild(String, String, Reaction, Iterable<FeedID>) - Method in class io.getstream.client.ReactionsClient
+
 
+
addChild(String, String, Reaction, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
addChild(String, String, String, FeedID...) - Method in class io.getstream.client.ReactionsClient
+
 
+
addChild(String, String, String, FeedID...) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
addChild(String, String, String, Iterable<FeedID>) - Method in class io.getstream.client.ReactionsClient
+
 
+
addChild(String, String, String, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
addCustom(String, String, T) - Method in class io.getstream.client.CollectionsClient
+
 
+
addCustom(String, String, T) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
addCustom(String, T) - Method in class io.getstream.client.CollectionsClient
+
 
+
addCustom(String, T) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
addCustomActivities(Iterable<T>) - Method in class io.getstream.client.Feed
+
 
+
addCustomActivities(Iterable<T>) - Method in class io.getstream.cloud.CloudFeed
+
 
+
addCustomActivities(T...) - Method in class io.getstream.client.Feed
+
 
+
addCustomActivities(T...) - Method in class io.getstream.cloud.CloudFeed
+
 
+
addCustomActivity(T) - Method in class io.getstream.client.Feed
+
 
+
addCustomActivity(T) - Method in class io.getstream.cloud.CloudFeed
+
 
+
addListener(String, EventListener<T>) - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
addListener(String, EventListener<T>, int) - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
addQueryParameter(String, String) - Method in class io.getstream.core.http.Request.Builder
+
 
+
addToMany(Token, Activity, FeedID...) - Method in class io.getstream.core.StreamBatch
+
 
+
addToMany(Activity, FeedID...) - Method in class io.getstream.client.BatchClient
+
 
+
Advice - Class in io.getstream.core.faye
+
 
+
Advice() - Constructor for class io.getstream.core.faye.Advice
+
 
+
Advice(String, Integer, Integer) - Constructor for class io.getstream.core.faye.Advice
+
 
+
aggregatedFeed(FeedID) - Method in class io.getstream.client.Client
+
 
+
aggregatedFeed(FeedID) - Method in class io.getstream.cloud.CloudClient
+
 
+
aggregatedFeed(String) - Method in class io.getstream.cloud.CloudClient
+
 
+
aggregatedFeed(String, CloudUser) - Method in class io.getstream.cloud.CloudClient
+
 
+
aggregatedFeed(String, String) - Method in class io.getstream.client.Client
+
 
+
aggregatedFeed(String, String) - Method in class io.getstream.cloud.CloudClient
+
 
+
AggregatedFeed - Class in io.getstream.client
+
 
+
allRead() - Method in class io.getstream.core.options.ActivityMarker
+
 
+
allSeen() - Method in class io.getstream.core.options.ActivityMarker
+
 
+
analytics() - Method in class io.getstream.client.Client
+
 
+
analytics() - Method in class io.getstream.cloud.CloudClient
+
 
+
analytics() - Method in class io.getstream.core.Stream
+
 
+
ANALYTICS - io.getstream.core.utils.Auth.TokenResource
+
 
+
ANALYTICS_REDIRECT - io.getstream.core.utils.Auth.TokenResource
+
 
+
AnalyticsClient - Class in io.getstream.client
+
 
+
ANY - io.getstream.core.utils.Auth.TokenAction
+
 
+
ANY - io.getstream.core.utils.Auth.TokenResource
+
 
+
appID(int) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
apply(Request.Builder) - Method in class io.getstream.core.options.ActivityMarker
+
 
+
apply(Request.Builder) - Method in class io.getstream.core.options.Crop
+
 
+
apply(Request.Builder) - Method in class io.getstream.core.options.CustomQueryParameter
+
 
+
apply(Request.Builder) - Method in class io.getstream.core.options.EnrichmentFlags
+
 
+
apply(Request.Builder) - Method in class io.getstream.core.options.Filter
+
 
+
apply(Request.Builder) - Method in class io.getstream.core.options.KeepHistory
+
 
+
apply(Request.Builder) - Method in class io.getstream.core.options.Limit
+
 
+
apply(Request.Builder) - Method in class io.getstream.core.options.Offset
+
 
+
apply(Request.Builder) - Method in class io.getstream.core.options.Ranking
+
 
+
apply(Request.Builder) - Method in interface io.getstream.core.options.RequestOption
+
 
+
apply(Request.Builder) - Method in class io.getstream.core.options.Resize
+
 
+
Audio(String, String, String, String) - Constructor for class io.getstream.core.models.OGData.Audio
+
 
+
Auth - Class in io.getstream.core.utils
+
 
+
Auth.TokenAction - Enum in io.getstream.core.utils
+
 
+
Auth.TokenResource - Enum in io.getstream.core.utils
+
 
+
+ + + +

B

+
+
batch() - Method in class io.getstream.client.Client
+
 
+
batch() - Method in class io.getstream.core.Stream
+
 
+
BatchClient - Class in io.getstream.client
+
 
+
bind(String, EventListener<Message>) - Method in class io.getstream.core.faye.Channel
+
 
+
boost(int) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
BOTTOM - io.getstream.core.options.Crop.Type
+
 
+
build() - Method in class io.getstream.client.Client.Builder
+
 
+
build() - Method in class io.getstream.cloud.CloudClient.Builder
+
 
+
build() - Method in class io.getstream.core.http.Request.Builder
+
 
+
build() - Method in class io.getstream.core.models.Activity.Builder
+
 
+
build() - Method in class io.getstream.core.models.ActivityUpdate.Builder
+
 
+
build() - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
build() - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
build() - Method in class io.getstream.core.models.Impression.Builder
+
 
+
build() - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
buildActivitiesURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildActivityToken(String, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildActivityUpdateURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildAddToManyURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildAnalyticsRedirectToken(String) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildAnalyticsToken(String, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildAnalyticsURL(URL, String) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildBackendToken(String, Auth.TokenResource, Auth.TokenAction, String) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildBackendToken(String, Auth.TokenResource, Auth.TokenAction, String, String) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildBatchCollectionsURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildCollectionsToken(String, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildCollectionsURL(URL, String) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildDelete(URL, String, Token, RequestOption...) - Static method in class io.getstream.core.utils.Request
+
 
+
buildEnrichedActivitiesURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildEnrichedFeedURL(URL, FeedID, String) - Static method in class io.getstream.core.utils.Routes
+
 
+
builder() - Static method in class io.getstream.core.http.Request
+
 
+
builder() - Static method in class io.getstream.core.models.Activity
+
 
+
builder() - Static method in class io.getstream.core.models.ActivityUpdate
+
 
+
builder() - Static method in class io.getstream.core.models.Engagement
+
 
+
builder() - Static method in class io.getstream.core.models.EnrichedActivity
+
 
+
builder() - Static method in class io.getstream.core.models.Impression
+
 
+
builder() - Static method in class io.getstream.core.models.Reaction
+
 
+
builder(String, Token, String) - Static method in class io.getstream.cloud.CloudClient
+
 
+
builder(String, Token, String, String) - Static method in class io.getstream.cloud.CloudClient
+
 
+
builder(String, String) - Static method in class io.getstream.client.Client
+
 
+
builder(String, String, String) - Static method in class io.getstream.cloud.CloudClient
+
 
+
Builder() - Constructor for class io.getstream.core.http.Request.Builder
+
 
+
Builder() - Constructor for class io.getstream.core.models.Activity.Builder
+
 
+
Builder() - Constructor for class io.getstream.core.models.ActivityUpdate.Builder
+
 
+
Builder() - Constructor for class io.getstream.core.models.Engagement.Builder
+
 
+
Builder() - Constructor for class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
Builder() - Constructor for class io.getstream.core.models.Impression.Builder
+
 
+
Builder() - Constructor for class io.getstream.core.models.Reaction.Builder
+
 
+
Builder(String, Token, String) - Constructor for class io.getstream.cloud.CloudClient.Builder
+
 
+
Builder(String, Token, String, String) - Constructor for class io.getstream.cloud.CloudClient.Builder
+
 
+
Builder(String, String) - Constructor for class io.getstream.client.Client.Builder
+
 
+
buildFeedToken(String, FeedID, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildFeedToken(String, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildFeedURL(URL, FeedID, String) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildFilesToken(String, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildFilesURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildFollowManyURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildFollowToken(String, FeedID, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildFollowToken(String, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildFrom(T) - Static method in class io.getstream.core.models.CollectionData
+
 
+
buildFrom(T) - Static method in class io.getstream.core.models.Content
+
 
+
buildFrom(T) - Static method in class io.getstream.core.models.Data
+
 
+
buildFrontendToken(String, String) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildFrontendToken(String, String, Date) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildGet(URL, String, Token, RequestOption...) - Static method in class io.getstream.core.utils.Request
+
 
+
buildImagesURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildMultiPartPost(URL, String, Token, File, RequestOption...) - Static method in class io.getstream.core.utils.Request
+
 
+
buildMultiPartPost(URL, String, Token, String, byte[], RequestOption...) - Static method in class io.getstream.core.utils.Request
+
 
+
buildOpenGraphToken(String) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildOpenGraphURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildPersonalizationToken(String, String, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildPersonalizationURL(URL, String) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildPost(URL, String, Token, byte[], RequestOption...) - Static method in class io.getstream.core.utils.Request
+
 
+
buildPut(URL, String, Token, byte[], RequestOption...) - Static method in class io.getstream.core.utils.Request
+
 
+
buildReactionsToken(String, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildReactionsURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildReactionsURL(URL, String) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildRequest(URL, String, Token, RequestOption...) - Static method in class io.getstream.core.utils.Request
+
 
+
buildToTargetUpdateToken(String, FeedID, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildToTargetUpdateURL(URL, FeedID) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildUnfollowManyURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildUsersToken(String, Auth.TokenAction) - Static method in class io.getstream.core.utils.Auth
+
 
+
buildUsersURL(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
buildUsersURL(URL, String) - Static method in class io.getstream.core.utils.Routes
+
 
+
+ + + +

C

+
+
call(Message) - Method in class io.getstream.core.faye.subscription.ChannelSubscription
+
 
+
CANADA - io.getstream.core.Region
+
 
+
cancel() - Method in class io.getstream.core.faye.subscription.ChannelSubscription
+
 
+
CENTER - io.getstream.core.options.Crop.Type
+
 
+
Channel - Class in io.getstream.core.faye
+
 
+
Channel(String) - Constructor for class io.getstream.core.faye.Channel
+
 
+
ChannelDataCallback - Interface in io.getstream.core.faye.subscription
+
 
+
ChannelSubscription - Class in io.getstream.core.faye.subscription
+
 
+
ChannelSubscription(FayeClient, String) - Constructor for class io.getstream.core.faye.subscription.ChannelSubscription
+
 
+
ChannelSubscription(FayeClient, String, ChannelDataCallback, SubscriptionCancelledCallback) - Constructor for class io.getstream.core.faye.subscription.ChannelSubscription
+
 
+
childrenCounts(Map<String, Number>) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
Client - Class in io.getstream.client
+
 
+
Client.Builder - Class in io.getstream.client
+
 
+
CLIP - io.getstream.core.options.Resize.Type
+
 
+
CloudAggregatedFeed - Class in io.getstream.cloud
+
 
+
CloudAnalyticsClient - Class in io.getstream.cloud
+
 
+
CloudClient - Class in io.getstream.cloud
+
 
+
CloudClient.Builder - Class in io.getstream.cloud
+
 
+
CloudCollectionsClient - Class in io.getstream.cloud
+
 
+
CloudFeed - Class in io.getstream.cloud
+
 
+
CloudFileStorageClient - Class in io.getstream.cloud
+
 
+
CloudFlatFeed - Class in io.getstream.cloud
+
 
+
CloudImageStorageClient - Class in io.getstream.cloud
+
 
+
CloudNotificationFeed - Class in io.getstream.cloud
+
 
+
CloudReactionsClient - Class in io.getstream.cloud
+
 
+
CloudReactionsClient.Params - Class in io.getstream.cloud
+
 
+
CloudUser - Class in io.getstream.cloud
+
 
+
CloudUser(CloudClient, String) - Constructor for class io.getstream.cloud.CloudUser
+
 
+
CollectionData - Class in io.getstream.core.models
+
 
+
CollectionData() - Constructor for class io.getstream.core.models.CollectionData
+
 
+
CollectionData(String) - Constructor for class io.getstream.core.models.CollectionData
+
 
+
CollectionData(String, String, Map<String, Object>) - Constructor for class io.getstream.core.models.CollectionData
+
 
+
collections() - Method in class io.getstream.client.Client
+
 
+
collections() - Method in class io.getstream.cloud.CloudClient
+
 
+
collections() - Method in class io.getstream.core.Stream
+
 
+
COLLECTIONS - io.getstream.core.utils.Auth.TokenResource
+
 
+
CollectionsClient - Class in io.getstream.client
+
 
+
connect() - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
CONNECT - Static variable in class io.getstream.core.faye.Channel
+
 
+
CONNECTED - io.getstream.core.faye.client.FayeClientState
+
 
+
CONNECTING - io.getstream.core.faye.client.FayeClientState
+
 
+
content(Content) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
Content - Class in io.getstream.core.models
+
 
+
Content(String) - Constructor for class io.getstream.core.models.Content
+
 
+
contentList(Content...) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
contentList(Iterable<Content>) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
contentList(List<Content>) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
convert(U, TypeReference<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
convert(U, Class<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
create() - Method in class io.getstream.client.User
+
 
+
create() - Method in class io.getstream.cloud.CloudUser
+
 
+
create(Data) - Method in class io.getstream.client.User
+
 
+
create(Data) - Method in class io.getstream.cloud.CloudUser
+
 
+
createActivityReference(String) - Static method in class io.getstream.core.utils.Enrichment
+
 
+
createCollectionReference(String, String) - Static method in class io.getstream.core.utils.Enrichment
+
 
+
createRedirectURL(Token, URL, Impression[], Engagement[]) - Method in class io.getstream.core.StreamAnalytics
+
 
+
createRedirectURL(URL, Engagement...) - Method in class io.getstream.client.AnalyticsClient
+
 
+
createRedirectURL(URL, Impression...) - Method in class io.getstream.client.AnalyticsClient
+
 
+
createRedirectURL(URL, Impression[], Engagement[]) - Method in class io.getstream.client.AnalyticsClient
+
 
+
createRedirectURL(URL, Iterable<Impression>, Iterable<Engagement>) - Method in class io.getstream.client.AnalyticsClient
+
 
+
createUser(Token, String, Data, boolean) - Method in class io.getstream.core.Stream
+
 
+
createUserReference(String) - Static method in class io.getstream.core.utils.Enrichment
+
 
+
Crop - Class in io.getstream.core.options
+
 
+
Crop(int, int) - Constructor for class io.getstream.core.options.Crop
+
 
+
Crop(int, int, Crop.Type...) - Constructor for class io.getstream.core.options.Crop
+
 
+
CROP - io.getstream.core.options.Resize.Type
+
 
+
Crop.Type - Enum in io.getstream.core.options
+
 
+
CustomQueryParameter - Class in io.getstream.core.options
+
 
+
CustomQueryParameter(String, String) - Constructor for class io.getstream.core.options.CustomQueryParameter
+
 
+
+ + + +

D

+
+
Data - Class in io.getstream.core.models
+
 
+
Data() - Constructor for class io.getstream.core.models.Data
+
 
+
Data(String) - Constructor for class io.getstream.core.models.Data
+
 
+
DataDeserializer - Class in io.getstream.core.models.serialization
+
 
+
DataDeserializer() - Constructor for class io.getstream.core.models.serialization.DataDeserializer
+
 
+
DateDeserializer - Class in io.getstream.core.models.serialization
+
 
+
DateDeserializer() - Constructor for class io.getstream.core.models.serialization.DateDeserializer
+
 
+
DEFAULT_ACTIVITY_COPY_LIMIT - Static variable in class io.getstream.core.utils.DefaultOptions
+
 
+
DEFAULT_ENRICHMENT_FLAGS - Static variable in class io.getstream.core.utils.DefaultOptions
+
 
+
DEFAULT_FILTER - Static variable in class io.getstream.core.utils.DefaultOptions
+
 
+
DEFAULT_LIMIT - Static variable in class io.getstream.core.utils.DefaultOptions
+
 
+
DEFAULT_MARKER - Static variable in class io.getstream.core.utils.DefaultOptions
+
 
+
DEFAULT_OFFSET - Static variable in class io.getstream.core.utils.DefaultOptions
+
 
+
DefaultMessageTransformer - Class in io.getstream.core.faye
+
 
+
DefaultMessageTransformer() - Constructor for class io.getstream.core.faye.DefaultMessageTransformer
+
 
+
DefaultOptions - Class in io.getstream.core.utils
+
 
+
delete() - Method in class io.getstream.client.User
+
 
+
delete() - Method in class io.getstream.cloud.CloudUser
+
 
+
delete() - Method in class io.getstream.core.http.Request.Builder
+
 
+
delete(Token, String) - Method in class io.getstream.core.StreamReactions
+
 
+
delete(Token, String, String) - Method in class io.getstream.core.StreamCollections
+
 
+
delete(Token, String, String, Map<String, Object>) - Method in class io.getstream.core.StreamPersonalization
+
 
+
delete(Token, URL) - Method in class io.getstream.core.StreamFiles
+
 
+
delete(Token, URL) - Method in class io.getstream.core.StreamImages
+
 
+
delete(String) - Method in class io.getstream.client.PersonalizationClient
+
 
+
delete(String) - Method in class io.getstream.client.ReactionsClient
+
 
+
delete(String) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
delete(String, String) - Method in class io.getstream.client.CollectionsClient
+
 
+
delete(String, String) - Method in class io.getstream.client.PersonalizationClient
+
 
+
delete(String, String) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
delete(String, String, Map<String, Object>) - Method in class io.getstream.client.PersonalizationClient
+
 
+
delete(String, Map<String, Object>) - Method in class io.getstream.client.PersonalizationClient
+
 
+
delete(URL) - Method in class io.getstream.client.FileStorageClient
+
 
+
delete(URL) - Method in class io.getstream.client.ImageStorageClient
+
 
+
delete(URL) - Method in class io.getstream.cloud.CloudFileStorageClient
+
 
+
delete(URL) - Method in class io.getstream.cloud.CloudImageStorageClient
+
 
+
DELETE - io.getstream.core.http.Request.Method
+
 
+
DELETE - io.getstream.core.utils.Auth.TokenAction
+
 
+
deleteMany(Token, String, String...) - Method in class io.getstream.core.StreamCollections
+
 
+
deleteMany(String, Iterable<String>) - Method in class io.getstream.client.CollectionsClient
+
 
+
deleteMany(String, String...) - Method in class io.getstream.client.CollectionsClient
+
 
+
deleteUser(Token, String) - Method in class io.getstream.core.Stream
+
 
+
deserialize(JsonParser, DeserializationContext) - Method in class io.getstream.core.models.serialization.DataDeserializer
+
 
+
deserialize(JsonParser, DeserializationContext) - Method in class io.getstream.core.models.serialization.DateDeserializer
+
 
+
deserialize(Response, TypeReference<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
deserialize(Response, Class<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
deserialize(Response, String, Class<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
deserializeContainer(Response, Class<?>, Class<?>...) - Static method in class io.getstream.core.utils.Serialization
+
 
+
deserializeContainer(Response, Class<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
deserializeContainer(Response, String, JavaType) - Static method in class io.getstream.core.utils.Serialization
+
 
+
deserializeContainer(Response, String, Class<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
deserializeContainerSingleItem(Response, Class<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
deserializeError(Response) - Static method in class io.getstream.core.utils.Serialization
+
 
+
disconnect() - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
DISCONNECT - Static variable in class io.getstream.core.faye.Channel
+
 
+
DISCONNECTED - io.getstream.core.faye.client.FayeClientState
+
 
+
dispose() - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
DUBLIN - io.getstream.core.Region
+
 
+
+ + + +

E

+
+
emit(String, T) - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
Engagement - Class in io.getstream.core.models
+
 
+
Engagement.Builder - Class in io.getstream.core.models
+
 
+
EnrichedActivity - Class in io.getstream.core.models
+
 
+
EnrichedActivity.Builder - Class in io.getstream.core.models
+
 
+
Enrichment - Class in io.getstream.core.utils
+
 
+
EnrichmentFlags - Class in io.getstream.core.options
+
 
+
EnrichmentFlags() - Constructor for class io.getstream.core.options.EnrichmentFlags
+
 
+
equals(Object) - Method in class io.getstream.core.faye.Advice
+
 
+
equals(Object) - Method in class io.getstream.core.faye.Channel
+
 
+
equals(Object) - Method in class io.getstream.core.faye.FayeClientError
+
 
+
equals(Object) - Method in class io.getstream.core.faye.Message
+
 
+
equals(Object) - Method in class io.getstream.core.http.Request
+
 
+
equals(Object) - Method in class io.getstream.core.http.RequestBody
+
 
+
equals(Object) - Method in class io.getstream.core.http.Response
+
 
+
equals(Object) - Method in class io.getstream.core.http.Token
+
 
+
equals(Object) - Method in class io.getstream.core.models.Activity
+
 
+
equals(Object) - Method in class io.getstream.core.models.CollectionData
+
 
+
equals(Object) - Method in class io.getstream.core.models.Content
+
 
+
equals(Object) - Method in class io.getstream.core.models.Data
+
 
+
equals(Object) - Method in class io.getstream.core.models.Engagement
+
 
+
equals(Object) - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
equals(Object) - Method in class io.getstream.core.models.Feature
+
 
+
equals(Object) - Method in class io.getstream.core.models.FeedID
+
 
+
equals(Object) - Method in class io.getstream.core.models.FollowRelation
+
 
+
equals(Object) - Method in class io.getstream.core.models.ForeignIDTimePair
+
 
+
equals(Object) - Method in class io.getstream.core.models.Group
+
 
+
equals(Object) - Method in class io.getstream.core.models.Impression
+
 
+
equals(Object) - Method in class io.getstream.core.models.NotificationGroup
+
 
+
equals(Object) - Method in class io.getstream.core.models.Paginated
+
 
+
equals(Object) - Method in class io.getstream.core.models.ProfileData
+
 
+
equals(Object) - Method in class io.getstream.core.models.Reaction
+
 
+
equals(Object) - Method in class io.getstream.core.models.RealtimeMessage
+
 
+
equals(Object) - Method in class io.getstream.core.models.UnfollowOperation
+
 
+
equals(Object) - Method in class io.getstream.core.models.UserData
+
 
+
ErrorListener - Interface in io.getstream.core.faye.emitter
+
 
+
EventEmitter<T> - Class in io.getstream.core.faye.emitter
+
 
+
EventEmitter() - Constructor for class io.getstream.core.faye.emitter.EventEmitter
+
 
+
EventListener<T> - Interface in io.getstream.core.faye.emitter
+
 
+
execute(Request) - Method in class io.getstream.core.http.HTTPClient
+
 
+
execute(Request) - Method in class io.getstream.core.http.OKHTTPClientAdapter
+
 
+
expand(String) - Static method in class io.getstream.core.faye.Channel
+
 
+
extra(Map<String, Object>) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
extra(Map<String, Object>) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
extra(Map<String, Object>) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
extraField(String, Object) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
extraField(String, Object) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
extraField(String, Object) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
+ + + +

F

+
+
FayeClient - Class in io.getstream.core.faye.client
+
 
+
FayeClient(URL) - Constructor for class io.getstream.core.faye.client.FayeClient
+
 
+
FayeClientError - Class in io.getstream.core.faye
+
 
+
FayeClientError(Integer, List<String>, String) - Constructor for class io.getstream.core.faye.FayeClientError
+
 
+
FayeClientState - Enum in io.getstream.core.faye.client
+
 
+
fayeURL(String) - Method in class io.getstream.cloud.CloudClient.Builder
+
 
+
Feature - Class in io.getstream.core.models
+
 
+
Feature(String, String) - Constructor for class io.getstream.core.models.Feature
+
 
+
features(List) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
features(List) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
Feed - Class in io.getstream.client
+
 
+
FEED - io.getstream.core.utils.Auth.TokenResource
+
 
+
FEED_TARGETS - io.getstream.core.utils.Auth.TokenResource
+
 
+
feedID(String) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
feedID(String) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
FeedID - Class in io.getstream.core.models
+
 
+
FeedID(String) - Constructor for class io.getstream.core.models.FeedID
+
 
+
FeedID(String, String) - Constructor for class io.getstream.core.models.FeedID
+
 
+
FeedSubscriber - Interface in io.getstream.cloud
+
 
+
files() - Method in class io.getstream.client.Client
+
 
+
files() - Method in class io.getstream.cloud.CloudClient
+
 
+
files() - Method in class io.getstream.core.Stream
+
 
+
FILES - io.getstream.core.utils.Auth.TokenResource
+
 
+
FileStorageClient - Class in io.getstream.client
+
 
+
FILL - io.getstream.core.options.Resize.Type
+
 
+
filter(Token, LookupKind, String, Filter, Limit, String) - Method in class io.getstream.core.StreamReactions
+
 
+
filter(Token, LookupKind, String, Filter, Limit, String, Boolean) - Method in class io.getstream.core.StreamReactions
+
 
+
filter(LookupKind, String) - Method in class io.getstream.client.ReactionsClient
+
 
+
filter(LookupKind, String) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
filter(LookupKind, String, Filter) - Method in class io.getstream.client.ReactionsClient
+
 
+
filter(LookupKind, String, Filter) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
filter(LookupKind, String, Filter, Limit) - Method in class io.getstream.client.ReactionsClient
+
 
+
filter(LookupKind, String, Filter, Limit) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
filter(LookupKind, String, Filter, Limit, String) - Method in class io.getstream.client.ReactionsClient
+
 
+
filter(LookupKind, String, Filter, Limit, String) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
filter(LookupKind, String, Filter, Limit, String, Boolean) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
filter(LookupKind, String, Limit) - Method in class io.getstream.client.ReactionsClient
+
 
+
filter(LookupKind, String, Limit) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
filter(LookupKind, String, Limit, String) - Method in class io.getstream.client.ReactionsClient
+
 
+
filter(LookupKind, String, Limit, String) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
filter(LookupKind, String, String) - Method in class io.getstream.client.ReactionsClient
+
 
+
filter(LookupKind, String, String) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
Filter - Class in io.getstream.core.options
+
 
+
Filter() - Constructor for class io.getstream.core.options.Filter
+
 
+
flatFeed(FeedID) - Method in class io.getstream.client.Client
+
 
+
flatFeed(FeedID) - Method in class io.getstream.cloud.CloudClient
+
 
+
flatFeed(String) - Method in class io.getstream.cloud.CloudClient
+
 
+
flatFeed(String, CloudUser) - Method in class io.getstream.cloud.CloudClient
+
 
+
flatFeed(String, String) - Method in class io.getstream.client.Client
+
 
+
flatFeed(String, String) - Method in class io.getstream.cloud.CloudClient
+
 
+
FlatFeed - Class in io.getstream.client
+
 
+
follow(FlatFeed) - Method in class io.getstream.client.Feed
+
 
+
follow(FlatFeed, int) - Method in class io.getstream.client.Feed
+
 
+
follow(CloudFlatFeed) - Method in class io.getstream.cloud.CloudFeed
+
 
+
follow(CloudFlatFeed, int) - Method in class io.getstream.cloud.CloudFeed
+
 
+
follow(Token, Token, FeedID, FeedID, int) - Method in class io.getstream.core.Stream
+
 
+
FOLLOWER - io.getstream.core.utils.Auth.TokenResource
+
 
+
followMany(int, FollowRelation...) - Method in class io.getstream.client.BatchClient
+
 
+
followMany(int, Iterable<FollowRelation>) - Method in class io.getstream.client.BatchClient
+
 
+
followMany(Token, int, FollowRelation...) - Method in class io.getstream.core.StreamBatch
+
 
+
followMany(FollowRelation...) - Method in class io.getstream.client.BatchClient
+
 
+
followMany(Iterable<FollowRelation>) - Method in class io.getstream.client.BatchClient
+
 
+
FollowRelation - Class in io.getstream.core.models
+
 
+
FollowRelation(String, String) - Constructor for class io.getstream.core.models.FollowRelation
+
 
+
FollowStat() - Constructor for class io.getstream.core.models.FollowStats.FollowStat
+
 
+
FollowStats - Class in io.getstream.core.models
+
 
+
FollowStats() - Constructor for class io.getstream.core.models.FollowStats
+
 
+
FollowStats.FollowStat - Class in io.getstream.core.models
+
 
+
followStatsPath(URL) - Static method in class io.getstream.core.utils.Routes
+
 
+
foreignID(String) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
foreignID(String) - Method in class io.getstream.core.models.ActivityUpdate.Builder
+
 
+
foreignID(String) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
foreignIDTimePair(ForeignIDTimePair) - Method in class io.getstream.core.models.ActivityUpdate.Builder
+
 
+
ForeignIDTimePair - Class in io.getstream.core.models
+
 
+
ForeignIDTimePair(String, Date) - Constructor for class io.getstream.core.models.ForeignIDTimePair
+
 
+
from(Map<String, Object>) - Method in class io.getstream.core.models.Data
+
 
+
from(T) - Method in class io.getstream.core.models.CollectionData
+
 
+
from(T) - Method in class io.getstream.core.models.Content
+
 
+
from(T) - Method in class io.getstream.core.models.Data
+
 
+
fromActivity(Activity) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
fromCustomActivity(T) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
fromCustomEngagement(T) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
fromCustomEnrichedActivity(T) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
fromCustomImpression(T) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
fromCustomReaction(T) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
fromEngagement(Engagement) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
fromEnrichedActivity(EnrichedActivity) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
fromImpression(Impression) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
fromJSON(InputStream, TypeReference<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
fromJSON(InputStream, Class<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
fromJSON(InputStream, String, JavaType) - Static method in class io.getstream.core.utils.Serialization
+
 
+
fromJSON(String, Class<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
fromJSONList(String, Class<T>) - Static method in class io.getstream.core.utils.Serialization
+
 
+
fromReaction(Reaction) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
frontendToken(String) - Method in class io.getstream.client.Client
+
 
+
frontendToken(String, Date) - Method in class io.getstream.client.Client
+
 
+
+ + + +

G

+
+
get() - Method in class io.getstream.client.User
+
 
+
get() - Method in class io.getstream.cloud.CloudUser
+
 
+
get() - Method in class io.getstream.core.http.Request.Builder
+
 
+
get(Token, String) - Method in class io.getstream.core.StreamReactions
+
 
+
get(Token, String, String) - Method in class io.getstream.core.StreamCollections
+
 
+
get(Token, String, String, Map<String, Object>) - Method in class io.getstream.core.StreamPersonalization
+
 
+
get(String) - Method in class io.getstream.client.PersonalizationClient
+
 
+
get(String) - Method in class io.getstream.client.ReactionsClient
+
 
+
get(String) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
get(String) - Method in class io.getstream.core.models.CollectionData
+
 
+
get(String) - Method in class io.getstream.core.models.Content
+
 
+
get(String) - Method in class io.getstream.core.models.Data
+
 
+
get(String) - Method in class io.getstream.core.models.ProfileData
+
 
+
get(String, String) - Method in class io.getstream.client.CollectionsClient
+
 
+
get(String, String) - Method in class io.getstream.client.PersonalizationClient
+
 
+
get(String, String) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
get(String, String, Map<String, Object>) - Method in class io.getstream.client.PersonalizationClient
+
 
+
get(String, Map<String, Object>) - Method in class io.getstream.client.PersonalizationClient
+
 
+
GET - io.getstream.core.http.Request.Method
+
 
+
getActivities() - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities() - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities() - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities() - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities() - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities() - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities() - Method in class io.getstream.core.models.Group
+
 
+
getActivities(Token, FeedID, RequestOption...) - Method in class io.getstream.core.Stream
+
 
+
getActivities(ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Filter) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(Filter) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(Filter) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(Filter) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(Filter) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities(Filter) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Filter, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(Filter, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Filter, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(Filter, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities(Limit) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(Limit) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(Limit) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(Limit) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(Limit) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities(Limit) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Limit, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(Limit, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(Limit, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(Limit, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Limit, Filter) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(Limit, Filter) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(Limit, Filter) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(Limit, Filter) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(Limit, Filter) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities(Limit, Filter) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Limit, Filter, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(Limit, Filter, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(Limit, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(Limit, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Limit, Filter, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(Limit, Filter, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities(Limit, Offset) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(Limit, Offset) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(Limit, Offset) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(Limit, Offset) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(Limit, Offset) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities(Limit, Offset) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Limit, Offset, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(Limit, Offset, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(Limit, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(Limit, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Limit, Offset, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(Limit, Offset, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities(Limit, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(Limit, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities(Offset) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(Offset) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(Offset) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(Offset) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(Offset) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities(Offset) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Offset, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getActivities(Offset, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getActivities(Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getActivities(Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getActivities(Offset, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(Offset, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivities(String) - Method in class io.getstream.client.FlatFeed
+
 
+
getActivities(String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getActivitiesByForeignID(Token, ForeignIDTimePair...) - Method in class io.getstream.core.StreamBatch
+
 
+
getActivitiesByForeignID(ForeignIDTimePair...) - Method in class io.getstream.client.BatchClient
+
 
+
getActivitiesByForeignID(Iterable<ForeignIDTimePair>) - Method in class io.getstream.client.BatchClient
+
 
+
getActivitiesByID(Token, String...) - Method in class io.getstream.core.StreamBatch
+
 
+
getActivitiesByID(Iterable<String>) - Method in class io.getstream.client.BatchClient
+
 
+
getActivitiesByID(String...) - Method in class io.getstream.client.BatchClient
+
 
+
getActivityData() - Method in class io.getstream.core.models.Reaction
+
 
+
getActivityID() - Method in class io.getstream.core.models.Reaction
+
 
+
getActor() - Method in class io.getstream.core.models.Activity
+
 
+
getActor() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getActorCount() - Method in class io.getstream.core.models.Group
+
 
+
getAdvice() - Method in class io.getstream.core.faye.Message
+
 
+
getAlias() - Method in class io.getstream.core.models.UserData
+
 
+
getAlt() - Method in class io.getstream.core.models.OGData.Image
+
 
+
getAlt() - Method in class io.getstream.core.models.OGData.Video
+
 
+
getAppID() - Method in class io.getstream.core.models.RealtimeMessage
+
 
+
getAudio() - Method in class io.getstream.core.models.OGData.Audio
+
 
+
getAudios() - Method in class io.getstream.core.models.OGData
+
 
+
getBody() - Method in class io.getstream.core.http.Request
+
 
+
getBody() - Method in class io.getstream.core.http.Response
+
 
+
getBoost() - Method in class io.getstream.core.models.Engagement
+
 
+
getBytes() - Method in class io.getstream.core.http.RequestBody
+
 
+
getChannel() - Method in class io.getstream.core.faye.Message
+
 
+
getChildrenCounts() - Method in class io.getstream.core.models.Reaction
+
 
+
getClaim() - Method in class io.getstream.core.models.FeedID
+
 
+
getClient() - Method in class io.getstream.client.Feed
+
 
+
getClient() - Method in class io.getstream.cloud.CloudFeed
+
 
+
getClientId() - Method in class io.getstream.core.faye.Message
+
 
+
getCode() - Method in class io.getstream.core.http.Response
+
 
+
getCollection() - Method in class io.getstream.core.models.CollectionData
+
 
+
getConnectionType() - Method in class io.getstream.core.faye.Message
+
 
+
getContent() - Method in class io.getstream.core.models.Engagement
+
 
+
getContentList() - Method in class io.getstream.core.models.Impression
+
 
+
getCount() - Method in class io.getstream.core.models.FollowStats.FollowStat
+
 
+
getCreatedAt() - Method in class io.getstream.core.models.Group
+
 
+
getCustom(Class<T>, String, String) - Method in class io.getstream.client.CollectionsClient
+
 
+
getCustom(Class<T>, String, String) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
getCustomActivities(Class<T>) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Filter) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, Filter) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, Filter) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, Filter) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, Filter) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>, Filter) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Filter, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, Filter, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Filter, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, Filter, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>, Limit) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, Limit) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>, Limit) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, Limit, Filter, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, Limit, Offset, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>, Limit, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, Limit, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>, Offset) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, Offset) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, Offset) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, Offset) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, Offset) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>, Offset) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Offset, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getCustomActivities(Class<T>, Offset, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getCustomActivities(Class<T>, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getCustomActivities(Class<T>, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getCustomActivities(Class<T>, Offset, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, Offset, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getCustomActivities(Class<T>, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getCustomActivities(Class<T>, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getData() - Method in class io.getstream.core.faye.Message
+
 
+
getData() - Method in class io.getstream.core.models.CollectionData
+
 
+
getData() - Method in class io.getstream.core.models.Content
+
 
+
getData() - Method in class io.getstream.core.models.Data
+
 
+
getData() - Method in class io.getstream.core.models.ProfileData
+
 
+
getDeleted() - Method in class io.getstream.core.models.RealtimeMessage
+
 
+
getDescription() - Method in class io.getstream.core.models.OGData
+
 
+
getDeterminer() - Method in class io.getstream.core.models.OGData
+
 
+
getDuration() - Method in class io.getstream.core.models.Paginated
+
 
+
getEnrichedActivities() - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities() - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities() - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities() - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities() - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities() - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Token, FeedID, RequestOption...) - Method in class io.getstream.core.Stream
+
 
+
getEnrichedActivities(ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Filter) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Filter) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Filter) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Filter) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Filter) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Filter) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Filter, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Filter, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Filter, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Filter, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Filter, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Filter, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Filter, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Filter, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Filter, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit, Filter) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, Filter) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, Filter) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, Filter) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, Filter) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit, Filter) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, Filter, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, Filter, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, Filter, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, Filter, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, Filter, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit, Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, Filter, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, Filter, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit, Filter, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, Filter, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit, Offset) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, Offset) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, Offset) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, Offset) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, Offset) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit, Offset) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, Offset, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, Offset, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, Offset, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Limit, Offset, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, Offset, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Limit, Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Limit, Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit, Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Limit, Offset, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, Offset, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit, Offset, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, Offset, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Limit, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Limit, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Offset) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Offset) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Offset) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Offset) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Offset) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Offset) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Offset, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Offset, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Offset, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedActivities(Offset, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Offset, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedActivities(Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedActivities(Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedActivities(Offset, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Offset, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(Offset, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(Offset, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivities(String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedActivities(String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedActivitiesByForeignID(Token, ForeignIDTimePair...) - Method in class io.getstream.core.StreamBatch
+
 
+
getEnrichedActivitiesByForeignID(ForeignIDTimePair...) - Method in class io.getstream.client.BatchClient
+
 
+
getEnrichedActivitiesByForeignID(Iterable<ForeignIDTimePair>) - Method in class io.getstream.client.BatchClient
+
 
+
getEnrichedActivitiesByID(Token, String...) - Method in class io.getstream.core.StreamBatch
+
 
+
getEnrichedActivitiesByID(Iterable<String>) - Method in class io.getstream.client.BatchClient
+
 
+
getEnrichedActivitiesByID(String...) - Method in class io.getstream.client.BatchClient
+
 
+
getEnrichedCustomActivities(Class<T>) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Filter, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Filter, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, Offset, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Limit, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, ActivityMarker) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, ActivityMarker) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, ActivityMarker) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, ActivityMarker, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, EnrichmentFlags) - Method in class io.getstream.client.AggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, EnrichmentFlags) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, EnrichmentFlags) - Method in class io.getstream.client.NotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudAggregatedFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, EnrichmentFlags) - Method in class io.getstream.cloud.CloudNotificationFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, EnrichmentFlags, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, EnrichmentFlags, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, Offset, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, String) - Method in class io.getstream.client.FlatFeed
+
 
+
getEnrichedCustomActivities(Class<T>, String) - Method in class io.getstream.cloud.CloudFlatFeed
+
 
+
getError() - Method in class io.getstream.core.faye.Message
+
 
+
getErrorCode() - Method in exception io.getstream.core.exceptions.StreamAPIException
+
 
+
getErrorName() - Method in exception io.getstream.core.exceptions.StreamAPIException
+
 
+
getExt() - Method in class io.getstream.core.faye.Message
+
 
+
getExtra() - Method in class io.getstream.core.models.Activity
+
 
+
getExtra() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getExtra() - Method in class io.getstream.core.models.Reaction
+
 
+
getFeatures() - Method in class io.getstream.core.models.Engagement
+
 
+
getFeatures() - Method in class io.getstream.core.models.Impression
+
 
+
getFeed() - Method in class io.getstream.core.models.FollowStats.FollowStat
+
 
+
getFeed() - Method in class io.getstream.core.models.RealtimeMessage
+
 
+
getFeedID() - Method in class io.getstream.core.models.Engagement
+
 
+
getFeedID() - Method in class io.getstream.core.models.Impression
+
 
+
getFile() - Method in class io.getstream.core.http.RequestBody
+
 
+
getFileName() - Method in class io.getstream.core.http.RequestBody
+
 
+
getFilter() - Method in class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
getFlag() - Method in enum io.getstream.core.KeepHistory
+
 
+
getFlag() - Method in class io.getstream.core.options.KeepHistory
+
 
+
getFollowed(Token, FeedID, RequestOption...) - Method in class io.getstream.core.Stream
+
 
+
getFollowed(FeedID...) - Method in class io.getstream.client.Feed
+
 
+
getFollowed(FeedID...) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowed(Limit, FeedID...) - Method in class io.getstream.client.Feed
+
 
+
getFollowed(Limit, FeedID...) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowed(Limit, Offset, FeedID...) - Method in class io.getstream.client.Feed
+
 
+
getFollowed(Limit, Offset, FeedID...) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowed(Limit, Offset, Iterable<FeedID>) - Method in class io.getstream.client.Feed
+
 
+
getFollowed(Limit, Offset, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowed(Limit, Iterable<FeedID>) - Method in class io.getstream.client.Feed
+
 
+
getFollowed(Limit, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowed(Offset, FeedID...) - Method in class io.getstream.client.Feed
+
 
+
getFollowed(Offset, FeedID...) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowed(Offset, Iterable<FeedID>) - Method in class io.getstream.client.Feed
+
 
+
getFollowed(Offset, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowed(Iterable<FeedID>) - Method in class io.getstream.client.Feed
+
 
+
getFollowed(Iterable<FeedID>) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowers() - Method in class io.getstream.core.models.FollowStats
+
 
+
getFollowers(Token, FeedID, RequestOption...) - Method in class io.getstream.core.Stream
+
 
+
getFollowers(FeedID...) - Method in class io.getstream.client.Feed
+
 
+
getFollowers(FeedID...) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowers(Limit, FeedID...) - Method in class io.getstream.client.Feed
+
 
+
getFollowers(Limit, FeedID...) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowers(Limit, Offset, FeedID...) - Method in class io.getstream.client.Feed
+
 
+
getFollowers(Limit, Offset, FeedID...) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowers(Limit, Offset, Iterable<FeedID>) - Method in class io.getstream.client.Feed
+
 
+
getFollowers(Limit, Offset, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowers(Limit, Iterable<FeedID>) - Method in class io.getstream.client.Feed
+
 
+
getFollowers(Limit, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowers(Offset, FeedID...) - Method in class io.getstream.client.Feed
+
 
+
getFollowers(Offset, FeedID...) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowers(Offset, Iterable<FeedID>) - Method in class io.getstream.client.Feed
+
 
+
getFollowers(Offset, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowers(Iterable<FeedID>) - Method in class io.getstream.client.Feed
+
 
+
getFollowers(Iterable<FeedID>) - Method in class io.getstream.cloud.CloudFeed
+
 
+
getFollowersCount() - Method in class io.getstream.core.models.ProfileData
+
 
+
getFollowing() - Method in class io.getstream.core.models.FollowStats
+
 
+
getFollowingCount() - Method in class io.getstream.core.models.ProfileData
+
 
+
getFollowStats(Token, FeedID, String[], String[], RequestOption...) - Method in class io.getstream.core.Stream
+
 
+
getFollowStats(Iterable<String>, Iterable<String>) - Method in class io.getstream.client.Feed
+
 
+
getForeignID() - Method in class io.getstream.core.models.Activity
+
 
+
getForeignID() - Method in class io.getstream.core.models.ActivityUpdate
+
 
+
getForeignID() - Method in class io.getstream.core.models.Content
+
 
+
getForeignID() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getForeignID() - Method in class io.getstream.core.models.ForeignIDTimePair
+
 
+
getGroup() - Method in class io.getstream.core.models.Feature
+
 
+
getGroup() - Method in class io.getstream.core.models.Group
+
 
+
getGroupID() - Method in class io.getstream.core.models.Group
+
 
+
getHeight() - Method in class io.getstream.core.models.OGData.Image
+
 
+
getHeight() - Method in class io.getstream.core.models.OGData.Video
+
 
+
getHeight() - Method in class io.getstream.core.options.Crop
+
 
+
getHeight() - Method in class io.getstream.core.options.Resize
+
 
+
getHTTPClientImplementation() - Method in class io.getstream.client.Client
+
 
+
getHTTPClientImplementation() - Method in class io.getstream.cloud.CloudClient
+
 
+
getHTTPClientImplementation() - Method in class io.getstream.core.Stream
+
 
+
getId() - Method in class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
getId() - Method in class io.getstream.core.faye.Message
+
 
+
getId() - Method in class io.getstream.core.models.Reaction
+
 
+
getID() - Method in class io.getstream.client.Feed
+
 
+
getID() - Method in class io.getstream.client.User
+
 
+
getID() - Method in class io.getstream.cloud.CloudFeed
+
 
+
getID() - Method in class io.getstream.cloud.CloudUser
+
 
+
getID() - Method in class io.getstream.core.models.Activity
+
 
+
getID() - Method in class io.getstream.core.models.ActivityUpdate
+
 
+
getID() - Method in class io.getstream.core.models.CollectionData
+
 
+
getID() - Method in class io.getstream.core.models.Data
+
 
+
getID() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getID() - Method in class io.getstream.core.models.Group
+
 
+
getID() - Method in class io.getstream.core.models.ProfileData
+
 
+
getID() - Method in class io.getstream.core.models.UserData
+
 
+
getImage() - Method in class io.getstream.core.models.OGData.Image
+
 
+
getImages() - Method in class io.getstream.core.models.OGData
+
 
+
getImplementation() - Method in class io.getstream.core.http.HTTPClient
+
 
+
getImplementation() - Method in class io.getstream.core.http.OKHTTPClientAdapter
+
 
+
getInterval() - Method in class io.getstream.core.faye.Advice
+
 
+
getKeepHistory() - Method in class io.getstream.core.models.UnfollowOperation
+
 
+
getKind() - Method in class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
getKind() - Method in enum io.getstream.core.LookupKind
+
 
+
getKind() - Method in class io.getstream.core.models.Reaction
+
 
+
getLabel() - Method in class io.getstream.core.models.Engagement
+
 
+
getLatestChildren() - Method in class io.getstream.core.models.Reaction
+
 
+
getLatestReactions() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getLimit() - Method in class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
getLocale() - Method in class io.getstream.core.models.OGData
+
 
+
getLocation() - Method in class io.getstream.core.models.Engagement
+
 
+
getLocation() - Method in class io.getstream.core.models.Impression
+
 
+
getLookupKind() - Method in class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
getMethod() - Method in class io.getstream.core.http.Request
+
 
+
getMinimumVersion() - Method in class io.getstream.core.faye.Message
+
 
+
getName() - Method in class io.getstream.core.faye.Channel
+
 
+
getName() - Method in class io.getstream.core.options.CustomQueryParameter
+
 
+
getNewActivities() - Method in class io.getstream.core.models.RealtimeMessage
+
 
+
getNext() - Method in class io.getstream.core.models.Paginated
+
 
+
getObject() - Method in class io.getstream.core.models.Activity
+
 
+
getObject() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getObjectMapper() - Method in class io.getstream.core.utils.Serialization
+
 
+
getOrCreate() - Method in class io.getstream.client.User
+
 
+
getOrCreate() - Method in class io.getstream.cloud.CloudUser
+
 
+
getOrCreate(Data) - Method in class io.getstream.client.User
+
 
+
getOrCreate(Data) - Method in class io.getstream.cloud.CloudUser
+
 
+
getOrigin() - Method in class io.getstream.core.models.Activity
+
 
+
getOrigin() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getOwnChildren() - Method in class io.getstream.core.models.Reaction
+
 
+
getOwnReactions() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getPaginated(Token, String) - Method in class io.getstream.core.StreamReactions
+
 
+
getParent() - Method in class io.getstream.core.models.Reaction
+
 
+
getPosition() - Method in class io.getstream.core.models.Engagement
+
 
+
getPosition() - Method in class io.getstream.core.models.Impression
+
 
+
getProperties() - Static method in class io.getstream.core.utils.Info
+
 
+
getPublishedAt() - Method in class io.getstream.core.models.RealtimeMessage
+
 
+
getRanking() - Method in class io.getstream.core.options.Ranking
+
 
+
getReactionCounts() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getReconnect() - Method in class io.getstream.core.faye.Advice
+
 
+
getResults() - Method in class io.getstream.core.models.Paginated
+
 
+
getScore() - Method in class io.getstream.core.models.Activity
+
 
+
getScore() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getSecureUrl() - Method in class io.getstream.core.models.OGData.Image
+
 
+
getSecureURL() - Method in class io.getstream.core.models.OGData.Audio
+
 
+
getSecureURL() - Method in class io.getstream.core.models.OGData.Video
+
 
+
getSet() - Method in class io.getstream.core.models.ActivityUpdate
+
 
+
getSite() - Method in class io.getstream.core.models.OGData
+
 
+
getSiteName() - Method in class io.getstream.core.models.OGData
+
 
+
getSlug() - Method in class io.getstream.client.Feed
+
 
+
getSlug() - Method in class io.getstream.cloud.CloudFeed
+
 
+
getSlug() - Method in class io.getstream.core.models.FeedID
+
 
+
getSource() - Method in class io.getstream.core.models.FollowRelation
+
 
+
getSource() - Method in class io.getstream.core.models.UnfollowOperation
+
 
+
getStatusCode() - Method in exception io.getstream.core.exceptions.StreamAPIException
+
 
+
getSubscription() - Method in class io.getstream.core.faye.Message
+
 
+
getSupportedConnectionTypes() - Method in class io.getstream.core.faye.Message
+
 
+
getTarget() - Method in class io.getstream.core.models.Activity
+
 
+
getTarget() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getTarget() - Method in class io.getstream.core.models.FollowRelation
+
 
+
getTarget() - Method in class io.getstream.core.models.UnfollowOperation
+
 
+
getTime() - Method in class io.getstream.core.models.Activity
+
 
+
getTime() - Method in class io.getstream.core.models.ActivityUpdate
+
 
+
getTime() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getTime() - Method in class io.getstream.core.models.ForeignIDTimePair
+
 
+
getTimeout() - Method in class io.getstream.core.faye.Advice
+
 
+
getTitle() - Method in class io.getstream.core.models.OGData
+
 
+
getTo() - Method in class io.getstream.core.models.Activity
+
 
+
getTo() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getToken() - Method in class io.getstream.core.http.Request
+
 
+
getTrackedAt() - Method in class io.getstream.core.models.Engagement
+
 
+
getTrackedAt() - Method in class io.getstream.core.models.Impression
+
 
+
getType() - Method in class io.getstream.core.http.RequestBody
+
 
+
getType() - Method in class io.getstream.core.models.OGData.Audio
+
 
+
getType() - Method in class io.getstream.core.models.OGData
+
 
+
getType() - Method in class io.getstream.core.models.OGData.Image
+
 
+
getType() - Method in class io.getstream.core.models.OGData.Video
+
 
+
getType() - Method in class io.getstream.core.options.Resize
+
 
+
getTypes() - Method in class io.getstream.core.options.Crop
+
 
+
getUnread() - Method in class io.getstream.core.models.PaginatedNotificationGroup
+
 
+
getUnseen() - Method in class io.getstream.core.models.PaginatedNotificationGroup
+
 
+
getUnset() - Method in class io.getstream.core.models.ActivityUpdate
+
 
+
getUpdatedAt() - Method in class io.getstream.core.models.Group
+
 
+
getUrl() - Method in class io.getstream.core.models.OGData
+
 
+
getURL() - Method in class io.getstream.core.http.Request
+
 
+
getURL() - Method in class io.getstream.core.models.OGData.Audio
+
 
+
getURL() - Method in class io.getstream.core.models.OGData.Image
+
 
+
getURL() - Method in class io.getstream.core.models.OGData.Video
+
 
+
getUser(Token, String, boolean) - Method in class io.getstream.core.Stream
+
 
+
getUserData() - Method in class io.getstream.core.models.Engagement
+
 
+
getUserData() - Method in class io.getstream.core.models.Impression
+
 
+
getUserData() - Method in class io.getstream.core.models.Reaction
+
 
+
getUserID() - Method in class io.getstream.client.Feed
+
 
+
getUserID() - Method in class io.getstream.cloud.CloudFeed
+
 
+
getUserID() - Method in class io.getstream.core.models.FeedID
+
 
+
getUserID() - Method in class io.getstream.core.models.Reaction
+
 
+
getValue() - Method in class io.getstream.core.models.Feature
+
 
+
getValue() - Method in class io.getstream.core.options.CustomQueryParameter
+
 
+
getVerb() - Method in class io.getstream.core.models.Activity
+
 
+
getVerb() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
getVersion() - Method in class io.getstream.core.faye.Message
+
 
+
getVideo() - Method in class io.getstream.core.models.OGData.Video
+
 
+
getVideos() - Method in class io.getstream.core.models.OGData
+
 
+
getWidth() - Method in class io.getstream.core.models.OGData.Image
+
 
+
getWidth() - Method in class io.getstream.core.models.OGData.Video
+
 
+
getWidth() - Method in class io.getstream.core.options.Crop
+
 
+
getWidth() - Method in class io.getstream.core.options.Resize
+
 
+
getWithOwnChildren() - Method in class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
Grammar - Class in io.getstream.core.faye
+
 
+
Grammar() - Constructor for class io.getstream.core.faye.Grammar
+
 
+
Group<T> - Class in io.getstream.core.models
+
 
+
Group(String, String, List<T>, int, Date, Date) - Constructor for class io.getstream.core.models.Group
+
 
+
+ + + +

H

+
+
handshake() - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
HANDSHAKE - Static variable in class io.getstream.core.faye.Advice
+
 
+
HANDSHAKE - Static variable in class io.getstream.core.faye.Channel
+
 
+
hashCode() - Method in class io.getstream.core.faye.Advice
+
 
+
hashCode() - Method in class io.getstream.core.faye.Channel
+
 
+
hashCode() - Method in class io.getstream.core.faye.FayeClientError
+
 
+
hashCode() - Method in class io.getstream.core.faye.Message
+
 
+
hashCode() - Method in class io.getstream.core.http.Request
+
 
+
hashCode() - Method in class io.getstream.core.http.RequestBody
+
 
+
hashCode() - Method in class io.getstream.core.http.Response
+
 
+
hashCode() - Method in class io.getstream.core.http.Token
+
 
+
hashCode() - Method in class io.getstream.core.models.Activity
+
 
+
hashCode() - Method in class io.getstream.core.models.CollectionData
+
 
+
hashCode() - Method in class io.getstream.core.models.Content
+
 
+
hashCode() - Method in class io.getstream.core.models.Data
+
 
+
hashCode() - Method in class io.getstream.core.models.Engagement
+
 
+
hashCode() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
hashCode() - Method in class io.getstream.core.models.Feature
+
 
+
hashCode() - Method in class io.getstream.core.models.FeedID
+
 
+
hashCode() - Method in class io.getstream.core.models.FollowRelation
+
 
+
hashCode() - Method in class io.getstream.core.models.ForeignIDTimePair
+
 
+
hashCode() - Method in class io.getstream.core.models.Group
+
 
+
hashCode() - Method in class io.getstream.core.models.Impression
+
 
+
hashCode() - Method in class io.getstream.core.models.NotificationGroup
+
 
+
hashCode() - Method in class io.getstream.core.models.Paginated
+
 
+
hashCode() - Method in class io.getstream.core.models.ProfileData
+
 
+
hashCode() - Method in class io.getstream.core.models.Reaction
+
 
+
hashCode() - Method in class io.getstream.core.models.RealtimeMessage
+
 
+
hashCode() - Method in class io.getstream.core.models.UnfollowOperation
+
 
+
hashCode() - Method in class io.getstream.core.models.UserData
+
 
+
hasListeners(String) - Method in class io.getstream.core.faye.Channel
+
 
+
hasListeners(String) - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
host(String) - Method in class io.getstream.client.Client.Builder
+
 
+
host(String) - Method in class io.getstream.cloud.CloudClient.Builder
+
 
+
httpClient(HTTPClient) - Method in class io.getstream.client.Client.Builder
+
 
+
httpClient(HTTPClient) - Method in class io.getstream.cloud.CloudClient.Builder
+
 
+
HTTPClient - Class in io.getstream.core.http
+
 
+
HTTPClient() - Constructor for class io.getstream.core.http.HTTPClient
+
 
+
+ + + +

I

+
+
id(String) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
id(String) - Method in class io.getstream.core.models.ActivityUpdate.Builder
+
 
+
id(String) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
id(String) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
idGreaterThan(String) - Method in class io.getstream.core.options.Filter
+
 
+
idGreaterThanEqual(String) - Method in class io.getstream.core.options.Filter
+
 
+
idLessThan(String) - Method in class io.getstream.core.options.Filter
+
 
+
idLessThanEqual(String) - Method in class io.getstream.core.options.Filter
+
 
+
Image(String, String, String, String, String, String, String) - Constructor for class io.getstream.core.models.OGData.Image
+
 
+
images() - Method in class io.getstream.client.Client
+
 
+
images() - Method in class io.getstream.cloud.CloudClient
+
 
+
images() - Method in class io.getstream.core.Stream
+
 
+
ImageStorageClient - Class in io.getstream.client
+
 
+
Impression - Class in io.getstream.core.models
+
 
+
Impression.Builder - Class in io.getstream.core.models
+
 
+
includeOwnChildren(Boolean) - Method in class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
Info - Class in io.getstream.core.utils
+
 
+
io.getstream.client - package io.getstream.client
+
 
+
io.getstream.cloud - package io.getstream.cloud
+
 
+
io.getstream.core - package io.getstream.core
+
 
+
io.getstream.core.exceptions - package io.getstream.core.exceptions
+
 
+
io.getstream.core.faye - package io.getstream.core.faye
+
 
+
io.getstream.core.faye.client - package io.getstream.core.faye.client
+
 
+
io.getstream.core.faye.emitter - package io.getstream.core.faye.emitter
+
 
+
io.getstream.core.faye.subscription - package io.getstream.core.faye.subscription
+
 
+
io.getstream.core.http - package io.getstream.core.http
+
 
+
io.getstream.core.models - package io.getstream.core.models
+
 
+
io.getstream.core.models.serialization - package io.getstream.core.models.serialization
+
 
+
io.getstream.core.options - package io.getstream.core.options
+
 
+
io.getstream.core.utils - package io.getstream.core.utils
+
 
+
isMeta(String) - Static method in class io.getstream.core.faye.Channel
+
 
+
isMounted() - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
isRead() - Method in class io.getstream.core.models.NotificationGroup
+
 
+
isSeen() - Method in class io.getstream.core.models.NotificationGroup
+
 
+
isService(String) - Static method in class io.getstream.core.faye.Channel
+
 
+
isSubscribable(String) - Static method in class io.getstream.core.faye.Channel
+
 
+
isSuccessful() - Method in class io.getstream.core.faye.Message
+
 
+
isValid(String) - Static method in class io.getstream.core.faye.Channel
+
 
+
+ + + +

J

+
+
JSON - io.getstream.core.http.RequestBody.Type
+
 
+
+ + + +

K

+
+
KeepHistory - Class in io.getstream.core.options
+
 
+
KeepHistory - Enum in io.getstream.core
+
 
+
KeepHistory(KeepHistory) - Constructor for class io.getstream.core.options.KeepHistory
+
 
+
kind(String) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
+ + + +

L

+
+
label(String) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
latestChildren(Map<String, List<Reaction>>) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
latestReactions(Map<String, List<Reaction>>) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
LEFT - io.getstream.core.options.Crop.Type
+
 
+
Limit - Class in io.getstream.core.options
+
 
+
Limit(int) - Constructor for class io.getstream.core.options.Limit
+
 
+
location(String) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
location(String) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
LookupKind - Enum in io.getstream.core
+
 
+
+ + + +

M

+
+
MAX_ACTIVITY_COPY_LIMIT - Static variable in class io.getstream.core.utils.DefaultOptions
+
 
+
Message - Class in io.getstream.core.faye
+
 
+
Message() - Constructor for class io.getstream.core.faye.Message
+
 
+
Message(String) - Constructor for class io.getstream.core.faye.Message
+
 
+
MessageTransformer - Class in io.getstream.core.faye
+
 
+
MessageTransformer() - Constructor for class io.getstream.core.faye.MessageTransformer
+
 
+
MULTI_PART - io.getstream.core.http.RequestBody.Type
+
 
+
multiPartPost(File) - Method in class io.getstream.core.http.Request.Builder
+
 
+
multiPartPost(String, byte[]) - Method in class io.getstream.core.http.Request.Builder
+
 
+
+ + + +

N

+
+
NO - io.getstream.core.KeepHistory
+
 
+
NONE - Static variable in class io.getstream.core.faye.Advice
+
 
+
notificationFeed(FeedID) - Method in class io.getstream.client.Client
+
 
+
notificationFeed(FeedID) - Method in class io.getstream.cloud.CloudClient
+
 
+
notificationFeed(String) - Method in class io.getstream.cloud.CloudClient
+
 
+
notificationFeed(String, CloudUser) - Method in class io.getstream.cloud.CloudClient
+
 
+
notificationFeed(String, String) - Method in class io.getstream.client.Client
+
 
+
notificationFeed(String, String) - Method in class io.getstream.cloud.CloudClient
+
 
+
NotificationFeed - Class in io.getstream.client
+
 
+
NotificationGroup<T> - Class in io.getstream.core.models
+
 
+
NotificationGroup(String, String, List<T>, int, Date, Date, boolean, boolean) - Constructor for class io.getstream.core.models.NotificationGroup
+
 
+
+ + + +

O

+
+
object(Data) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
object(String) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
object(String) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
off(String) - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
Offset - Class in io.getstream.core.options
+
 
+
Offset(int) - Constructor for class io.getstream.core.options.Offset
+
 
+
OGData - Class in io.getstream.core.models
+
 
+
OGData(String, String, String, String, String, String, List<OGData.Image>, List<OGData.Video>, List<OGData.Audio>, String, String) - Constructor for class io.getstream.core.models.OGData
+
 
+
OGData.Audio - Class in io.getstream.core.models
+
 
+
OGData.Image - Class in io.getstream.core.models
+
 
+
OGData.Video - Class in io.getstream.core.models
+
 
+
OKHTTPClientAdapter - Class in io.getstream.core.http
+
 
+
OKHTTPClientAdapter() - Constructor for class io.getstream.core.http.OKHTTPClientAdapter
+
 
+
OKHTTPClientAdapter(OkHttpClient) - Constructor for class io.getstream.core.http.OKHTTPClientAdapter
+
 
+
on(String, EventListener<T>) - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
on(String, EventListener<T>, int) - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
onCancelled() - Method in interface io.getstream.core.faye.subscription.SubscriptionCancelledCallback
+
 
+
onClosed(WebSocket, int, String) - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
onData(String, Map<String, Object>) - Method in interface io.getstream.core.faye.subscription.WithChannelDataCallback
+
 
+
onData(Map<String, Object>) - Method in interface io.getstream.core.faye.subscription.ChannelDataCallback
+
 
+
onData(T) - Method in interface io.getstream.core.faye.emitter.EventListener
+
 
+
onError(Exception) - Method in interface io.getstream.core.faye.emitter.ErrorListener
+
 
+
onFailure(WebSocket, Throwable, Response) - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
onMessage(RealtimeMessage) - Method in interface io.getstream.cloud.RealtimeMessageCallback
+
 
+
onMessage(WebSocket, String) - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
onStateChanged(FayeClientState) - Method in interface io.getstream.core.faye.client.StateChangeListener
+
 
+
OPEN_GRAPH - io.getstream.core.utils.Auth.TokenResource
+
 
+
openGraph(Token, URL) - Method in class io.getstream.core.Stream
+
 
+
openGraph(URL) - Method in class io.getstream.client.Client
+
 
+
openGraph(URL) - Method in class io.getstream.cloud.CloudClient
+
 
+
origin(Data) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
origin(String) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
origin(String) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
ownChildren(Map<String, List<Reaction>>) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
ownReactions(Map<String, List<Reaction>>) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
+ + + +

P

+
+
Paginated<T> - Class in io.getstream.core.models
+
 
+
Paginated(String, List<T>, String) - Constructor for class io.getstream.core.models.Paginated
+
 
+
paginatedFilter(Token, LookupKind, String, Filter, Limit, String) - Method in class io.getstream.core.StreamReactions
+
 
+
paginatedFilter(Token, LookupKind, String, Filter, Limit, String, Boolean) - Method in class io.getstream.core.StreamReactions
+
 
+
paginatedFilter(Token, String) - Method in class io.getstream.core.StreamReactions
+
 
+
paginatedFilter(LookupKind, String) - Method in class io.getstream.client.ReactionsClient
+
 
+
paginatedFilter(LookupKind, String, Filter) - Method in class io.getstream.client.ReactionsClient
+
 
+
paginatedFilter(LookupKind, String, Filter, Limit) - Method in class io.getstream.client.ReactionsClient
+
 
+
paginatedFilter(LookupKind, String, Filter, Limit, String) - Method in class io.getstream.client.ReactionsClient
+
 
+
paginatedFilter(LookupKind, String, Limit) - Method in class io.getstream.client.ReactionsClient
+
 
+
paginatedFilter(LookupKind, String, Limit, String) - Method in class io.getstream.client.ReactionsClient
+
 
+
paginatedFilter(LookupKind, String, String) - Method in class io.getstream.client.ReactionsClient
+
 
+
paginatedFilter(String) - Method in class io.getstream.client.ReactionsClient
+
 
+
PaginatedNotificationGroup<T> - Class in io.getstream.core.models
+
 
+
PaginatedNotificationGroup(String, List<NotificationGroup<T>>, String, int, int) - Constructor for class io.getstream.core.models.PaginatedNotificationGroup
+
 
+
Params(LookupKind, String) - Constructor for class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
parent(String) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
parse(String) - Static method in class io.getstream.core.faye.Channel
+
 
+
parse(String) - Static method in class io.getstream.core.faye.FayeClientError
+
 
+
personalization() - Method in class io.getstream.client.Client
+
 
+
personalization() - Method in class io.getstream.core.Stream
+
 
+
PERSONALIZATION - io.getstream.core.utils.Auth.TokenResource
+
 
+
PersonalizationClient - Class in io.getstream.client
+
 
+
port(int) - Method in class io.getstream.client.Client.Builder
+
 
+
port(int) - Method in class io.getstream.cloud.CloudClient.Builder
+
 
+
position(int) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
position(String) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
post(byte[]) - Method in class io.getstream.core.http.Request.Builder
+
 
+
post(Token, String, String, Map<String, Object>, Map<String, Object>) - Method in class io.getstream.core.StreamPersonalization
+
 
+
post(String, String, Map<String, Object>) - Method in class io.getstream.client.PersonalizationClient
+
 
+
post(String, String, Map<String, Object>, Map<String, Object>) - Method in class io.getstream.client.PersonalizationClient
+
 
+
post(String, Map<String, Object>) - Method in class io.getstream.client.PersonalizationClient
+
 
+
post(String, Map<String, Object>, Map<String, Object>) - Method in class io.getstream.client.PersonalizationClient
+
 
+
POST - io.getstream.core.http.Request.Method
+
 
+
process(Token, URL, RequestOption) - Method in class io.getstream.core.StreamImages
+
 
+
process(URL, Crop) - Method in class io.getstream.client.ImageStorageClient
+
 
+
process(URL, Crop) - Method in class io.getstream.cloud.CloudImageStorageClient
+
 
+
process(URL, Resize) - Method in class io.getstream.client.ImageStorageClient
+
 
+
process(URL, Resize) - Method in class io.getstream.cloud.CloudImageStorageClient
+
 
+
profile() - Method in class io.getstream.client.User
+
 
+
profile() - Method in class io.getstream.cloud.CloudUser
+
 
+
ProfileData - Class in io.getstream.core.models
+
 
+
ProfileData(String, int, int, Map<String, Object>) - Constructor for class io.getstream.core.models.ProfileData
+
 
+
publish(String, Map<String, Object>) - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
put(byte[]) - Method in class io.getstream.core.http.Request.Builder
+
 
+
PUT - io.getstream.core.http.Request.Method
+
 
+
+ + + +

R

+
+
Ranking - Class in io.getstream.core.options
+
 
+
Ranking(String) - Constructor for class io.getstream.core.options.Ranking
+
 
+
Reaction - Class in io.getstream.core.models
+
 
+
REACTION - io.getstream.core.LookupKind
+
 
+
Reaction.Builder - Class in io.getstream.core.models
+
 
+
reactionCounts(Map<String, Number>) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
reactionKindFilter(String...) - Method in class io.getstream.core.options.EnrichmentFlags
+
 
+
reactions() - Method in class io.getstream.client.Client
+
 
+
reactions() - Method in class io.getstream.cloud.CloudClient
+
 
+
reactions() - Method in class io.getstream.core.Stream
+
 
+
REACTIONS - io.getstream.core.utils.Auth.TokenResource
+
 
+
ReactionsClient - Class in io.getstream.client
+
 
+
read(Iterable<String>) - Method in class io.getstream.core.options.ActivityMarker
+
 
+
read(String...) - Method in class io.getstream.core.options.ActivityMarker
+
 
+
READ - io.getstream.core.utils.Auth.TokenAction
+
 
+
RealtimeMessage - Class in io.getstream.core.models
+
 
+
RealtimeMessage(FeedID, String, List<String>, List<EnrichedActivity>, Date) - Constructor for class io.getstream.core.models.RealtimeMessage
+
 
+
RealtimeMessageCallback - Interface in io.getstream.cloud
+
 
+
region(Region) - Method in class io.getstream.client.Client.Builder
+
 
+
region(Region) - Method in class io.getstream.cloud.CloudClient.Builder
+
 
+
region(String) - Method in class io.getstream.client.Client.Builder
+
 
+
region(String) - Method in class io.getstream.cloud.CloudClient.Builder
+
 
+
Region - Enum in io.getstream.core
+
 
+
removeActivityByForeignID(Token, FeedID, String) - Method in class io.getstream.core.Stream
+
 
+
removeActivityByForeignID(String) - Method in class io.getstream.client.Feed
+
 
+
removeActivityByForeignID(String) - Method in class io.getstream.cloud.CloudFeed
+
 
+
removeActivityByID(Token, FeedID, String) - Method in class io.getstream.core.Stream
+
 
+
removeActivityByID(String) - Method in class io.getstream.client.Feed
+
 
+
removeActivityByID(String) - Method in class io.getstream.cloud.CloudFeed
+
 
+
removeAllListeners() - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
removeListener(String, EventListener<T>) - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
replaceActivityToTargets(Activity, FeedID...) - Method in class io.getstream.client.Feed
+
 
+
replaceActivityToTargets(Activity, Iterable<FeedID>) - Method in class io.getstream.client.Feed
+
 
+
Request - Class in io.getstream.core.http
+
 
+
Request - Class in io.getstream.core.utils
+
 
+
Request.Builder - Class in io.getstream.core.http
+
 
+
Request.Method - Enum in io.getstream.core.http
+
 
+
RequestBody - Class in io.getstream.core.http
+
 
+
RequestBody.Type - Enum in io.getstream.core.http
+
 
+
requestBuilder() - Static method in class io.getstream.core.http.HTTPClient
+
 
+
RequestOption - Interface in io.getstream.core.options
+
 
+
Resize - Class in io.getstream.core.options
+
 
+
Resize(int, int) - Constructor for class io.getstream.core.options.Resize
+
 
+
Resize(int, int, Resize.Type) - Constructor for class io.getstream.core.options.Resize
+
 
+
Resize.Type - Enum in io.getstream.core.options
+
 
+
Response - Class in io.getstream.core.http
+
 
+
Response(int, InputStream) - Constructor for class io.getstream.core.http.Response
+
 
+
RETRY - Static variable in class io.getstream.core.faye.Advice
+
 
+
RIGHT - io.getstream.core.options.Crop.Type
+
 
+
Routes - Class in io.getstream.core.utils
+
 
+
+ + + +

S

+
+
SCALE - io.getstream.core.options.Resize.Type
+
 
+
scheme(String) - Method in class io.getstream.client.Client.Builder
+
 
+
scheme(String) - Method in class io.getstream.cloud.CloudClient.Builder
+
 
+
score(double) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
score(double) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
seen(Iterable<String>) - Method in class io.getstream.core.options.ActivityMarker
+
 
+
seen(String...) - Method in class io.getstream.core.options.ActivityMarker
+
 
+
select(Token, String, String...) - Method in class io.getstream.core.StreamCollections
+
 
+
select(String, Iterable<String>) - Method in class io.getstream.client.CollectionsClient
+
 
+
select(String, String...) - Method in class io.getstream.client.CollectionsClient
+
 
+
selectCustom(Class<T>, String, Iterable<String>) - Method in class io.getstream.client.CollectionsClient
+
 
+
selectCustom(Class<T>, String, String...) - Method in class io.getstream.client.CollectionsClient
+
 
+
Serialization - Class in io.getstream.core.utils
+
 
+
set(Iterable<Map.Entry<String, Object>>) - Method in class io.getstream.core.models.ActivityUpdate.Builder
+
 
+
set(String, T) - Method in class io.getstream.core.models.CollectionData
+
 
+
set(String, T) - Method in class io.getstream.core.models.Content
+
 
+
set(String, T) - Method in class io.getstream.core.models.Data
+
 
+
set(String, T) - Method in class io.getstream.core.models.ProfileData
+
 
+
set(Map<String, Object>) - Method in class io.getstream.core.models.ActivityUpdate.Builder
+
 
+
setAdvice(Advice) - Method in class io.getstream.core.faye.Message
+
 
+
setClientId(String) - Method in class io.getstream.core.faye.Message
+
 
+
setConnectionType(String) - Method in class io.getstream.core.faye.Message
+
 
+
setData(Map<String, Object>) - Method in class io.getstream.core.faye.Message
+
 
+
setError(String) - Method in class io.getstream.core.faye.Message
+
 
+
setErrorListener(ErrorListener) - Method in class io.getstream.core.faye.emitter.EventEmitter
+
 
+
setExt(Map<String, Object>) - Method in class io.getstream.core.faye.Message
+
 
+
setId(String) - Method in class io.getstream.core.faye.Message
+
 
+
setMessageTransformer(MessageTransformer) - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
setMinimumVersion(String) - Method in class io.getstream.core.faye.Message
+
 
+
setObjectMapper(ObjectMapper) - Method in class io.getstream.core.utils.Serialization
+
 
+
setResults(List<T>) - Method in class io.getstream.core.models.Paginated
+
 
+
setStateChangeListener(StateChangeListener) - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
setSubscription(String) - Method in class io.getstream.core.faye.Message
+
 
+
setSuccessful(Boolean) - Method in class io.getstream.core.faye.Message
+
 
+
setSupportedConnectionTypes(String[]) - Method in class io.getstream.core.faye.Message
+
 
+
setVersion(String) - Method in class io.getstream.core.faye.Message
+
 
+
setWithChannel(WithChannelDataCallback) - Method in class io.getstream.core.faye.subscription.ChannelSubscription
+
 
+
SINGAPORE - io.getstream.core.Region
+
 
+
StateChangeListener - Interface in io.getstream.core.faye.client
+
 
+
stream(Iterable<T>) - Static method in class io.getstream.core.utils.Streams
+
 
+
Stream - Class in io.getstream.core
+
 
+
Stream(String, URL, HTTPClient) - Constructor for class io.getstream.core.Stream
+
 
+
StreamAnalytics - Class in io.getstream.core
+
 
+
StreamAPIException - Exception in io.getstream.core.exceptions
+
 
+
StreamAPIException(String, int, int, String) - Constructor for exception io.getstream.core.exceptions.StreamAPIException
+
 
+
StreamBatch - Class in io.getstream.core
+
 
+
StreamBatch(String, URL, HTTPClient) - Constructor for class io.getstream.core.StreamBatch
+
 
+
StreamCollections - Class in io.getstream.core
+
 
+
StreamException - Exception in io.getstream.core.exceptions
+
 
+
StreamException() - Constructor for exception io.getstream.core.exceptions.StreamException
+
 
+
StreamException(String) - Constructor for exception io.getstream.core.exceptions.StreamException
+
 
+
StreamException(String, Throwable) - Constructor for exception io.getstream.core.exceptions.StreamException
+
 
+
StreamException(String, Throwable, boolean, boolean) - Constructor for exception io.getstream.core.exceptions.StreamException
+
 
+
StreamException(Throwable) - Constructor for exception io.getstream.core.exceptions.StreamException
+
 
+
StreamFiles - Class in io.getstream.core
+
 
+
StreamImages - Class in io.getstream.core
+
 
+
StreamPersonalization - Class in io.getstream.core
+
 
+
StreamReactions - Class in io.getstream.core
+
 
+
Streams - Class in io.getstream.core.utils
+
 
+
Streams() - Constructor for class io.getstream.core.utils.Streams
+
 
+
subscribe(RealtimeMessageCallback) - Method in class io.getstream.cloud.CloudFeed
+
 
+
subscribe(FeedID, RealtimeMessageCallback) - Method in interface io.getstream.cloud.FeedSubscriber
+
 
+
subscribe(String, ChannelDataCallback) - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
subscribe(String, ChannelDataCallback, SubscriptionCancelledCallback) - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
SUBSCRIBE - Static variable in class io.getstream.core.faye.Channel
+
 
+
SubscriptionCancelledCallback - Interface in io.getstream.core.faye.subscription
+
 
+
+ + + +

T

+
+
target(Data) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
target(String) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
target(String) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
time(Date) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
time(Date) - Method in class io.getstream.core.models.ActivityUpdate.Builder
+
 
+
time(Date) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
to(FeedID...) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
to(FeedID...) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
to(Iterable<FeedID>) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
to(Iterable<FeedID>) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
to(List<FeedID>) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
to(List<FeedID>) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
toJSON(T) - Static method in class io.getstream.core.utils.Serialization
+
 
+
token(Token) - Method in class io.getstream.core.http.Request.Builder
+
 
+
Token - Class in io.getstream.core.http
+
 
+
Token(String) - Constructor for class io.getstream.core.http.Token
+
 
+
TOKYO - io.getstream.core.Region
+
 
+
TOP - io.getstream.core.options.Crop.Type
+
 
+
toString() - Method in class io.getstream.core.faye.Advice
+
 
+
toString() - Method in class io.getstream.core.faye.Channel
+
 
+
toString() - Method in class io.getstream.core.faye.FayeClientError
+
 
+
toString() - Method in class io.getstream.core.faye.Message
+
 
+
toString() - Method in class io.getstream.core.http.Request
+
 
+
toString() - Method in class io.getstream.core.http.RequestBody
+
 
+
toString() - Method in enum io.getstream.core.http.RequestBody.Type
+
 
+
toString() - Method in class io.getstream.core.http.Response
+
 
+
toString() - Method in class io.getstream.core.http.Token
+
 
+
toString() - Method in class io.getstream.core.models.Activity
+
 
+
toString() - Method in class io.getstream.core.models.CollectionData
+
 
+
toString() - Method in class io.getstream.core.models.Content
+
 
+
toString() - Method in class io.getstream.core.models.Data
+
 
+
toString() - Method in class io.getstream.core.models.Engagement
+
 
+
toString() - Method in class io.getstream.core.models.EnrichedActivity
+
 
+
toString() - Method in class io.getstream.core.models.Feature
+
 
+
toString() - Method in class io.getstream.core.models.FeedID
+
 
+
toString() - Method in class io.getstream.core.models.FollowRelation
+
 
+
toString() - Method in class io.getstream.core.models.ForeignIDTimePair
+
 
+
toString() - Method in class io.getstream.core.models.Group
+
 
+
toString() - Method in class io.getstream.core.models.Impression
+
 
+
toString() - Method in class io.getstream.core.models.NotificationGroup
+
 
+
toString() - Method in class io.getstream.core.models.Paginated
+
 
+
toString() - Method in class io.getstream.core.models.ProfileData
+
 
+
toString() - Method in class io.getstream.core.models.Reaction
+
 
+
toString() - Method in class io.getstream.core.models.RealtimeMessage
+
 
+
toString() - Method in class io.getstream.core.models.UnfollowOperation
+
 
+
toString() - Method in class io.getstream.core.models.UserData
+
 
+
toString() - Method in enum io.getstream.core.options.Crop.Type
+
 
+
toString() - Method in enum io.getstream.core.options.Resize.Type
+
 
+
toString() - Method in enum io.getstream.core.Region
+
 
+
toString() - Method in enum io.getstream.core.utils.Auth.TokenAction
+
 
+
toString() - Method in enum io.getstream.core.utils.Auth.TokenResource
+
 
+
trackedAt(Date) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
trackedAt(Date) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
trackEngagement(Token, Engagement...) - Method in class io.getstream.core.StreamAnalytics
+
 
+
trackEngagement(Engagement...) - Method in class io.getstream.client.AnalyticsClient
+
 
+
trackEngagement(Engagement...) - Method in class io.getstream.cloud.CloudAnalyticsClient
+
 
+
trackEngagement(Iterable<Engagement>) - Method in class io.getstream.client.AnalyticsClient
+
 
+
trackEngagement(Iterable<Engagement>) - Method in class io.getstream.cloud.CloudAnalyticsClient
+
 
+
trackImpression(Token, Impression) - Method in class io.getstream.core.StreamAnalytics
+
 
+
trackImpression(Impression) - Method in class io.getstream.client.AnalyticsClient
+
 
+
trackImpression(Impression) - Method in class io.getstream.cloud.CloudAnalyticsClient
+
 
+
transformRequest(Message) - Method in class io.getstream.core.faye.DefaultMessageTransformer
+
 
+
transformRequest(Message) - Method in class io.getstream.core.faye.MessageTransformer
+
 
+
transformResponse(Message) - Method in class io.getstream.core.faye.DefaultMessageTransformer
+
 
+
transformResponse(Message) - Method in class io.getstream.core.faye.MessageTransformer
+
 
+
trigger(String, Message) - Method in class io.getstream.core.faye.Channel
+
 
+
+ + + +

U

+
+
unbind(String, EventListener<Message>) - Method in class io.getstream.core.faye.Channel
+
 
+
UNCONNECTED - io.getstream.core.faye.client.FayeClientState
+
 
+
unfollow(FlatFeed) - Method in class io.getstream.client.Feed
+
 
+
unfollow(FlatFeed, KeepHistory) - Method in class io.getstream.client.Feed
+
 
+
unfollow(CloudFlatFeed) - Method in class io.getstream.cloud.CloudFeed
+
 
+
unfollow(CloudFlatFeed, KeepHistory) - Method in class io.getstream.cloud.CloudFeed
+
 
+
unfollow(Token, FeedID, FeedID, RequestOption...) - Method in class io.getstream.core.Stream
+
 
+
unfollowMany(Token, UnfollowOperation...) - Method in class io.getstream.core.StreamBatch
+
 
+
unfollowMany(KeepHistory, FollowRelation...) - Method in class io.getstream.client.BatchClient
+
 
+
unfollowMany(FollowRelation...) - Method in class io.getstream.client.BatchClient
+
 
+
unfollowMany(UnfollowOperation...) - Method in class io.getstream.client.BatchClient
+
 
+
UnfollowOperation - Class in io.getstream.core.models
+
 
+
UnfollowOperation(FollowRelation, KeepHistory) - Constructor for class io.getstream.core.models.UnfollowOperation
+
 
+
UnfollowOperation(String, String, KeepHistory) - Constructor for class io.getstream.core.models.UnfollowOperation
+
 
+
unparse(List<String>) - Static method in class io.getstream.core.faye.Channel
+
 
+
unset(Iterable<String>) - Method in class io.getstream.core.models.ActivityUpdate.Builder
+
 
+
unset(String...) - Method in class io.getstream.core.models.ActivityUpdate.Builder
+
 
+
unsubscribe(String, ChannelSubscription) - Method in class io.getstream.core.faye.client.FayeClient
+
 
+
UNSUBSCRIBE - Static variable in class io.getstream.core.faye.Channel
+
 
+
update(Token, Reaction, FeedID...) - Method in class io.getstream.core.StreamReactions
+
 
+
update(Token, String, String, CollectionData) - Method in class io.getstream.core.StreamCollections
+
 
+
update(Data) - Method in class io.getstream.client.User
+
 
+
update(Data) - Method in class io.getstream.cloud.CloudUser
+
 
+
update(Reaction, FeedID...) - Method in class io.getstream.client.ReactionsClient
+
 
+
update(Reaction, FeedID...) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
update(Reaction, Iterable<FeedID>) - Method in class io.getstream.client.ReactionsClient
+
 
+
update(Reaction, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
update(String, CollectionData) - Method in class io.getstream.client.CollectionsClient
+
 
+
update(String, CollectionData) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
update(String, FeedID...) - Method in class io.getstream.client.ReactionsClient
+
 
+
update(String, FeedID...) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
update(String, Iterable<FeedID>) - Method in class io.getstream.client.ReactionsClient
+
 
+
update(String, Iterable<FeedID>) - Method in class io.getstream.cloud.CloudReactionsClient
+
 
+
update(String, String, CollectionData) - Method in class io.getstream.client.CollectionsClient
+
 
+
update(String, String, CollectionData) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
updateActivities(Token, Activity...) - Method in class io.getstream.core.StreamBatch
+
 
+
updateActivities(Activity...) - Method in class io.getstream.client.BatchClient
+
 
+
updateActivities(Iterable<Activity>) - Method in class io.getstream.client.BatchClient
+
 
+
updateActivitiesByForeignID(Token, ActivityUpdate[]) - Method in class io.getstream.core.Stream
+
 
+
updateActivitiesByForeignID(ActivityUpdate...) - Method in class io.getstream.client.Client
+
 
+
updateActivitiesByForeignID(Iterable<ActivityUpdate>) - Method in class io.getstream.client.Client
+
 
+
updateActivitiesByID(Token, ActivityUpdate[]) - Method in class io.getstream.core.Stream
+
 
+
updateActivitiesByID(ActivityUpdate...) - Method in class io.getstream.client.Client
+
 
+
updateActivitiesByID(Iterable<ActivityUpdate>) - Method in class io.getstream.client.Client
+
 
+
updateActivityByForeignID(Token, String, Date, Map<String, Object>, String[]) - Method in class io.getstream.core.Stream
+
 
+
updateActivityByForeignID(ActivityUpdate) - Method in class io.getstream.client.Client
+
 
+
updateActivityByForeignID(ForeignIDTimePair, Map<String, Object>, Iterable<String>) - Method in class io.getstream.client.Client
+
 
+
updateActivityByForeignID(ForeignIDTimePair, Map<String, Object>, String[]) - Method in class io.getstream.client.Client
+
 
+
updateActivityByForeignID(String, Date, Map<String, Object>, Iterable<String>) - Method in class io.getstream.client.Client
+
 
+
updateActivityByForeignID(String, Date, Map<String, Object>, String[]) - Method in class io.getstream.client.Client
+
 
+
updateActivityByID(Token, String, Map<String, Object>, String[]) - Method in class io.getstream.core.Stream
+
 
+
updateActivityByID(ActivityUpdate) - Method in class io.getstream.client.Client
+
 
+
updateActivityByID(String, Map<String, Object>, Iterable<String>) - Method in class io.getstream.client.Client
+
 
+
updateActivityByID(String, Map<String, Object>, String[]) - Method in class io.getstream.client.Client
+
 
+
updateActivityToTargets(Token, FeedID, Activity, FeedID[], FeedID[], FeedID[]) - Method in class io.getstream.core.Stream
+
 
+
updateActivityToTargets(Activity, FeedID[], FeedID[]) - Method in class io.getstream.client.Feed
+
 
+
updateActivityToTargets(Activity, Iterable<FeedID>, Iterable<FeedID>) - Method in class io.getstream.client.Feed
+
 
+
updateCustom(String, String, T) - Method in class io.getstream.client.CollectionsClient
+
 
+
updateCustom(String, String, T) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
updateCustom(String, T) - Method in class io.getstream.client.CollectionsClient
+
 
+
updateCustom(String, T) - Method in class io.getstream.cloud.CloudCollectionsClient
+
 
+
updateUser(Token, String, Data) - Method in class io.getstream.core.Stream
+
 
+
upload(Token, File) - Method in class io.getstream.core.StreamFiles
+
 
+
upload(Token, File) - Method in class io.getstream.core.StreamImages
+
 
+
upload(Token, String, byte[]) - Method in class io.getstream.core.StreamFiles
+
 
+
upload(Token, String, byte[]) - Method in class io.getstream.core.StreamImages
+
 
+
upload(File) - Method in class io.getstream.client.FileStorageClient
+
 
+
upload(File) - Method in class io.getstream.client.ImageStorageClient
+
 
+
upload(File) - Method in class io.getstream.cloud.CloudFileStorageClient
+
 
+
upload(File) - Method in class io.getstream.cloud.CloudImageStorageClient
+
 
+
upload(String, byte[]) - Method in class io.getstream.client.FileStorageClient
+
 
+
upload(String, byte[]) - Method in class io.getstream.client.ImageStorageClient
+
 
+
upload(String, byte[]) - Method in class io.getstream.cloud.CloudFileStorageClient
+
 
+
upload(String, byte[]) - Method in class io.getstream.cloud.CloudImageStorageClient
+
 
+
upsert(Token, String, CollectionData...) - Method in class io.getstream.core.StreamCollections
+
 
+
upsert(String, CollectionData...) - Method in class io.getstream.client.CollectionsClient
+
 
+
upsert(String, Iterable<CollectionData>) - Method in class io.getstream.client.CollectionsClient
+
 
+
upsertCustom(String, Iterable<T>) - Method in class io.getstream.client.CollectionsClient
+
 
+
upsertCustom(String, T...) - Method in class io.getstream.client.CollectionsClient
+
 
+
url(URL) - Method in class io.getstream.core.http.Request.Builder
+
 
+
US_EAST - io.getstream.core.Region
+
 
+
user(String) - Method in class io.getstream.client.Client
+
 
+
user(String) - Method in class io.getstream.cloud.CloudClient
+
 
+
User - Class in io.getstream.client
+
 
+
User(Client, String) - Constructor for class io.getstream.client.User
+
 
+
USER - io.getstream.core.LookupKind
+
 
+
userData(Data) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
userData(UserData) - Method in class io.getstream.core.models.Engagement.Builder
+
 
+
userData(UserData) - Method in class io.getstream.core.models.Impression.Builder
+
 
+
UserData - Class in io.getstream.core.models
+
 
+
UserData(String, String) - Constructor for class io.getstream.core.models.UserData
+
 
+
userID(String) - Method in class io.getstream.core.models.Reaction.Builder
+
 
+
USERS - io.getstream.core.utils.Auth.TokenResource
+
 
+
+ + + +

V

+
+
valueOf(String) - Static method in enum io.getstream.core.faye.client.FayeClientState
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum io.getstream.core.http.Request.Method
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum io.getstream.core.http.RequestBody.Type
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum io.getstream.core.KeepHistory
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum io.getstream.core.LookupKind
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum io.getstream.core.options.Crop.Type
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum io.getstream.core.options.Resize.Type
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum io.getstream.core.Region
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum io.getstream.core.utils.Auth.TokenAction
+
+
Returns the enum constant of this type with the specified name.
+
+
valueOf(String) - Static method in enum io.getstream.core.utils.Auth.TokenResource
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum io.getstream.core.faye.client.FayeClientState
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum io.getstream.core.http.Request.Method
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum io.getstream.core.http.RequestBody.Type
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum io.getstream.core.KeepHistory
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum io.getstream.core.LookupKind
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum io.getstream.core.options.Crop.Type
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum io.getstream.core.options.Resize.Type
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum io.getstream.core.Region
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum io.getstream.core.utils.Auth.TokenAction
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
values() - Static method in enum io.getstream.core.utils.Auth.TokenResource
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
verb(String) - Method in class io.getstream.core.models.Activity.Builder
+
 
+
verb(String) - Method in class io.getstream.core.models.EnrichedActivity.Builder
+
 
+
VERSION - Static variable in class io.getstream.core.utils.Info
+
 
+
Video(String, String, String, String, String, String, String) - Constructor for class io.getstream.core.models.OGData.Video
+
 
+
+ + + +

W

+
+
WithChannelDataCallback - Interface in io.getstream.core.faye.subscription
+
 
+
withFilter(Filter) - Method in class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
withKind(String) - Method in class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
withLimit(Limit) - Method in class io.getstream.cloud.CloudReactionsClient.Params
+
 
+
withOwnChildren() - Method in class io.getstream.core.options.EnrichmentFlags
+
 
+
withOwnReactions() - Method in class io.getstream.core.options.EnrichmentFlags
+
 
+
withReactionCounts() - Method in class io.getstream.core.options.EnrichmentFlags
+
 
+
withRecentReactions() - Method in class io.getstream.core.options.EnrichmentFlags
+
 
+
withRecentReactions(int) - Method in class io.getstream.core.options.EnrichmentFlags
+
 
+
withUserChildren(String) - Method in class io.getstream.core.options.EnrichmentFlags
+
 
+
withUserReactions(String) - Method in class io.getstream.core.options.EnrichmentFlags
+
 
+
WRITE - io.getstream.core.utils.Auth.TokenAction
+
 
+
+ + + +

Y

+
+
YES - io.getstream.core.KeepHistory
+
 
+
+A B C D E F G H I J K L M N O P R S T U V W Y 
All Classes All Packages
+
+
+ +
+ + diff --git a/index.html b/index.html new file mode 100644 index 00000000..1aff3d8a --- /dev/null +++ b/index.html @@ -0,0 +1,208 @@ + + + + + +Overview (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

stream-java 3.6.2 API

+
+ +
+
+ +
+ + diff --git a/io/getstream/client/AggregatedFeed.html b/io/getstream/client/AggregatedFeed.html new file mode 100644 index 00000000..7a38606d --- /dev/null +++ b/io/getstream/client/AggregatedFeed.html @@ -0,0 +1,1850 @@ + + + + + +AggregatedFeed (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AggregatedFeed

+
+
+ +
+
    +
  • +
    +
    public class AggregatedFeed
    +extends Feed
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/AnalyticsClient.html b/io/getstream/client/AnalyticsClient.html new file mode 100644 index 00000000..e73ec11e --- /dev/null +++ b/io/getstream/client/AnalyticsClient.html @@ -0,0 +1,395 @@ + + + + + +AnalyticsClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class AnalyticsClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.AnalyticsClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class AnalyticsClient
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/BatchClient.html b/io/getstream/client/BatchClient.html new file mode 100644 index 00000000..d799f05f --- /dev/null +++ b/io/getstream/client/BatchClient.html @@ -0,0 +1,600 @@ + + + + + +BatchClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class BatchClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.BatchClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class BatchClient
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/Client.Builder.html b/io/getstream/client/Client.Builder.html new file mode 100644 index 00000000..72f0c537 --- /dev/null +++ b/io/getstream/client/Client.Builder.html @@ -0,0 +1,399 @@ + + + + + +Client.Builder (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Client.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.Client.Builder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    Client
    +
    +
    +
    public static final class Client.Builder
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Builder

        +
        public Builder​(java.lang.String apiKey,
        +               java.lang.String secret)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/client/Client.html b/io/getstream/client/Client.html new file mode 100644 index 00000000..3e500dda --- /dev/null +++ b/io/getstream/client/Client.html @@ -0,0 +1,810 @@ + + + + + +Client (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Client

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.Client
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Client
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        builder

        +
        public static Client.Builder builder​(java.lang.String apiKey,
        +                                     java.lang.String secret)
        +
      • +
      + + + +
        +
      • +

        updateActivityByID

        +
        public java8.util.concurrent.CompletableFuture<Activity> updateActivityByID​(java.lang.String id,
        +                                                                            java.util.Map<java.lang.String,​java.lang.Object> set,
        +                                                                            java.lang.Iterable<java.lang.String> unset)
        +                                                                     throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        updateActivityByID

        +
        public java8.util.concurrent.CompletableFuture<Activity> updateActivityByID​(java.lang.String id,
        +                                                                            java.util.Map<java.lang.String,​java.lang.Object> set,
        +                                                                            java.lang.String[] unset)
        +                                                                     throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        updateActivityByForeignID

        +
        public java8.util.concurrent.CompletableFuture<Activity> updateActivityByForeignID​(ForeignIDTimePair foreignIDTimePair,
        +                                                                                   java.util.Map<java.lang.String,​java.lang.Object> set,
        +                                                                                   java.lang.Iterable<java.lang.String> unset)
        +                                                                            throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        updateActivityByForeignID

        +
        public java8.util.concurrent.CompletableFuture<Activity> updateActivityByForeignID​(ForeignIDTimePair foreignIDTimePair,
        +                                                                                   java.util.Map<java.lang.String,​java.lang.Object> set,
        +                                                                                   java.lang.String[] unset)
        +                                                                            throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        updateActivityByForeignID

        +
        public java8.util.concurrent.CompletableFuture<Activity> updateActivityByForeignID​(java.lang.String foreignID,
        +                                                                                   java.util.Date timestamp,
        +                                                                                   java.util.Map<java.lang.String,​java.lang.Object> set,
        +                                                                                   java.lang.Iterable<java.lang.String> unset)
        +                                                                            throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        updateActivityByForeignID

        +
        public java8.util.concurrent.CompletableFuture<Activity> updateActivityByForeignID​(java.lang.String foreignID,
        +                                                                                   java.util.Date timestamp,
        +                                                                                   java.util.Map<java.lang.String,​java.lang.Object> set,
        +                                                                                   java.lang.String[] unset)
        +                                                                            throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + + + + + + + + + + + + + + + + + + + +
        +
      • +

        getHTTPClientImplementation

        +
        public <T> T getHTTPClientImplementation()
        +
      • +
      + + + +
        +
      • +

        frontendToken

        +
        public Token frontendToken​(java.lang.String userID)
        +
      • +
      + + + +
        +
      • +

        frontendToken

        +
        public Token frontendToken​(java.lang.String userID,
        +                           java.util.Date expiresAt)
        +
      • +
      + + + + + + + +
        +
      • +

        flatFeed

        +
        public FlatFeed flatFeed​(java.lang.String slug,
        +                         java.lang.String userID)
        +
      • +
      + + + + + + + +
        +
      • +

        aggregatedFeed

        +
        public AggregatedFeed aggregatedFeed​(java.lang.String slug,
        +                                     java.lang.String userID)
        +
      • +
      + + + + + + + +
        +
      • +

        notificationFeed

        +
        public NotificationFeed notificationFeed​(java.lang.String slug,
        +                                         java.lang.String userID)
        +
      • +
      + + + +
        +
      • +

        user

        +
        public User user​(java.lang.String userID)
        +
      • +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/CollectionsClient.html b/io/getstream/client/CollectionsClient.html new file mode 100644 index 00000000..b58b9815 --- /dev/null +++ b/io/getstream/client/CollectionsClient.html @@ -0,0 +1,715 @@ + + + + + +CollectionsClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CollectionsClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.CollectionsClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class CollectionsClient
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<CollectionData>add​(java.lang.String collection, + CollectionData item) 
      java8.util.concurrent.CompletableFuture<CollectionData>add​(java.lang.String userID, + java.lang.String collection, + CollectionData item) 
      <T> java8.util.concurrent.CompletableFuture<T>addCustom​(java.lang.String userID, + java.lang.String collection, + T item) 
      <T> java8.util.concurrent.CompletableFuture<T>addCustom​(java.lang.String collection, + T item) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.lang.String collection, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>deleteMany​(java.lang.String collection, + java.lang.Iterable<java.lang.String> ids) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>deleteMany​(java.lang.String collection, + java.lang.String... ids) 
      java8.util.concurrent.CompletableFuture<CollectionData>get​(java.lang.String collection, + java.lang.String id) 
      <T> java8.util.concurrent.CompletableFuture<T>getCustom​(java.lang.Class<T> type, + java.lang.String collection, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<java.util.List<CollectionData>>select​(java.lang.String collection, + java.lang.Iterable<java.lang.String> ids) 
      java8.util.concurrent.CompletableFuture<java.util.List<CollectionData>>select​(java.lang.String collection, + java.lang.String... ids) 
      <T> java8.util.concurrent.CompletableFuture<java.util.List<T>>selectCustom​(java.lang.Class<T> type, + java.lang.String collection, + java.lang.Iterable<java.lang.String> ids) 
      <T> java8.util.concurrent.CompletableFuture<java.util.List<T>>selectCustom​(java.lang.Class<T> type, + java.lang.String collection, + java.lang.String... ids) 
      java8.util.concurrent.CompletableFuture<CollectionData>update​(java.lang.String collection, + CollectionData item) 
      java8.util.concurrent.CompletableFuture<CollectionData>update​(java.lang.String userID, + java.lang.String collection, + CollectionData item) 
      <T> java8.util.concurrent.CompletableFuture<T>updateCustom​(java.lang.String userID, + java.lang.String collection, + T item) 
      <T> java8.util.concurrent.CompletableFuture<T>updateCustom​(java.lang.String collection, + T item) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>upsert​(java.lang.String collection, + CollectionData... items) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>upsert​(java.lang.String collection, + java.lang.Iterable<CollectionData> items) 
      <T> java8.util.concurrent.CompletableFuture<java.lang.Void>upsertCustom​(java.lang.String collection, + java.lang.Iterable<T> items) 
      <T> java8.util.concurrent.CompletableFuture<java.lang.Void>upsertCustom​(java.lang.String collection, + T... items) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        addCustom

        +
        public <T> java8.util.concurrent.CompletableFuture<T> addCustom​(java.lang.String collection,
        +                                                                T item)
        +                                                         throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + +
        +
      • +

        addCustom

        +
        public <T> java8.util.concurrent.CompletableFuture<T> addCustom​(java.lang.String userID,
        +                                                                java.lang.String collection,
        +                                                                T item)
        +                                                         throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + + + + + + + + + +
        +
      • +

        updateCustom

        +
        public <T> java8.util.concurrent.CompletableFuture<T> updateCustom​(java.lang.String collection,
        +                                                                   T item)
        +                                                            throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + +
        +
      • +

        updateCustom

        +
        public <T> java8.util.concurrent.CompletableFuture<T> updateCustom​(java.lang.String userID,
        +                                                                   java.lang.String collection,
        +                                                                   T item)
        +                                                            throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        upsertCustom

        +
        public <T> java8.util.concurrent.CompletableFuture<java.lang.Void> upsertCustom​(java.lang.String collection,
        +                                                                                java.lang.Iterable<T> items)
        +                                                                         throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + +
        +
      • +

        upsertCustom

        +
        public <T> java8.util.concurrent.CompletableFuture<java.lang.Void> upsertCustom​(java.lang.String collection,
        +                                                                                T... items)
        +                                                                         throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        upsert

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> upsert​(java.lang.String collection,
        +                                                                      java.lang.Iterable<CollectionData> items)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        getCustom

        +
        public <T> java8.util.concurrent.CompletableFuture<T> getCustom​(java.lang.Class<T> type,
        +                                                                java.lang.String collection,
        +                                                                java.lang.String id)
        +                                                         throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        selectCustom

        +
        public <T> java8.util.concurrent.CompletableFuture<java.util.List<T>> selectCustom​(java.lang.Class<T> type,
        +                                                                                   java.lang.String collection,
        +                                                                                   java.lang.Iterable<java.lang.String> ids)
        +                                                                            throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        selectCustom

        +
        public <T> java8.util.concurrent.CompletableFuture<java.util.List<T>> selectCustom​(java.lang.Class<T> type,
        +                                                                                   java.lang.String collection,
        +                                                                                   java.lang.String... ids)
        +                                                                            throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        select

        +
        public java8.util.concurrent.CompletableFuture<java.util.List<CollectionData>> select​(java.lang.String collection,
        +                                                                                      java.lang.Iterable<java.lang.String> ids)
        +                                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + + + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(java.lang.String collection,
        +                                                                      java.lang.String id)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        deleteMany

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> deleteMany​(java.lang.String collection,
        +                                                                          java.lang.Iterable<java.lang.String> ids)
        +                                                                   throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        deleteMany

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> deleteMany​(java.lang.String collection,
        +                                                                          java.lang.String... ids)
        +                                                                   throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/Feed.html b/io/getstream/client/Feed.html new file mode 100644 index 00000000..4742fc28 --- /dev/null +++ b/io/getstream/client/Feed.html @@ -0,0 +1,991 @@ + + + + + +Feed (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Feed

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.Feed
    • +
    +
  • +
+
+ +
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/FileStorageClient.html b/io/getstream/client/FileStorageClient.html new file mode 100644 index 00000000..746c1e89 --- /dev/null +++ b/io/getstream/client/FileStorageClient.html @@ -0,0 +1,309 @@ + + + + + +FileStorageClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FileStorageClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.FileStorageClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class FileStorageClient
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.net.URL url) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(java.io.File content) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(java.lang.String fileName, + byte[] content) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        upload

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> upload​(java.lang.String fileName,
        +                                                                    byte[] content)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        upload

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> upload​(java.io.File content)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(java.net.URL url)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/FlatFeed.html b/io/getstream/client/FlatFeed.html new file mode 100644 index 00000000..6fdbb3d0 --- /dev/null +++ b/io/getstream/client/FlatFeed.html @@ -0,0 +1,1850 @@ + + + + + +FlatFeed (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FlatFeed

+
+
+ +
+
    +
  • +
    +
    public final class FlatFeed
    +extends Feed
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/ImageStorageClient.html b/io/getstream/client/ImageStorageClient.html new file mode 100644 index 00000000..a1bd7f8c --- /dev/null +++ b/io/getstream/client/ImageStorageClient.html @@ -0,0 +1,351 @@ + + + + + +ImageStorageClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ImageStorageClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.ImageStorageClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class ImageStorageClient
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.net.URL url) 
      java8.util.concurrent.CompletableFuture<java.net.URL>process​(java.net.URL url, + Crop crop) 
      java8.util.concurrent.CompletableFuture<java.net.URL>process​(java.net.URL url, + Resize resize) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(java.io.File content) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(java.lang.String fileName, + byte[] content) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        upload

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> upload​(java.lang.String fileName,
        +                                                                    byte[] content)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        upload

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> upload​(java.io.File content)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(java.net.URL url)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        process

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> process​(java.net.URL url,
        +                                                                     Crop crop)
        +                                                              throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        process

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> process​(java.net.URL url,
        +                                                                     Resize resize)
        +                                                              throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/NotificationFeed.html b/io/getstream/client/NotificationFeed.html new file mode 100644 index 00000000..e5b51ec4 --- /dev/null +++ b/io/getstream/client/NotificationFeed.html @@ -0,0 +1,1850 @@ + + + + + +NotificationFeed (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NotificationFeed

+
+
+ +
+
    +
  • +
    +
    public final class NotificationFeed
    +extends Feed
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/PersonalizationClient.html b/io/getstream/client/PersonalizationClient.html new file mode 100644 index 00000000..abac9ca4 --- /dev/null +++ b/io/getstream/client/PersonalizationClient.html @@ -0,0 +1,510 @@ + + + + + +PersonalizationClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PersonalizationClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.PersonalizationClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class PersonalizationClient
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.lang.String resource) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.lang.String userID, + java.lang.String resource) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.lang.String userID, + java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> params) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> params) 
      java8.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>>get​(java.lang.String resource) 
      java8.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>>get​(java.lang.String userID, + java.lang.String resource) 
      java8.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>>get​(java.lang.String userID, + java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> params) 
      java8.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>>get​(java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> params) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>post​(java.lang.String userID, + java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> payload) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>post​(java.lang.String userID, + java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> params, + java.util.Map<java.lang.String,​java.lang.Object> payload) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>post​(java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> payload) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>post​(java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> params, + java.util.Map<java.lang.String,​java.lang.Object> payload) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        get

        +
        public java8.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>> get​(java.lang.String resource)
        +                                                                                                    throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        get

        +
        public java8.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>> get​(java.lang.String resource,
        +                                                                                                           java.util.Map<java.lang.String,​java.lang.Object> params)
        +                                                                                                    throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        get

        +
        public java8.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>> get​(java.lang.String userID,
        +                                                                                                           java.lang.String resource)
        +                                                                                                    throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        get

        +
        public java8.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>> get​(java.lang.String userID,
        +                                                                                                           java.lang.String resource,
        +                                                                                                           java.util.Map<java.lang.String,​java.lang.Object> params)
        +                                                                                                    throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        post

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> post​(java.lang.String resource,
        +                                                                    java.util.Map<java.lang.String,​java.lang.Object> payload)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        post

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> post​(java.lang.String resource,
        +                                                                    java.util.Map<java.lang.String,​java.lang.Object> params,
        +                                                                    java.util.Map<java.lang.String,​java.lang.Object> payload)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        post

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> post​(java.lang.String userID,
        +                                                                    java.lang.String resource,
        +                                                                    java.util.Map<java.lang.String,​java.lang.Object> payload)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        post

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> post​(java.lang.String userID,
        +                                                                    java.lang.String resource,
        +                                                                    java.util.Map<java.lang.String,​java.lang.Object> params,
        +                                                                    java.util.Map<java.lang.String,​java.lang.Object> payload)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(java.lang.String resource)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(java.lang.String resource,
        +                                                                      java.util.Map<java.lang.String,​java.lang.Object> params)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(java.lang.String userID,
        +                                                                      java.lang.String resource)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(java.lang.String userID,
        +                                                                      java.lang.String resource,
        +                                                                      java.util.Map<java.lang.String,​java.lang.Object> params)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/ReactionsClient.html b/io/getstream/client/ReactionsClient.html new file mode 100644 index 00000000..4e6ae99c --- /dev/null +++ b/io/getstream/client/ReactionsClient.html @@ -0,0 +1,921 @@ + + + + + +ReactionsClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ReactionsClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.ReactionsClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class ReactionsClient
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<Reaction>add​(java.lang.String userID, + Reaction reaction, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>add​(java.lang.String userID, + Reaction reaction, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>add​(java.lang.String userID, + java.lang.String kind, + java.lang.String activityID, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>add​(java.lang.String userID, + java.lang.String kind, + java.lang.String activityID, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>addChild​(java.lang.String userID, + java.lang.String parentID, + Reaction reaction, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>addChild​(java.lang.String userID, + java.lang.String parentID, + Reaction reaction, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>addChild​(java.lang.String userID, + java.lang.String kind, + java.lang.String parentID, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>addChild​(java.lang.String userID, + java.lang.String kind, + java.lang.String parentID, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.lang.String id) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Filter filter) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Limit limit) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Limit limit, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<Reaction>get​(java.lang.String id) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(LookupKind lookup, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(LookupKind lookup, + java.lang.String id, + Filter filter) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(LookupKind lookup, + java.lang.String id, + Limit limit) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(LookupKind lookup, + java.lang.String id, + Limit limit, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(LookupKind lookup, + java.lang.String id, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(java.lang.String next) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>update​(Reaction reaction, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>update​(Reaction reaction, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>update​(java.lang.String id, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>update​(java.lang.String id, + java.lang.Iterable<FeedID> targetFeeds) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/client/User.html b/io/getstream/client/User.html new file mode 100644 index 00000000..6e7eacce --- /dev/null +++ b/io/getstream/client/User.html @@ -0,0 +1,458 @@ + + + + + +User (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class User

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.client.User
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class User
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      User​(Client client, + java.lang.String id) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<Data>create() 
      java8.util.concurrent.CompletableFuture<Data>create​(Data data) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete() 
      java8.util.concurrent.CompletableFuture<Data>get() 
      java.lang.StringgetID() 
      java8.util.concurrent.CompletableFuture<Data>getOrCreate() 
      java8.util.concurrent.CompletableFuture<Data>getOrCreate​(Data data) 
      java8.util.concurrent.CompletableFuture<ProfileData>profile() 
      java8.util.concurrent.CompletableFuture<Data>update​(Data data) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ + + + diff --git a/io/getstream/client/package-summary.html b/io/getstream/client/package-summary.html new file mode 100644 index 00000000..90031ed3 --- /dev/null +++ b/io/getstream/client/package-summary.html @@ -0,0 +1,216 @@ + + + + + +io.getstream.client (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.client

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/client/package-tree.html b/io/getstream/client/package-tree.html new file mode 100644 index 00000000..3fc7e21c --- /dev/null +++ b/io/getstream/client/package-tree.html @@ -0,0 +1,177 @@ + + + + + +io.getstream.client Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.client

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+
+ + + diff --git a/io/getstream/cloud/CloudAggregatedFeed.html b/io/getstream/cloud/CloudAggregatedFeed.html new file mode 100644 index 00000000..9693500b --- /dev/null +++ b/io/getstream/cloud/CloudAggregatedFeed.html @@ -0,0 +1,1850 @@ + + + + + +CloudAggregatedFeed (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudAggregatedFeed

+
+
+ +
+
    +
  • +
    +
    public class CloudAggregatedFeed
    +extends CloudFeed
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/CloudAnalyticsClient.html b/io/getstream/cloud/CloudAnalyticsClient.html new file mode 100644 index 00000000..7ad27960 --- /dev/null +++ b/io/getstream/cloud/CloudAnalyticsClient.html @@ -0,0 +1,307 @@ + + + + + +CloudAnalyticsClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudAnalyticsClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.cloud.CloudAnalyticsClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class CloudAnalyticsClient
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<java.lang.Void>trackEngagement​(Engagement... events) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>trackEngagement​(java.lang.Iterable<Engagement> events) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>trackImpression​(Impression event) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/CloudClient.Builder.html b/io/getstream/cloud/CloudClient.Builder.html new file mode 100644 index 00000000..5b3fbd35 --- /dev/null +++ b/io/getstream/cloud/CloudClient.Builder.html @@ -0,0 +1,434 @@ + + + + + +CloudClient.Builder (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudClient.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.cloud.CloudClient.Builder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    CloudClient
    +
    +
    +
    public static final class CloudClient.Builder
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/cloud/CloudClient.html b/io/getstream/cloud/CloudClient.html new file mode 100644 index 00000000..c15ec46d --- /dev/null +++ b/io/getstream/cloud/CloudClient.html @@ -0,0 +1,626 @@ + + + + + +CloudClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.cloud.CloudClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class CloudClient
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/CloudCollectionsClient.html b/io/getstream/cloud/CloudCollectionsClient.html new file mode 100644 index 00000000..d01b3d48 --- /dev/null +++ b/io/getstream/cloud/CloudCollectionsClient.html @@ -0,0 +1,499 @@ + + + + + +CloudCollectionsClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudCollectionsClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.cloud.CloudCollectionsClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class CloudCollectionsClient
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<CollectionData>add​(java.lang.String collection, + CollectionData item) 
      java8.util.concurrent.CompletableFuture<CollectionData>add​(java.lang.String userID, + java.lang.String collection, + CollectionData item) 
      <T> java8.util.concurrent.CompletableFuture<T>addCustom​(java.lang.String userID, + java.lang.String collection, + T item) 
      <T> java8.util.concurrent.CompletableFuture<T>addCustom​(java.lang.String collection, + T item) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.lang.String collection, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<CollectionData>get​(java.lang.String collection, + java.lang.String id) 
      <T> java8.util.concurrent.CompletableFuture<T>getCustom​(java.lang.Class<T> type, + java.lang.String collection, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<CollectionData>update​(java.lang.String collection, + CollectionData item) 
      java8.util.concurrent.CompletableFuture<CollectionData>update​(java.lang.String userID, + java.lang.String collection, + CollectionData item) 
      <T> java8.util.concurrent.CompletableFuture<T>updateCustom​(java.lang.String userID, + java.lang.String collection, + T item) 
      <T> java8.util.concurrent.CompletableFuture<T>updateCustom​(java.lang.String collection, + T item) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/CloudFeed.html b/io/getstream/cloud/CloudFeed.html new file mode 100644 index 00000000..6b8fe2e4 --- /dev/null +++ b/io/getstream/cloud/CloudFeed.html @@ -0,0 +1,896 @@ + + + + + +CloudFeed (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudFeed

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.cloud.CloudFeed
    • +
    +
  • +
+
+ +
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/CloudFileStorageClient.html b/io/getstream/cloud/CloudFileStorageClient.html new file mode 100644 index 00000000..432f77a5 --- /dev/null +++ b/io/getstream/cloud/CloudFileStorageClient.html @@ -0,0 +1,309 @@ + + + + + +CloudFileStorageClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudFileStorageClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.cloud.CloudFileStorageClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class CloudFileStorageClient
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.net.URL url) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(java.io.File content) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(java.lang.String fileName, + byte[] content) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        upload

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> upload​(java.lang.String fileName,
        +                                                                    byte[] content)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        upload

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> upload​(java.io.File content)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(java.net.URL url)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/CloudFlatFeed.html b/io/getstream/cloud/CloudFlatFeed.html new file mode 100644 index 00000000..0eb89768 --- /dev/null +++ b/io/getstream/cloud/CloudFlatFeed.html @@ -0,0 +1,1850 @@ + + + + + +CloudFlatFeed (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudFlatFeed

+
+
+ +
+
    +
  • +
    +
    public final class CloudFlatFeed
    +extends CloudFeed
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/CloudImageStorageClient.html b/io/getstream/cloud/CloudImageStorageClient.html new file mode 100644 index 00000000..a92d19c9 --- /dev/null +++ b/io/getstream/cloud/CloudImageStorageClient.html @@ -0,0 +1,351 @@ + + + + + +CloudImageStorageClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudImageStorageClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.cloud.CloudImageStorageClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class CloudImageStorageClient
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.net.URL url) 
      java8.util.concurrent.CompletableFuture<java.net.URL>process​(java.net.URL url, + Crop crop) 
      java8.util.concurrent.CompletableFuture<java.net.URL>process​(java.net.URL url, + Resize resize) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(java.io.File content) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(java.lang.String fileName, + byte[] content) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        upload

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> upload​(java.lang.String fileName,
        +                                                                    byte[] content)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        upload

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> upload​(java.io.File content)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(java.net.URL url)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        process

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> process​(java.net.URL url,
        +                                                                     Crop crop)
        +                                                              throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        process

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> process​(java.net.URL url,
        +                                                                     Resize resize)
        +                                                              throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/CloudNotificationFeed.html b/io/getstream/cloud/CloudNotificationFeed.html new file mode 100644 index 00000000..bf334a61 --- /dev/null +++ b/io/getstream/cloud/CloudNotificationFeed.html @@ -0,0 +1,1850 @@ + + + + + +CloudNotificationFeed (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudNotificationFeed

+
+
+ +
+
    +
  • +
    +
    public final class CloudNotificationFeed
    +extends CloudFeed
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/CloudReactionsClient.Params.html b/io/getstream/cloud/CloudReactionsClient.Params.html new file mode 100644 index 00000000..fa5dc8e9 --- /dev/null +++ b/io/getstream/cloud/CloudReactionsClient.Params.html @@ -0,0 +1,436 @@ + + + + + +CloudReactionsClient.Params (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudReactionsClient.Params

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.cloud.CloudReactionsClient.Params
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    CloudReactionsClient
    +
    +
    +
    public class CloudReactionsClient.Params
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/cloud/CloudReactionsClient.html b/io/getstream/cloud/CloudReactionsClient.html new file mode 100644 index 00000000..5625cf7c --- /dev/null +++ b/io/getstream/cloud/CloudReactionsClient.html @@ -0,0 +1,875 @@ + + + + + +CloudReactionsClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudReactionsClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.cloud.CloudReactionsClient
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class CloudReactionsClient
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<Reaction>add​(Reaction reaction, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>add​(Reaction reaction, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>add​(java.lang.String userID, + Reaction reaction, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>add​(java.lang.String userID, + Reaction reaction, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>add​(java.lang.String kind, + java.lang.String activityID, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>add​(java.lang.String kind, + java.lang.String activityID, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>add​(java.lang.String userID, + java.lang.String kind, + java.lang.String activityID, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>add​(java.lang.String userID, + java.lang.String kind, + java.lang.String activityID, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>addChild​(java.lang.String userID, + java.lang.String parentID, + Reaction reaction, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>addChild​(java.lang.String userID, + java.lang.String parentID, + Reaction reaction, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>addChild​(java.lang.String userID, + java.lang.String kind, + java.lang.String parentID, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<Reaction>addChild​(java.lang.String userID, + java.lang.String kind, + java.lang.String parentID, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(java.lang.String id) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Filter filter) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit, + java.lang.String kind, + java.lang.Boolean includeOwnChildren) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Limit limit) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + Limit limit, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(LookupKind lookup, + java.lang.String id, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<Reaction>get​(java.lang.String id) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>update​(Reaction reaction, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>update​(Reaction reaction, + java.lang.Iterable<FeedID> targetFeeds) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>update​(java.lang.String id, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>update​(java.lang.String id, + java.lang.Iterable<FeedID> targetFeeds) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/CloudUser.html b/io/getstream/cloud/CloudUser.html new file mode 100644 index 00000000..721dc8b8 --- /dev/null +++ b/io/getstream/cloud/CloudUser.html @@ -0,0 +1,458 @@ + + + + + +CloudUser (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CloudUser

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.cloud.CloudUser
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class CloudUser
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      CloudUser​(CloudClient client, + java.lang.String id) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<Data>create() 
      java8.util.concurrent.CompletableFuture<Data>create​(Data data) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete() 
      java8.util.concurrent.CompletableFuture<Data>get() 
      java.lang.StringgetID() 
      java8.util.concurrent.CompletableFuture<Data>getOrCreate() 
      java8.util.concurrent.CompletableFuture<Data>getOrCreate​(Data data) 
      java8.util.concurrent.CompletableFuture<ProfileData>profile() 
      java8.util.concurrent.CompletableFuture<Data>update​(Data data) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ + + + diff --git a/io/getstream/cloud/FeedSubscriber.html b/io/getstream/cloud/FeedSubscriber.html new file mode 100644 index 00000000..6b3e2f2a --- /dev/null +++ b/io/getstream/cloud/FeedSubscriber.html @@ -0,0 +1,250 @@ + + + + + +FeedSubscriber (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface FeedSubscriber

+
+
+
+
    +
  • +
    +
    public interface FeedSubscriber
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/RealtimeMessageCallback.html b/io/getstream/cloud/RealtimeMessageCallback.html new file mode 100644 index 00000000..412073fe --- /dev/null +++ b/io/getstream/cloud/RealtimeMessageCallback.html @@ -0,0 +1,248 @@ + + + + + +RealtimeMessageCallback (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface RealtimeMessageCallback

+
+
+
+
    +
  • +
    +
    public interface RealtimeMessageCallback
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/cloud/package-summary.html b/io/getstream/cloud/package-summary.html new file mode 100644 index 00000000..a6e67c2b --- /dev/null +++ b/io/getstream/cloud/package-summary.html @@ -0,0 +1,227 @@ + + + + + +io.getstream.cloud (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.cloud

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/cloud/package-tree.html b/io/getstream/cloud/package-tree.html new file mode 100644 index 00000000..9d4c6910 --- /dev/null +++ b/io/getstream/cloud/package-tree.html @@ -0,0 +1,183 @@ + + + + + +io.getstream.cloud Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.cloud

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+ + + diff --git a/io/getstream/core/KeepHistory.html b/io/getstream/core/KeepHistory.html new file mode 100644 index 00000000..ebe220e5 --- /dev/null +++ b/io/getstream/core/KeepHistory.html @@ -0,0 +1,390 @@ + + + + + +KeepHistory (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum KeepHistory

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<KeepHistory>
    • +
    • +
        +
      • io.getstream.core.KeepHistory
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<KeepHistory>
    +
    +
    +
    public enum KeepHistory
    +extends java.lang.Enum<KeepHistory>
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      NO 
      YES 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleangetFlag() 
      static KeepHistoryvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static KeepHistory[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static KeepHistory[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (KeepHistory c : KeepHistory.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static KeepHistory valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        getFlag

        +
        public boolean getFlag()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/LookupKind.html b/io/getstream/core/LookupKind.html new file mode 100644 index 00000000..d74d35d9 --- /dev/null +++ b/io/getstream/core/LookupKind.html @@ -0,0 +1,416 @@ + + + + + +LookupKind (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum LookupKind

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<LookupKind>
    • +
    • +
        +
      • io.getstream.core.LookupKind
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<LookupKind>
    +
    +
    +
    public enum LookupKind
    +extends java.lang.Enum<LookupKind>
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringgetKind() 
      static LookupKindvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static LookupKind[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        ACTIVITY

        +
        public static final LookupKind ACTIVITY
        +
      • +
      + + + +
        +
      • +

        ACTIVITY_WITH_DATA

        +
        public static final LookupKind ACTIVITY_WITH_DATA
        +
      • +
      + + + +
        +
      • +

        REACTION

        +
        public static final LookupKind REACTION
        +
      • +
      + + + +
        +
      • +

        USER

        +
        public static final LookupKind USER
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static LookupKind[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (LookupKind c : LookupKind.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static LookupKind valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        getKind

        +
        public java.lang.String getKind()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/Region.html b/io/getstream/core/Region.html new file mode 100644 index 00000000..c686fcba --- /dev/null +++ b/io/getstream/core/Region.html @@ -0,0 +1,433 @@ + + + + + +Region (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Region

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<Region>
    • +
    • +
        +
      • io.getstream.core.Region
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Region>
    +
    +
    +
    public enum Region
    +extends java.lang.Enum<Region>
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringtoString() 
      static RegionvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Region[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        US_EAST

        +
        public static final Region US_EAST
        +
      • +
      + + + +
        +
      • +

        TOKYO

        +
        public static final Region TOKYO
        +
      • +
      + + + +
        +
      • +

        DUBLIN

        +
        public static final Region DUBLIN
        +
      • +
      + + + +
        +
      • +

        SINGAPORE

        +
        public static final Region SINGAPORE
        +
      • +
      + + + +
        +
      • +

        CANADA

        +
        public static final Region CANADA
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Region[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Region c : Region.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Region valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Enum<Region>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/Stream.html b/io/getstream/core/Stream.html new file mode 100644 index 00000000..63fa2e94 --- /dev/null +++ b/io/getstream/core/Stream.html @@ -0,0 +1,905 @@ + + + + + +Stream (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Stream

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.Stream
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Stream
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/StreamAnalytics.html b/io/getstream/core/StreamAnalytics.html new file mode 100644 index 00000000..b6df6785 --- /dev/null +++ b/io/getstream/core/StreamAnalytics.html @@ -0,0 +1,317 @@ + + + + + +StreamAnalytics (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StreamAnalytics

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.StreamAnalytics
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class StreamAnalytics
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/StreamBatch.html b/io/getstream/core/StreamBatch.html new file mode 100644 index 00000000..f080aebe --- /dev/null +++ b/io/getstream/core/StreamBatch.html @@ -0,0 +1,466 @@ + + + + + +StreamBatch (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StreamBatch

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.StreamBatch
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class StreamBatch
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/StreamCollections.html b/io/getstream/core/StreamCollections.html new file mode 100644 index 00000000..23d8748d --- /dev/null +++ b/io/getstream/core/StreamCollections.html @@ -0,0 +1,415 @@ + + + + + +StreamCollections (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StreamCollections

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.StreamCollections
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class StreamCollections
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<CollectionData>add​(Token token, + java.lang.String userID, + java.lang.String collection, + CollectionData item) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(Token token, + java.lang.String collection, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>deleteMany​(Token token, + java.lang.String collection, + java.lang.String... ids) 
      java8.util.concurrent.CompletableFuture<CollectionData>get​(Token token, + java.lang.String collection, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<java.util.List<CollectionData>>select​(Token token, + java.lang.String collection, + java.lang.String... ids) 
      java8.util.concurrent.CompletableFuture<CollectionData>update​(Token token, + java.lang.String userID, + java.lang.String collection, + CollectionData item) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>upsert​(Token token, + java.lang.String collection, + CollectionData... items) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/StreamFiles.html b/io/getstream/core/StreamFiles.html new file mode 100644 index 00000000..ccc0b441 --- /dev/null +++ b/io/getstream/core/StreamFiles.html @@ -0,0 +1,315 @@ + + + + + +StreamFiles (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StreamFiles

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.StreamFiles
    • +
    +
  • +
+
+
    +
  • +
    +
    public class StreamFiles
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(Token token, + java.net.URL targetURL) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(Token token, + java.io.File content) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(Token token, + java.lang.String fileName, + byte[] content) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        upload

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> upload​(Token token,
        +                                                                    java.lang.String fileName,
        +                                                                    byte[] content)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        upload

        +
        public java8.util.concurrent.CompletableFuture<java.net.URL> upload​(Token token,
        +                                                                    java.io.File content)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(Token token,
        +                                                                      java.net.URL targetURL)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/StreamImages.html b/io/getstream/core/StreamImages.html new file mode 100644 index 00000000..638613b0 --- /dev/null +++ b/io/getstream/core/StreamImages.html @@ -0,0 +1,338 @@ + + + + + +StreamImages (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StreamImages

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.StreamImages
    • +
    +
  • +
+
+
    +
  • +
    +
    public class StreamImages
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(Token token, + java.net.URL targetURL) 
      java8.util.concurrent.CompletableFuture<java.net.URL>process​(Token token, + java.net.URL targetURL, + RequestOption option) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(Token token, + java.io.File content) 
      java8.util.concurrent.CompletableFuture<java.net.URL>upload​(Token token, + java.lang.String fileName, + byte[] content) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/StreamPersonalization.html b/io/getstream/core/StreamPersonalization.html new file mode 100644 index 00000000..92196570 --- /dev/null +++ b/io/getstream/core/StreamPersonalization.html @@ -0,0 +1,327 @@ + + + + + +StreamPersonalization (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StreamPersonalization

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.StreamPersonalization
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class StreamPersonalization
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(Token token, + java.lang.String userID, + java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> params) 
      java8.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>>get​(Token token, + java.lang.String userID, + java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> params) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>post​(Token token, + java.lang.String userID, + java.lang.String resource, + java.util.Map<java.lang.String,​java.lang.Object> params, + java.util.Map<java.lang.String,​java.lang.Object> payload) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        get

        +
        public java8.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,​java.lang.Object>> get​(Token token,
        +                                                                                                           java.lang.String userID,
        +                                                                                                           java.lang.String resource,
        +                                                                                                           java.util.Map<java.lang.String,​java.lang.Object> params)
        +                                                                                                    throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        post

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> post​(Token token,
        +                                                                    java.lang.String userID,
        +                                                                    java.lang.String resource,
        +                                                                    java.util.Map<java.lang.String,​java.lang.Object> params,
        +                                                                    java.util.Map<java.lang.String,​java.lang.Object> payload)
        +                                                             throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        public java8.util.concurrent.CompletableFuture<java.lang.Void> delete​(Token token,
        +                                                                      java.lang.String userID,
        +                                                                      java.lang.String resource,
        +                                                                      java.util.Map<java.lang.String,​java.lang.Object> params)
        +                                                               throws StreamException
        +
        +
        Throws:
        +
        StreamException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/StreamReactions.html b/io/getstream/core/StreamReactions.html new file mode 100644 index 00000000..cec43885 --- /dev/null +++ b/io/getstream/core/StreamReactions.html @@ -0,0 +1,502 @@ + + + + + +StreamReactions (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StreamReactions

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.StreamReactions
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class StreamReactions
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java8.util.concurrent.CompletableFuture<Reaction>add​(Token token, + java.lang.String userID, + Reaction reaction, + FeedID... targetFeeds) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>delete​(Token token, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(Token token, + LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<java.util.List<Reaction>>filter​(Token token, + LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit, + java.lang.String kind, + java.lang.Boolean withOwnChildren) 
      java8.util.concurrent.CompletableFuture<Reaction>get​(Token token, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<Paginated>getPaginated​(Token token, + java.lang.String id) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(Token token, + LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit, + java.lang.String kind) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(Token token, + LookupKind lookup, + java.lang.String id, + Filter filter, + Limit limit, + java.lang.String kind, + java.lang.Boolean withOwnChildren) 
      java8.util.concurrent.CompletableFuture<Paginated<Reaction>>paginatedFilter​(Token token, + java.lang.String next) 
      java8.util.concurrent.CompletableFuture<java.lang.Void>update​(Token token, + Reaction reaction, + FeedID... targetFeeds) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/exceptions/StreamAPIException.html b/io/getstream/core/exceptions/StreamAPIException.html new file mode 100644 index 00000000..69677973 --- /dev/null +++ b/io/getstream/core/exceptions/StreamAPIException.html @@ -0,0 +1,368 @@ + + + + + +StreamAPIException (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StreamAPIException

+
+
+ +
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public final class StreamAPIException
    +extends StreamException
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      StreamAPIException​(java.lang.String message, + int errorCode, + int statusCode, + java.lang.String errorName) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      intgetErrorCode() 
      java.lang.StringgetErrorName() 
      intgetStatusCode() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StreamAPIException

        +
        public StreamAPIException​(java.lang.String message,
        +                          int errorCode,
        +                          int statusCode,
        +                          java.lang.String errorName)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getErrorCode

        +
        public int getErrorCode()
        +
      • +
      + + + +
        +
      • +

        getStatusCode

        +
        public int getStatusCode()
        +
      • +
      + + + +
        +
      • +

        getErrorName

        +
        public java.lang.String getErrorName()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/exceptions/StreamException.html b/io/getstream/core/exceptions/StreamException.html new file mode 100644 index 00000000..04544151 --- /dev/null +++ b/io/getstream/core/exceptions/StreamException.html @@ -0,0 +1,361 @@ + + + + + +StreamException (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class StreamException

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • java.lang.Exception
      • +
      • +
          +
        • io.getstream.core.exceptions.StreamException
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    Direct Known Subclasses:
    +
    StreamAPIException
    +
    +
    +
    public class StreamException
    +extends java.lang.Exception
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Constructors 
      ModifierConstructorDescription
       StreamException() 
       StreamException​(java.lang.String message) 
       StreamException​(java.lang.String message, + java.lang.Throwable cause) 
      protected StreamException​(java.lang.String message, + java.lang.Throwable cause, + boolean enableSuppression, + boolean writableStackTrace) 
       StreamException​(java.lang.Throwable cause) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        StreamException

        +
        public StreamException()
        +
      • +
      + + + +
        +
      • +

        StreamException

        +
        public StreamException​(java.lang.String message)
        +
      • +
      + + + +
        +
      • +

        StreamException

        +
        public StreamException​(java.lang.String message,
        +                       java.lang.Throwable cause)
        +
      • +
      + + + +
        +
      • +

        StreamException

        +
        public StreamException​(java.lang.Throwable cause)
        +
      • +
      + + + +
        +
      • +

        StreamException

        +
        protected StreamException​(java.lang.String message,
        +                          java.lang.Throwable cause,
        +                          boolean enableSuppression,
        +                          boolean writableStackTrace)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/exceptions/package-summary.html b/io/getstream/core/exceptions/package-summary.html new file mode 100644 index 00000000..c4a3355a --- /dev/null +++ b/io/getstream/core/exceptions/package-summary.html @@ -0,0 +1,168 @@ + + + + + +io.getstream.core.exceptions (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core.exceptions

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/core/exceptions/package-tree.html b/io/getstream/core/exceptions/package-tree.html new file mode 100644 index 00000000..8eb389b9 --- /dev/null +++ b/io/getstream/core/exceptions/package-tree.html @@ -0,0 +1,173 @@ + + + + + +io.getstream.core.exceptions Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core.exceptions

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Throwable (implements java.io.Serializable) + +
    • +
    +
  • +
+
+
+
+ + + diff --git a/io/getstream/core/faye/Advice.html b/io/getstream/core/faye/Advice.html new file mode 100644 index 00000000..739cb6ca --- /dev/null +++ b/io/getstream/core/faye/Advice.html @@ -0,0 +1,485 @@ + + + + + +Advice (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Advice

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.faye.Advice
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Advice
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static java.lang.StringHANDSHAKE 
      static java.lang.StringNONE 
      static java.lang.StringRETRY 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Advice() 
      Advice​(java.lang.String reconnect, + java.lang.Integer interval, + java.lang.Integer timeout) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      java.lang.IntegergetInterval() 
      java.lang.StringgetReconnect() 
      java.lang.IntegergetTimeout() 
      inthashCode() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Advice

        +
        public Advice()
        +
      • +
      + + + +
        +
      • +

        Advice

        +
        public Advice​(java.lang.String reconnect,
        +              java.lang.Integer interval,
        +              java.lang.Integer timeout)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getReconnect

        +
        public java.lang.String getReconnect()
        +
      • +
      + + + +
        +
      • +

        getInterval

        +
        public java.lang.Integer getInterval()
        +
      • +
      + + + +
        +
      • +

        getTimeout

        +
        public java.lang.Integer getTimeout()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/faye/Channel.html b/io/getstream/core/faye/Channel.html new file mode 100644 index 00000000..9e7f47e7 --- /dev/null +++ b/io/getstream/core/faye/Channel.html @@ -0,0 +1,641 @@ + + + + + +Channel (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Channel

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.faye.Channel
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Channel
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static java.lang.StringCONNECT 
      static java.lang.StringDISCONNECT 
      static java.lang.StringHANDSHAKE 
      static java.lang.StringSUBSCRIBE 
      static java.lang.StringUNSUBSCRIBE 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Channel​(java.lang.String name) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidbind​(java.lang.String event, + EventListener<Message> listener) 
      booleanequals​(java.lang.Object o) 
      static java.util.List<java.lang.String>expand​(java.lang.String name) 
      java.lang.StringgetName() 
      inthashCode() 
      booleanhasListeners​(java.lang.String event) 
      static java.lang.BooleanisMeta​(java.lang.String name) 
      static java.lang.BooleanisService​(java.lang.String name) 
      static java.lang.BooleanisSubscribable​(java.lang.String name) 
      static booleanisValid​(java.lang.String name) 
      static java.util.List<java.lang.String>parse​(java.lang.String name) 
      java.lang.StringtoString() 
      voidtrigger​(java.lang.String event, + Message message) 
      voidunbind​(java.lang.String event, + EventListener<Message> listener) 
      static java.lang.Stringunparse​(java.util.List<java.lang.String> segments) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Channel

        +
        public Channel​(java.lang.String name)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getName

        +
        public java.lang.String getName()
        +
      • +
      + + + + + + + +
        +
      • +

        unbind

        +
        public void unbind​(java.lang.String event,
        +                   EventListener<Message> listener)
        +
      • +
      + + + +
        +
      • +

        trigger

        +
        public void trigger​(java.lang.String event,
        +                    Message message)
        +
      • +
      + + + +
        +
      • +

        hasListeners

        +
        public boolean hasListeners​(java.lang.String event)
        +                     throws java.lang.Exception
        +
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + +
        +
      • +

        expand

        +
        public static java.util.List<java.lang.String> expand​(java.lang.String name)
        +
      • +
      + + + +
        +
      • +

        isValid

        +
        public static boolean isValid​(java.lang.String name)
        +
      • +
      + + + +
        +
      • +

        parse

        +
        public static java.util.List<java.lang.String> parse​(java.lang.String name)
        +
      • +
      + + + +
        +
      • +

        unparse

        +
        public static java.lang.String unparse​(java.util.List<java.lang.String> segments)
        +
      • +
      + + + +
        +
      • +

        isMeta

        +
        public static java.lang.Boolean isMeta​(java.lang.String name)
        +
      • +
      + + + +
        +
      • +

        isService

        +
        public static java.lang.Boolean isService​(java.lang.String name)
        +
      • +
      + + + +
        +
      • +

        isSubscribable

        +
        public static java.lang.Boolean isSubscribable​(java.lang.String name)
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/faye/DefaultMessageTransformer.html b/io/getstream/core/faye/DefaultMessageTransformer.html new file mode 100644 index 00000000..9b281ce9 --- /dev/null +++ b/io/getstream/core/faye/DefaultMessageTransformer.html @@ -0,0 +1,331 @@ + + + + + +DefaultMessageTransformer (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DefaultMessageTransformer

+
+
+ +
+ +
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/faye/FayeClientError.html b/io/getstream/core/faye/FayeClientError.html new file mode 100644 index 00000000..ce12c252 --- /dev/null +++ b/io/getstream/core/faye/FayeClientError.html @@ -0,0 +1,382 @@ + + + + + +FayeClientError (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FayeClientError

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Throwable
    • +
    • +
        +
      • io.getstream.core.faye.FayeClientError
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable
    +
    +
    +
    public class FayeClientError
    +extends java.lang.Throwable
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      FayeClientError​(java.lang.Integer code, + java.util.List<java.lang.String> params, + java.lang.String errorMessage) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      inthashCode() 
      static FayeClientErrorparse​(java.lang.String errorMessage) 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Throwable

        +addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FayeClientError

        +
        public FayeClientError​(java.lang.Integer code,
        +                       java.util.List<java.lang.String> params,
        +                       java.lang.String errorMessage)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        parse

        +
        public static FayeClientError parse​(java.lang.String errorMessage)
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Throwable
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/faye/Grammar.html b/io/getstream/core/faye/Grammar.html new file mode 100644 index 00000000..567e3d00 --- /dev/null +++ b/io/getstream/core/faye/Grammar.html @@ -0,0 +1,266 @@ + + + + + +Grammar (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Grammar

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.faye.Grammar
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Grammar
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Grammar() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Grammar

        +
        public Grammar()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/faye/Message.html b/io/getstream/core/faye/Message.html new file mode 100644 index 00000000..cf4ab3b8 --- /dev/null +++ b/io/getstream/core/faye/Message.html @@ -0,0 +1,707 @@ + + + + + +Message (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Message

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.faye.Message
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Message
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Message

        +
        public Message()
        +
      • +
      + + + +
        +
      • +

        Message

        +
        public Message​(java.lang.String channel)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setId

        +
        public void setId​(java.lang.String id)
        +
      • +
      + + + +
        +
      • +

        setClientId

        +
        public void setClientId​(java.lang.String clientId)
        +
      • +
      + + + +
        +
      • +

        setConnectionType

        +
        public void setConnectionType​(java.lang.String connectionType)
        +
      • +
      + + + +
        +
      • +

        setVersion

        +
        public void setVersion​(java.lang.String version)
        +
      • +
      + + + +
        +
      • +

        setMinimumVersion

        +
        public void setMinimumVersion​(java.lang.String minimumVersion)
        +
      • +
      + + + +
        +
      • +

        setSupportedConnectionTypes

        +
        public void setSupportedConnectionTypes​(java.lang.String[] supportedConnectionTypes)
        +
      • +
      + + + +
        +
      • +

        setAdvice

        +
        public void setAdvice​(Advice advice)
        +
      • +
      + + + +
        +
      • +

        setSuccessful

        +
        public void setSuccessful​(java.lang.Boolean successful)
        +
      • +
      + + + +
        +
      • +

        setSubscription

        +
        public void setSubscription​(java.lang.String subscription)
        +
      • +
      + + + +
        +
      • +

        setData

        +
        public void setData​(java.util.Map<java.lang.String,​java.lang.Object> data)
        +
      • +
      + + + +
        +
      • +

        setExt

        +
        public void setExt​(java.util.Map<java.lang.String,​java.lang.Object> ext)
        +
      • +
      + + + +
        +
      • +

        setError

        +
        public void setError​(java.lang.String error)
        +
      • +
      + + + +
        +
      • +

        getId

        +
        public java.lang.String getId()
        +
      • +
      + + + +
        +
      • +

        getChannel

        +
        public java.lang.String getChannel()
        +
      • +
      + + + +
        +
      • +

        getClientId

        +
        public java.lang.String getClientId()
        +
      • +
      + + + +
        +
      • +

        getConnectionType

        +
        public java.lang.String getConnectionType()
        +
      • +
      + + + +
        +
      • +

        getVersion

        +
        public java.lang.String getVersion()
        +
      • +
      + + + +
        +
      • +

        getMinimumVersion

        +
        public java.lang.String getMinimumVersion()
        +
      • +
      + + + +
        +
      • +

        getSupportedConnectionTypes

        +
        public java.lang.String[] getSupportedConnectionTypes()
        +
      • +
      + + + +
        +
      • +

        getAdvice

        +
        public Advice getAdvice()
        +
      • +
      + + + +
        +
      • +

        isSuccessful

        +
        public java.lang.Boolean isSuccessful()
        +
      • +
      + + + +
        +
      • +

        getSubscription

        +
        public java.lang.String getSubscription()
        +
      • +
      + + + +
        +
      • +

        getData

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getData()
        +
      • +
      + + + +
        +
      • +

        getExt

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getExt()
        +
      • +
      + + + +
        +
      • +

        getError

        +
        public java.lang.String getError()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/faye/MessageTransformer.html b/io/getstream/core/faye/MessageTransformer.html new file mode 100644 index 00000000..633bdbb1 --- /dev/null +++ b/io/getstream/core/faye/MessageTransformer.html @@ -0,0 +1,322 @@ + + + + + +MessageTransformer (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class MessageTransformer

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.faye.MessageTransformer
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    DefaultMessageTransformer
    +
    +
    +
    public abstract class MessageTransformer
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MessageTransformer

        +
        public MessageTransformer()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        transformRequest

        +
        public abstract Message transformRequest​(Message message)
        +
      • +
      + + + +
        +
      • +

        transformResponse

        +
        public abstract Message transformResponse​(Message message)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/faye/client/FayeClient.html b/io/getstream/core/faye/client/FayeClient.html new file mode 100644 index 00000000..057a959e --- /dev/null +++ b/io/getstream/core/faye/client/FayeClient.html @@ -0,0 +1,502 @@ + + + + + +FayeClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FayeClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • okhttp3.WebSocketListener
    • +
    • +
        +
      • io.getstream.core.faye.client.FayeClient
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    public class FayeClient
    +extends okhttp3.WebSocketListener
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FayeClient

        +
        public FayeClient​(java.net.URL baseURL)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setMessageTransformer

        +
        public void setMessageTransformer​(MessageTransformer messageTransformer)
        +
      • +
      + + + +
        +
      • +

        setStateChangeListener

        +
        public void setStateChangeListener​(StateChangeListener stateChangeListener)
        +
      • +
      + + + +
        +
      • +

        onMessage

        +
        public void onMessage​(okhttp3.WebSocket webSocket,
        +                      java.lang.String text)
        +
        +
        Overrides:
        +
        onMessage in class okhttp3.WebSocketListener
        +
        +
      • +
      + + + +
        +
      • +

        onFailure

        +
        public void onFailure​(okhttp3.WebSocket webSocket,
        +                      java.lang.Throwable t,
        +                      okhttp3.Response response)
        +
        +
        Overrides:
        +
        onFailure in class okhttp3.WebSocketListener
        +
        +
      • +
      + + + +
        +
      • +

        onClosed

        +
        public void onClosed​(okhttp3.WebSocket webSocket,
        +                     int code,
        +                     java.lang.String reason)
        +
        +
        Overrides:
        +
        onClosed in class okhttp3.WebSocketListener
        +
        +
      • +
      + + + +
        +
      • +

        handshake

        +
        public void handshake()
        +
      • +
      + + + +
        +
      • +

        connect

        +
        public void connect()
        +
      • +
      + + + +
        +
      • +

        disconnect

        +
        public java.util.concurrent.CompletableFuture<java.lang.Void> disconnect()
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        unsubscribe

        +
        public void unsubscribe​(java.lang.String channel,
        +                        ChannelSubscription channelSubscription)
        +
      • +
      + + + +
        +
      • +

        publish

        +
        public java.util.concurrent.CompletableFuture<java.lang.Void> publish​(java.lang.String channel,
        +                                                                      java.util.Map<java.lang.String,​java.lang.Object> data)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/faye/client/FayeClientState.html b/io/getstream/core/faye/client/FayeClientState.html new file mode 100644 index 00000000..70142a69 --- /dev/null +++ b/io/getstream/core/faye/client/FayeClientState.html @@ -0,0 +1,402 @@ + + + + + +FayeClientState (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum FayeClientState

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<FayeClientState>
    • +
    • +
        +
      • io.getstream.core.faye.client.FayeClientState
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<FayeClientState>
    +
    +
    +
    public enum FayeClientState
    +extends java.lang.Enum<FayeClientState>
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static FayeClientStatevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static FayeClientState[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static FayeClientState[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (FayeClientState c : FayeClientState.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static FayeClientState valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/faye/client/StateChangeListener.html b/io/getstream/core/faye/client/StateChangeListener.html new file mode 100644 index 00000000..defe122b --- /dev/null +++ b/io/getstream/core/faye/client/StateChangeListener.html @@ -0,0 +1,248 @@ + + + + + +StateChangeListener (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface StateChangeListener

+
+
+
+
    +
  • +
    +
    public interface StateChangeListener
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/faye/client/package-summary.html b/io/getstream/core/faye/client/package-summary.html new file mode 100644 index 00000000..77df150d --- /dev/null +++ b/io/getstream/core/faye/client/package-summary.html @@ -0,0 +1,194 @@ + + + + + +io.getstream.core.faye.client (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core.faye.client

+
+
+
    +
  • + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    StateChangeListener 
    +
  • +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    FayeClient 
    +
  • +
  • + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    FayeClientState 
    +
  • +
+
+
+
+ +
+ + diff --git a/io/getstream/core/faye/client/package-tree.html b/io/getstream/core/faye/client/package-tree.html new file mode 100644 index 00000000..5aada9af --- /dev/null +++ b/io/getstream/core/faye/client/package-tree.html @@ -0,0 +1,185 @@ + + + + + +io.getstream.core.faye.client Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core.faye.client

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • okhttp3.WebSocketListener + +
    • +
    +
  • +
+
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+
+
+ + + diff --git a/io/getstream/core/faye/emitter/ErrorListener.html b/io/getstream/core/faye/emitter/ErrorListener.html new file mode 100644 index 00000000..48e883e9 --- /dev/null +++ b/io/getstream/core/faye/emitter/ErrorListener.html @@ -0,0 +1,248 @@ + + + + + +ErrorListener (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface ErrorListener

+
+
+
+
    +
  • +
    +
    public interface ErrorListener
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onError

        +
        void onError​(java.lang.Exception error)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/faye/emitter/EventEmitter.html b/io/getstream/core/faye/emitter/EventEmitter.html new file mode 100644 index 00000000..0d443968 --- /dev/null +++ b/io/getstream/core/faye/emitter/EventEmitter.html @@ -0,0 +1,481 @@ + + + + + +EventEmitter (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class EventEmitter<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.faye.emitter.EventEmitter<T>
    • +
    +
  • +
+
+
    +
  • +
    +
    public class EventEmitter<T>
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        EventEmitter

        +
        public EventEmitter()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        setErrorListener

        +
        public void setErrorListener​(ErrorListener errorListener)
        +
      • +
      + + + +
        +
      • +

        isMounted

        +
        public boolean isMounted()
        +
      • +
      + + + + + +
        +
      • +

        emit

        +
        public void emit​(java.lang.String event,
        +                 T data)
        +
      • +
      + + + +
        +
      • +

        on

        +
        public void on​(java.lang.String event,
        +               EventListener<T> listener)
        +
      • +
      + + + +
        +
      • +

        on

        +
        public void on​(java.lang.String event,
        +               EventListener<T> listener,
        +               int limit)
        +
      • +
      + + + +
        +
      • +

        addListener

        +
        public void addListener​(java.lang.String event,
        +                        EventListener<T> listener)
        +
      • +
      + + + +
        +
      • +

        addListener

        +
        public void addListener​(java.lang.String event,
        +                        EventListener<T> listener,
        +                        int limit)
        +
      • +
      + + + +
        +
      • +

        off

        +
        public void off​(java.lang.String event)
        +
      • +
      + + + +
        +
      • +

        removeListener

        +
        public void removeListener​(java.lang.String event,
        +                           EventListener<T> listener)
        +
      • +
      + + + +
        +
      • +

        removeAllListeners

        +
        public void removeAllListeners()
        +
      • +
      + + + +
        +
      • +

        hasListeners

        +
        public boolean hasListeners​(java.lang.String event)
        +                     throws java.lang.Exception
        +
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + +
        +
      • +

        dispose

        +
        public void dispose()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/faye/emitter/EventListener.html b/io/getstream/core/faye/emitter/EventListener.html new file mode 100644 index 00000000..2eb8b924 --- /dev/null +++ b/io/getstream/core/faye/emitter/EventListener.html @@ -0,0 +1,250 @@ + + + + + +EventListener (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface EventListener<T>

+
+
+
+
    +
  • +
    +
    public interface EventListener<T>
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        onData

        +
        void onData​(T data)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/faye/emitter/package-summary.html b/io/getstream/core/faye/emitter/package-summary.html new file mode 100644 index 00000000..d2aefa09 --- /dev/null +++ b/io/getstream/core/faye/emitter/package-summary.html @@ -0,0 +1,183 @@ + + + + + +io.getstream.core.faye.emitter (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core.faye.emitter

+
+
+
    +
  • + + + + + + + + + + + + + + + + +
    Interface Summary 
    InterfaceDescription
    ErrorListener 
    EventListener<T> 
    +
  • +
  • + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    EventEmitter<T> 
    +
  • +
+
+
+
+ +
+ + diff --git a/io/getstream/core/faye/emitter/package-tree.html b/io/getstream/core/faye/emitter/package-tree.html new file mode 100644 index 00000000..47c6567a --- /dev/null +++ b/io/getstream/core/faye/emitter/package-tree.html @@ -0,0 +1,168 @@ + + + + + +io.getstream.core.faye.emitter Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core.faye.emitter

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+
    +
  • java.lang.Object + +
  • +
+
+
+

Interface Hierarchy

+ +
+
+
+ + + diff --git a/io/getstream/core/faye/package-summary.html b/io/getstream/core/faye/package-summary.html new file mode 100644 index 00000000..f686def9 --- /dev/null +++ b/io/getstream/core/faye/package-summary.html @@ -0,0 +1,188 @@ + + + + + +io.getstream.core.faye (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core.faye

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/core/faye/package-tree.html b/io/getstream/core/faye/package-tree.html new file mode 100644 index 00000000..588d1e3e --- /dev/null +++ b/io/getstream/core/faye/package-tree.html @@ -0,0 +1,174 @@ + + + + + +io.getstream.core.faye Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core.faye

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+
+ + + diff --git a/io/getstream/core/faye/subscription/ChannelDataCallback.html b/io/getstream/core/faye/subscription/ChannelDataCallback.html new file mode 100644 index 00000000..1ccef8bb --- /dev/null +++ b/io/getstream/core/faye/subscription/ChannelDataCallback.html @@ -0,0 +1,248 @@ + + + + + +ChannelDataCallback (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface ChannelDataCallback

+
+
+
+
    +
  • +
    +
    public interface ChannelDataCallback
    +
  • +
+
+
+
    +
  • + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onData

        +
        void onData​(java.util.Map<java.lang.String,​java.lang.Object> data)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/faye/subscription/ChannelSubscription.html b/io/getstream/core/faye/subscription/ChannelSubscription.html new file mode 100644 index 00000000..634b541e --- /dev/null +++ b/io/getstream/core/faye/subscription/ChannelSubscription.html @@ -0,0 +1,353 @@ + + + + + +ChannelSubscription (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ChannelSubscription

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.faye.subscription.ChannelSubscription
    • +
    +
  • +
+
+
    +
  • +
    +
    public class ChannelSubscription
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/faye/subscription/SubscriptionCancelledCallback.html b/io/getstream/core/faye/subscription/SubscriptionCancelledCallback.html new file mode 100644 index 00000000..6058f89d --- /dev/null +++ b/io/getstream/core/faye/subscription/SubscriptionCancelledCallback.html @@ -0,0 +1,248 @@ + + + + + +SubscriptionCancelledCallback (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface SubscriptionCancelledCallback

+
+
+
+
    +
  • +
    +
    public interface SubscriptionCancelledCallback
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onCancelled

        +
        void onCancelled()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/faye/subscription/WithChannelDataCallback.html b/io/getstream/core/faye/subscription/WithChannelDataCallback.html new file mode 100644 index 00000000..154f0452 --- /dev/null +++ b/io/getstream/core/faye/subscription/WithChannelDataCallback.html @@ -0,0 +1,250 @@ + + + + + +WithChannelDataCallback (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface WithChannelDataCallback

+
+
+
+
    +
  • +
    +
    public interface WithChannelDataCallback
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      voidonData​(java.lang.String channel, + java.util.Map<java.lang.String,​java.lang.Object> data) 
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        onData

        +
        void onData​(java.lang.String channel,
        +            java.util.Map<java.lang.String,​java.lang.Object> data)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/faye/subscription/package-summary.html b/io/getstream/core/faye/subscription/package-summary.html new file mode 100644 index 00000000..5e1fad9a --- /dev/null +++ b/io/getstream/core/faye/subscription/package-summary.html @@ -0,0 +1,187 @@ + + + + + +io.getstream.core.faye.subscription (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core.faye.subscription

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/core/faye/subscription/package-tree.html b/io/getstream/core/faye/subscription/package-tree.html new file mode 100644 index 00000000..35e6b4e8 --- /dev/null +++ b/io/getstream/core/faye/subscription/package-tree.html @@ -0,0 +1,169 @@ + + + + + +io.getstream.core.faye.subscription Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core.faye.subscription

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+
+ + + diff --git a/io/getstream/core/http/HTTPClient.html b/io/getstream/core/http/HTTPClient.html new file mode 100644 index 00000000..042eaf48 --- /dev/null +++ b/io/getstream/core/http/HTTPClient.html @@ -0,0 +1,336 @@ + + + + + +HTTPClient (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class HTTPClient

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.http.HTTPClient
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    OKHTTPClientAdapter
    +
    +
    +
    public abstract class HTTPClient
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        HTTPClient

        +
        public HTTPClient()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        getImplementation

        +
        public abstract <T> T getImplementation()
        +
      • +
      + + + +
        +
      • +

        execute

        +
        public abstract java8.util.concurrent.CompletableFuture<Response> execute​(Request request)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/http/OKHTTPClientAdapter.html b/io/getstream/core/http/OKHTTPClientAdapter.html new file mode 100644 index 00000000..7b0ff471 --- /dev/null +++ b/io/getstream/core/http/OKHTTPClientAdapter.html @@ -0,0 +1,351 @@ + + + + + +OKHTTPClientAdapter (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class OKHTTPClientAdapter

+
+
+ +
+
    +
  • +
    +
    public final class OKHTTPClientAdapter
    +extends HTTPClient
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        OKHTTPClientAdapter

        +
        public OKHTTPClientAdapter()
        +
      • +
      + + + +
        +
      • +

        OKHTTPClientAdapter

        +
        public OKHTTPClientAdapter​(okhttp3.OkHttpClient client)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/http/Request.Builder.html b/io/getstream/core/http/Request.Builder.html new file mode 100644 index 00000000..b8671ce1 --- /dev/null +++ b/io/getstream/core/http/Request.Builder.html @@ -0,0 +1,450 @@ + + + + + +Request.Builder (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Request.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.http.Request.Builder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    Request
    +
    +
    +
    public static final class Request.Builder
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Builder

        +
        public Builder()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        url

        +
        public Request.Builder url​(java.net.URL url)
        +                    throws java.net.URISyntaxException
        +
        +
        Throws:
        +
        java.net.URISyntaxException
        +
        +
      • +
      + + + +
        +
      • +

        addQueryParameter

        +
        public Request.Builder addQueryParameter​(java.lang.String key,
        +                                         java.lang.String value)
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        multiPartPost

        +
        public Request.Builder multiPartPost​(java.lang.String fileName,
        +                                     byte[] body)
        +
      • +
      + + + +
        +
      • +

        multiPartPost

        +
        public Request.Builder multiPartPost​(java.io.File body)
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        build

        +
        public Request build()
        +              throws java.net.MalformedURLException,
        +                     java.net.URISyntaxException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        java.net.URISyntaxException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/http/Request.Method.html b/io/getstream/core/http/Request.Method.html new file mode 100644 index 00000000..bc1ea0c8 --- /dev/null +++ b/io/getstream/core/http/Request.Method.html @@ -0,0 +1,406 @@ + + + + + +Request.Method (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Request.Method

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<Request.Method>
    • +
    • +
        +
      • io.getstream.core.http.Request.Method
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Request.Method>
    +
    +
    +
    Enclosing class:
    +
    Request
    +
    +
    +
    public static enum Request.Method
    +extends java.lang.Enum<Request.Method>
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      DELETE 
      GET 
      POST 
      PUT 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static Request.MethodvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Request.Method[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Request.Method[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Request.Method c : Request.Method.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Request.Method valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/http/Request.html b/io/getstream/core/http/Request.html new file mode 100644 index 00000000..92d6f75a --- /dev/null +++ b/io/getstream/core/http/Request.html @@ -0,0 +1,402 @@ + + + + + +Request (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Request

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.http.Request
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Request
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getToken

        +
        public Token getToken()
        +
      • +
      + + + +
        +
      • +

        getURL

        +
        public java.net.URL getURL()
        +
      • +
      + + + + + + + + + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/http/RequestBody.Type.html b/io/getstream/core/http/RequestBody.Type.html new file mode 100644 index 00000000..83102d94 --- /dev/null +++ b/io/getstream/core/http/RequestBody.Type.html @@ -0,0 +1,398 @@ + + + + + +RequestBody.Type (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum RequestBody.Type

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<RequestBody.Type>
    • +
    • +
        +
      • io.getstream.core.http.RequestBody.Type
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<RequestBody.Type>
    +
    +
    +
    Enclosing class:
    +
    RequestBody
    +
    +
    +
    public static enum RequestBody.Type
    +extends java.lang.Enum<RequestBody.Type>
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      JSON 
      MULTI_PART 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringtoString() 
      static RequestBody.TypevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static RequestBody.Type[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static RequestBody.Type[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (RequestBody.Type c : RequestBody.Type.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static RequestBody.Type valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Enum<RequestBody.Type>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/http/RequestBody.html b/io/getstream/core/http/RequestBody.html new file mode 100644 index 00000000..9a014250 --- /dev/null +++ b/io/getstream/core/http/RequestBody.html @@ -0,0 +1,383 @@ + + + + + +RequestBody (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class RequestBody

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.http.RequestBody
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class RequestBody
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class RequestBody.Type 
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        getBytes

        +
        public byte[] getBytes()
        +
      • +
      + + + +
        +
      • +

        getFile

        +
        public java.io.File getFile()
        +
      • +
      + + + +
        +
      • +

        getFileName

        +
        public java.lang.String getFileName()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/http/Response.html b/io/getstream/core/http/Response.html new file mode 100644 index 00000000..4780612d --- /dev/null +++ b/io/getstream/core/http/Response.html @@ -0,0 +1,374 @@ + + + + + +Response (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Response

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.http.Response
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Response
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Response​(int code, + java.io.InputStream body) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      java.io.InputStreamgetBody() 
      intgetCode() 
      inthashCode() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Response

        +
        public Response​(int code,
        +                java.io.InputStream body)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getCode

        +
        public int getCode()
        +
      • +
      + + + +
        +
      • +

        getBody

        +
        public java.io.InputStream getBody()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/http/Token.html b/io/getstream/core/http/Token.html new file mode 100644 index 00000000..2cfa1bec --- /dev/null +++ b/io/getstream/core/http/Token.html @@ -0,0 +1,344 @@ + + + + + +Token (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Token

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.http.Token
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Token
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Token​(java.lang.String token) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      inthashCode() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Token

        +
        public Token​(java.lang.String token)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/http/package-summary.html b/io/getstream/core/http/package-summary.html new file mode 100644 index 00000000..443904d2 --- /dev/null +++ b/io/getstream/core/http/package-summary.html @@ -0,0 +1,207 @@ + + + + + +io.getstream.core.http (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core.http

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/core/http/package-tree.html b/io/getstream/core/http/package-tree.html new file mode 100644 index 00000000..f414564b --- /dev/null +++ b/io/getstream/core/http/package-tree.html @@ -0,0 +1,185 @@ + + + + + +io.getstream.core.http Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core.http

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+
+
+ + + diff --git a/io/getstream/core/models/Activity.Builder.html b/io/getstream/core/models/Activity.Builder.html new file mode 100644 index 00000000..c285c772 --- /dev/null +++ b/io/getstream/core/models/Activity.Builder.html @@ -0,0 +1,536 @@ + + + + + +Activity.Builder (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Activity.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Activity.Builder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    Activity
    +
    +
    +
    public static final class Activity.Builder
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/models/Activity.html b/io/getstream/core/models/Activity.html new file mode 100644 index 00000000..0b09dd60 --- /dev/null +++ b/io/getstream/core/models/Activity.html @@ -0,0 +1,495 @@ + + + + + +Activity (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Activity

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Activity
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Activity
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getID

        +
        public java.lang.String getID()
        +
      • +
      + + + +
        +
      • +

        getActor

        +
        public java.lang.String getActor()
        +
      • +
      + + + +
        +
      • +

        getVerb

        +
        public java.lang.String getVerb()
        +
      • +
      + + + +
        +
      • +

        getObject

        +
        public java.lang.String getObject()
        +
      • +
      + + + +
        +
      • +

        getForeignID

        +
        public java.lang.String getForeignID()
        +
      • +
      + + + +
        +
      • +

        getTarget

        +
        public java.lang.String getTarget()
        +
      • +
      + + + +
        +
      • +

        getTime

        +
        public java.util.Date getTime()
        +
      • +
      + + + +
        +
      • +

        getOrigin

        +
        public java.lang.String getOrigin()
        +
      • +
      + + + +
        +
      • +

        getTo

        +
        public java.util.List<FeedID> getTo()
        +
      • +
      + + + +
        +
      • +

        getScore

        +
        public java.lang.Double getScore()
        +
      • +
      + + + +
        +
      • +

        getExtra

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getExtra()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/models/ActivityUpdate.Builder.html b/io/getstream/core/models/ActivityUpdate.Builder.html new file mode 100644 index 00000000..dce99c12 --- /dev/null +++ b/io/getstream/core/models/ActivityUpdate.Builder.html @@ -0,0 +1,420 @@ + + + + + +ActivityUpdate.Builder (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ActivityUpdate.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.ActivityUpdate.Builder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    ActivityUpdate
    +
    +
    +
    public static final class ActivityUpdate.Builder
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/models/ActivityUpdate.html b/io/getstream/core/models/ActivityUpdate.html new file mode 100644 index 00000000..15fe053d --- /dev/null +++ b/io/getstream/core/models/ActivityUpdate.html @@ -0,0 +1,357 @@ + + + + + +ActivityUpdate (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ActivityUpdate

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.ActivityUpdate
    • +
    +
  • +
+
+
    +
  • +
    +
    public class ActivityUpdate
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class ActivityUpdate.Builder 
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getID

        +
        public java.lang.String getID()
        +
      • +
      + + + +
        +
      • +

        getForeignID

        +
        public java.lang.String getForeignID()
        +
      • +
      + + + +
        +
      • +

        getTime

        +
        public java.util.Date getTime()
        +
      • +
      + + + +
        +
      • +

        getSet

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getSet()
        +
      • +
      + + + +
        +
      • +

        getUnset

        +
        public java.util.List<java.lang.String> getUnset()
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/models/CollectionData.html b/io/getstream/core/models/CollectionData.html new file mode 100644 index 00000000..a5e4bc33 --- /dev/null +++ b/io/getstream/core/models/CollectionData.html @@ -0,0 +1,480 @@ + + + + + +CollectionData (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CollectionData

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.CollectionData
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class CollectionData
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      CollectionData() 
      CollectionData​(java.lang.String id) 
      CollectionData​(java.lang.String collection, + java.lang.String id, + java.util.Map<java.lang.String,​java.lang.Object> data) 
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CollectionData

        +
        public CollectionData​(java.lang.String collection,
        +                      java.lang.String id,
        +                      java.util.Map<java.lang.String,​java.lang.Object> data)
        +
      • +
      + + + +
        +
      • +

        CollectionData

        +
        public CollectionData()
        +
      • +
      + + + +
        +
      • +

        CollectionData

        +
        public CollectionData​(java.lang.String id)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        buildFrom

        +
        public static <T> CollectionData buildFrom​(T data)
        +
      • +
      + + + +
        +
      • +

        getID

        +
        public java.lang.String getID()
        +
      • +
      + + + +
        +
      • +

        getCollection

        +
        public java.lang.String getCollection()
        +
      • +
      + + + +
        +
      • +

        getData

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getData()
        +
      • +
      + + + + + +
        +
      • +

        set

        +
        public <T> CollectionData set​(java.lang.String key,
        +                              T value)
        +
      • +
      + + + + + + + + + +
        +
      • +

        get

        +
        public <T> T get​(java.lang.String key)
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/Content.html b/io/getstream/core/models/Content.html new file mode 100644 index 00000000..e1be4058 --- /dev/null +++ b/io/getstream/core/models/Content.html @@ -0,0 +1,436 @@ + + + + + +Content (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Content

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Content
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Content
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Content​(java.lang.String foreignID) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <T> ContentbuildFrom​(T data) 
      booleanequals​(java.lang.Object o) 
      <T> Contentfrom​(T data) 
      <T> Tget​(java.lang.String key) 
      java.util.Map<java.lang.String,​java.lang.Object>getData() 
      java.lang.StringgetForeignID() 
      inthashCode() 
      <T> Contentset​(java.lang.String key, + T value) 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Content

        +
        public Content​(java.lang.String foreignID)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        buildFrom

        +
        public static <T> Content buildFrom​(T data)
        +
      • +
      + + + +
        +
      • +

        getForeignID

        +
        public java.lang.String getForeignID()
        +
      • +
      + + + +
        +
      • +

        getData

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getData()
        +
      • +
      + + + + + +
        +
      • +

        set

        +
        public <T> Content set​(java.lang.String key,
        +                       T value)
        +
      • +
      + + + + + +
        +
      • +

        from

        +
        public <T> Content from​(T data)
        +
      • +
      + + + +
        +
      • +

        get

        +
        public <T> T get​(java.lang.String key)
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/Data.html b/io/getstream/core/models/Data.html new file mode 100644 index 00000000..72873556 --- /dev/null +++ b/io/getstream/core/models/Data.html @@ -0,0 +1,463 @@ + + + + + +Data (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Data

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Data
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Data
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Data() 
      Data​(java.lang.String id) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <T> DatabuildFrom​(T data) 
      booleanequals​(java.lang.Object o) 
      Datafrom​(java.util.Map<java.lang.String,​java.lang.Object> map) 
      <T> Datafrom​(T data) 
      <T> Tget​(java.lang.String key) 
      java.util.Map<java.lang.String,​java.lang.Object>getData() 
      java.lang.StringgetID() 
      inthashCode() 
      <T> Dataset​(java.lang.String key, + T value) 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Data

        +
        public Data​(java.lang.String id)
        +
      • +
      + + + +
        +
      • +

        Data

        +
        public Data()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + + + +
        +
      • +

        buildFrom

        +
        public static <T> Data buildFrom​(T data)
        +
      • +
      + + + +
        +
      • +

        getID

        +
        public java.lang.String getID()
        +
      • +
      + + + +
        +
      • +

        getData

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getData()
        +
      • +
      + + + + + +
        +
      • +

        set

        +
        public <T> Data set​(java.lang.String key,
        +                    T value)
        +
      • +
      + + + + + +
        +
      • +

        from

        +
        public <T> Data from​(T data)
        +
      • +
      + + + +
        +
      • +

        from

        +
        public Data from​(java.util.Map<java.lang.String,​java.lang.Object> map)
        +
      • +
      + + + +
        +
      • +

        get

        +
        public <T> T get​(java.lang.String key)
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/Engagement.Builder.html b/io/getstream/core/models/Engagement.Builder.html new file mode 100644 index 00000000..857ea66a --- /dev/null +++ b/io/getstream/core/models/Engagement.Builder.html @@ -0,0 +1,464 @@ + + + + + +Engagement.Builder (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Engagement.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Engagement.Builder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    Engagement
    +
    +
    +
    public static final class Engagement.Builder
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/models/Engagement.html b/io/getstream/core/models/Engagement.html new file mode 100644 index 00000000..7116244d --- /dev/null +++ b/io/getstream/core/models/Engagement.html @@ -0,0 +1,467 @@ + + + + + +Engagement (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Engagement

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Engagement
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Engagement
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        getLabel

        +
        public java.lang.String getLabel()
        +
      • +
      + + + +
        +
      • +

        getContent

        +
        public Content getContent()
        +
      • +
      + + + +
        +
      • +

        getBoost

        +
        public int getBoost()
        +
      • +
      + + + +
        +
      • +

        getPosition

        +
        public int getPosition()
        +
      • +
      + + + +
        +
      • +

        getFeedID

        +
        public java.lang.String getFeedID()
        +
      • +
      + + + +
        +
      • +

        getLocation

        +
        public java.lang.String getLocation()
        +
      • +
      + + + +
        +
      • +

        getUserData

        +
        public UserData getUserData()
        +
      • +
      + + + +
        +
      • +

        getFeatures

        +
        public java.util.List<Feature> getFeatures()
        +
      • +
      + + + +
        +
      • +

        getTrackedAt

        +
        public java.util.Date getTrackedAt()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/models/EnrichedActivity.Builder.html b/io/getstream/core/models/EnrichedActivity.Builder.html new file mode 100644 index 00000000..5fc8354f --- /dev/null +++ b/io/getstream/core/models/EnrichedActivity.Builder.html @@ -0,0 +1,634 @@ + + + + + +EnrichedActivity.Builder (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class EnrichedActivity.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.EnrichedActivity.Builder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    EnrichedActivity
    +
    +
    +
    public static final class EnrichedActivity.Builder
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/models/EnrichedActivity.html b/io/getstream/core/models/EnrichedActivity.html new file mode 100644 index 00000000..dc3ccf39 --- /dev/null +++ b/io/getstream/core/models/EnrichedActivity.html @@ -0,0 +1,537 @@ + + + + + +EnrichedActivity (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class EnrichedActivity

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.EnrichedActivity
    • +
    +
  • +
+
+
    +
  • +
    +
    public class EnrichedActivity
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getID

        +
        public java.lang.String getID()
        +
      • +
      + + + +
        +
      • +

        getActor

        +
        public Data getActor()
        +
      • +
      + + + +
        +
      • +

        getVerb

        +
        public java.lang.String getVerb()
        +
      • +
      + + + +
        +
      • +

        getObject

        +
        public Data getObject()
        +
      • +
      + + + +
        +
      • +

        getForeignID

        +
        public java.lang.String getForeignID()
        +
      • +
      + + + +
        +
      • +

        getTarget

        +
        public Data getTarget()
        +
      • +
      + + + +
        +
      • +

        getTime

        +
        public java.util.Date getTime()
        +
      • +
      + + + +
        +
      • +

        getOrigin

        +
        public Data getOrigin()
        +
      • +
      + + + +
        +
      • +

        getTo

        +
        public java.util.List<FeedID> getTo()
        +
      • +
      + + + +
        +
      • +

        getScore

        +
        public java.lang.Double getScore()
        +
      • +
      + + + +
        +
      • +

        getReactionCounts

        +
        public java.util.Map<java.lang.String,​java.lang.Number> getReactionCounts()
        +
      • +
      + + + +
        +
      • +

        getOwnReactions

        +
        public java.util.Map<java.lang.String,​java.util.List<Reaction>> getOwnReactions()
        +
      • +
      + + + +
        +
      • +

        getLatestReactions

        +
        public java.util.Map<java.lang.String,​java.util.List<Reaction>> getLatestReactions()
        +
      • +
      + + + +
        +
      • +

        getExtra

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getExtra()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/models/Feature.html b/io/getstream/core/models/Feature.html new file mode 100644 index 00000000..ef4c4d87 --- /dev/null +++ b/io/getstream/core/models/Feature.html @@ -0,0 +1,374 @@ + + + + + +Feature (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Feature

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Feature
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Feature
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Feature​(java.lang.String group, + java.lang.String value) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      java.lang.StringgetGroup() 
      java.lang.StringgetValue() 
      inthashCode() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Feature

        +
        public Feature​(java.lang.String group,
        +               java.lang.String value)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getGroup

        +
        public java.lang.String getGroup()
        +
      • +
      + + + +
        +
      • +

        getValue

        +
        public java.lang.String getValue()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/FeedID.html b/io/getstream/core/models/FeedID.html new file mode 100644 index 00000000..47d6b4ba --- /dev/null +++ b/io/getstream/core/models/FeedID.html @@ -0,0 +1,401 @@ + + + + + +FeedID (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FeedID

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.FeedID
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class FeedID
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      FeedID​(java.lang.String id) 
      FeedID​(java.lang.String slug, + java.lang.String userID) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      java.lang.StringgetClaim() 
      java.lang.StringgetSlug() 
      java.lang.StringgetUserID() 
      inthashCode() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FeedID

        +
        public FeedID​(java.lang.String slug,
        +              java.lang.String userID)
        +
      • +
      + + + +
        +
      • +

        FeedID

        +
        public FeedID​(java.lang.String id)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getSlug

        +
        public java.lang.String getSlug()
        +
      • +
      + + + +
        +
      • +

        getUserID

        +
        public java.lang.String getUserID()
        +
      • +
      + + + +
        +
      • +

        getClaim

        +
        public java.lang.String getClaim()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/FollowRelation.html b/io/getstream/core/models/FollowRelation.html new file mode 100644 index 00000000..743094b7 --- /dev/null +++ b/io/getstream/core/models/FollowRelation.html @@ -0,0 +1,374 @@ + + + + + +FollowRelation (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FollowRelation

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.FollowRelation
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class FollowRelation
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      FollowRelation​(java.lang.String source, + java.lang.String target) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      java.lang.StringgetSource() 
      java.lang.StringgetTarget() 
      inthashCode() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FollowRelation

        +
        public FollowRelation​(java.lang.String source,
        +                      java.lang.String target)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getSource

        +
        public java.lang.String getSource()
        +
      • +
      + + + +
        +
      • +

        getTarget

        +
        public java.lang.String getTarget()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/FollowStats.FollowStat.html b/io/getstream/core/models/FollowStats.FollowStat.html new file mode 100644 index 00000000..7bef029b --- /dev/null +++ b/io/getstream/core/models/FollowStats.FollowStat.html @@ -0,0 +1,322 @@ + + + + + +FollowStats.FollowStat (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FollowStats.FollowStat

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.FollowStats.FollowStat
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    FollowStats
    +
    +
    +
    public class FollowStats.FollowStat
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      FollowStat() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      intgetCount() 
      java.lang.StringgetFeed() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        FollowStat

        +
        public FollowStat()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getCount

        +
        public int getCount()
        +
      • +
      + + + +
        +
      • +

        getFeed

        +
        public java.lang.String getFeed()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/FollowStats.html b/io/getstream/core/models/FollowStats.html new file mode 100644 index 00000000..785bd0e6 --- /dev/null +++ b/io/getstream/core/models/FollowStats.html @@ -0,0 +1,341 @@ + + + + + +FollowStats (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class FollowStats

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.FollowStats
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class FollowStats
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/models/ForeignIDTimePair.html b/io/getstream/core/models/ForeignIDTimePair.html new file mode 100644 index 00000000..2310341d --- /dev/null +++ b/io/getstream/core/models/ForeignIDTimePair.html @@ -0,0 +1,374 @@ + + + + + +ForeignIDTimePair (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ForeignIDTimePair

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.ForeignIDTimePair
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class ForeignIDTimePair
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      ForeignIDTimePair​(java.lang.String foreignID, + java.util.Date time) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      java.lang.StringgetForeignID() 
      java.util.DategetTime() 
      inthashCode() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ForeignIDTimePair

        +
        public ForeignIDTimePair​(java.lang.String foreignID,
        +                         java.util.Date time)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getForeignID

        +
        public java.lang.String getForeignID()
        +
      • +
      + + + +
        +
      • +

        getTime

        +
        public java.util.Date getTime()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/Group.html b/io/getstream/core/models/Group.html new file mode 100644 index 00000000..0b436441 --- /dev/null +++ b/io/getstream/core/models/Group.html @@ -0,0 +1,456 @@ + + + + + +Group (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Group<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Group<T>
    • +
    +
  • +
+
+
    +
  • +
    +
    Direct Known Subclasses:
    +
    NotificationGroup
    +
    +
    +
    public class Group<T>
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Group​(java.lang.String id, + java.lang.String group, + java.util.List<T> activities, + int actorCount, + java.util.Date createdAt, + java.util.Date updatedAt) 
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Group

        +
        public Group​(java.lang.String id,
        +             java.lang.String group,
        +             java.util.List<T> activities,
        +             int actorCount,
        +             java.util.Date createdAt,
        +             java.util.Date updatedAt)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getID

        +
        public java.lang.String getID()
        +
      • +
      + + + +
        +
      • +

        getGroup

        +
        public java.lang.String getGroup()
        +
      • +
      + + + +
        +
      • +

        getGroupID

        +
        public java.lang.String getGroupID()
        +
      • +
      + + + +
        +
      • +

        getActivities

        +
        public java.util.List<T> getActivities()
        +
      • +
      + + + +
        +
      • +

        getActorCount

        +
        public int getActorCount()
        +
      • +
      + + + +
        +
      • +

        getCreatedAt

        +
        public java.util.Date getCreatedAt()
        +
      • +
      + + + +
        +
      • +

        getUpdatedAt

        +
        public java.util.Date getUpdatedAt()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/Impression.Builder.html b/io/getstream/core/models/Impression.Builder.html new file mode 100644 index 00000000..856053f9 --- /dev/null +++ b/io/getstream/core/models/Impression.Builder.html @@ -0,0 +1,464 @@ + + + + + +Impression.Builder (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Impression.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Impression.Builder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    Impression
    +
    +
    +
    public static final class Impression.Builder
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/models/Impression.html b/io/getstream/core/models/Impression.html new file mode 100644 index 00000000..df6ba4be --- /dev/null +++ b/io/getstream/core/models/Impression.html @@ -0,0 +1,439 @@ + + + + + +Impression (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Impression

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Impression
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Impression
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        getPosition

        +
        public java.lang.String getPosition()
        +
      • +
      + + + +
        +
      • +

        getFeedID

        +
        public java.lang.String getFeedID()
        +
      • +
      + + + +
        +
      • +

        getLocation

        +
        public java.lang.String getLocation()
        +
      • +
      + + + +
        +
      • +

        getUserData

        +
        public UserData getUserData()
        +
      • +
      + + + +
        +
      • +

        getContentList

        +
        public java.util.List<Content> getContentList()
        +
      • +
      + + + +
        +
      • +

        getFeatures

        +
        public java.util.List<Feature> getFeatures()
        +
      • +
      + + + +
        +
      • +

        getTrackedAt

        +
        public java.util.Date getTrackedAt()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/models/NotificationGroup.html b/io/getstream/core/models/NotificationGroup.html new file mode 100644 index 00000000..6fcce4c7 --- /dev/null +++ b/io/getstream/core/models/NotificationGroup.html @@ -0,0 +1,398 @@ + + + + + +NotificationGroup (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class NotificationGroup<T>

+
+
+ +
+
    +
  • +
    +
    public class NotificationGroup<T>
    +extends Group<T>
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      NotificationGroup​(java.lang.String id, + java.lang.String group, + java.util.List<T> activities, + int actorCount, + java.util.Date createdAt, + java.util.Date updatedAt, + boolean isSeen, + boolean isRead) 
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        NotificationGroup

        +
        public NotificationGroup​(java.lang.String id,
        +                         java.lang.String group,
        +                         java.util.List<T> activities,
        +                         int actorCount,
        +                         java.util.Date createdAt,
        +                         java.util.Date updatedAt,
        +                         boolean isSeen,
        +                         boolean isRead)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        isSeen

        +
        public boolean isSeen()
        +
      • +
      + + + +
        +
      • +

        isRead

        +
        public boolean isRead()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class Group<T>
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class Group<T>
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class Group<T>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/OGData.Audio.html b/io/getstream/core/models/OGData.Audio.html new file mode 100644 index 00000000..5230b41b --- /dev/null +++ b/io/getstream/core/models/OGData.Audio.html @@ -0,0 +1,356 @@ + + + + + +OGData.Audio (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class OGData.Audio

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.OGData.Audio
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    OGData
    +
    +
    +
    public static class OGData.Audio
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Audio​(java.lang.String url, + java.lang.String secureURL, + java.lang.String type, + java.lang.String audio) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringgetAudio() 
      java.lang.StringgetSecureURL() 
      java.lang.StringgetType() 
      java.lang.StringgetURL() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Audio

        +
        public Audio​(java.lang.String url,
        +             java.lang.String secureURL,
        +             java.lang.String type,
        +             java.lang.String audio)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getSecureURL

        +
        public java.lang.String getSecureURL()
        +
      • +
      + + + +
        +
      • +

        getURL

        +
        public java.lang.String getURL()
        +
      • +
      + + + +
        +
      • +

        getType

        +
        public java.lang.String getType()
        +
      • +
      + + + +
        +
      • +

        getAudio

        +
        public java.lang.String getAudio()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/OGData.Image.html b/io/getstream/core/models/OGData.Image.html new file mode 100644 index 00000000..13f699c7 --- /dev/null +++ b/io/getstream/core/models/OGData.Image.html @@ -0,0 +1,404 @@ + + + + + +OGData.Image (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class OGData.Image

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.OGData.Image
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    OGData
    +
    +
    +
    public static class OGData.Image
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Image​(java.lang.String image, + java.lang.String url, + java.lang.String secureUrl, + java.lang.String width, + java.lang.String height, + java.lang.String type, + java.lang.String alt) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringgetAlt() 
      java.lang.StringgetHeight() 
      java.lang.StringgetImage() 
      java.lang.StringgetSecureUrl() 
      java.lang.StringgetType() 
      java.lang.StringgetURL() 
      java.lang.StringgetWidth() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Image

        +
        public Image​(java.lang.String image,
        +             java.lang.String url,
        +             java.lang.String secureUrl,
        +             java.lang.String width,
        +             java.lang.String height,
        +             java.lang.String type,
        +             java.lang.String alt)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getImage

        +
        public java.lang.String getImage()
        +
      • +
      + + + +
        +
      • +

        getURL

        +
        public java.lang.String getURL()
        +
      • +
      + + + +
        +
      • +

        getSecureUrl

        +
        public java.lang.String getSecureUrl()
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        public java.lang.String getWidth()
        +
      • +
      + + + +
        +
      • +

        getHeight

        +
        public java.lang.String getHeight()
        +
      • +
      + + + +
        +
      • +

        getType

        +
        public java.lang.String getType()
        +
      • +
      + + + +
        +
      • +

        getAlt

        +
        public java.lang.String getAlt()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/OGData.Video.html b/io/getstream/core/models/OGData.Video.html new file mode 100644 index 00000000..99a9c76c --- /dev/null +++ b/io/getstream/core/models/OGData.Video.html @@ -0,0 +1,404 @@ + + + + + +OGData.Video (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class OGData.Video

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.OGData.Video
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    OGData
    +
    +
    +
    public static class OGData.Video
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Video​(java.lang.String video, + java.lang.String alt, + java.lang.String url, + java.lang.String secureURL, + java.lang.String type, + java.lang.String width, + java.lang.String height) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringgetAlt() 
      java.lang.StringgetHeight() 
      java.lang.StringgetSecureURL() 
      java.lang.StringgetType() 
      java.lang.StringgetURL() 
      java.lang.StringgetVideo() 
      java.lang.StringgetWidth() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Video

        +
        public Video​(java.lang.String video,
        +             java.lang.String alt,
        +             java.lang.String url,
        +             java.lang.String secureURL,
        +             java.lang.String type,
        +             java.lang.String width,
        +             java.lang.String height)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getSecureURL

        +
        public java.lang.String getSecureURL()
        +
      • +
      + + + +
        +
      • +

        getURL

        +
        public java.lang.String getURL()
        +
      • +
      + + + +
        +
      • +

        getWidth

        +
        public java.lang.String getWidth()
        +
      • +
      + + + +
        +
      • +

        getHeight

        +
        public java.lang.String getHeight()
        +
      • +
      + + + +
        +
      • +

        getType

        +
        public java.lang.String getType()
        +
      • +
      + + + +
        +
      • +

        getAlt

        +
        public java.lang.String getAlt()
        +
      • +
      + + + +
        +
      • +

        getVideo

        +
        public java.lang.String getVideo()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/OGData.html b/io/getstream/core/models/OGData.html new file mode 100644 index 00000000..e1ea4451 --- /dev/null +++ b/io/getstream/core/models/OGData.html @@ -0,0 +1,497 @@ + + + + + +OGData (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class OGData

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.OGData
    • +
    +
  • +
+
+
    +
  • +
    +
    public class OGData
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class OGData.Audio 
      static class OGData.Image 
      static class OGData.Video 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      OGData​(java.lang.String title, + java.lang.String type, + java.lang.String description, + java.lang.String determiner, + java.lang.String siteName, + java.lang.String locale, + java.util.List<OGData.Image> images, + java.util.List<OGData.Video> videos, + java.util.List<OGData.Audio> audios, + java.lang.String site, + java.lang.String url) 
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        OGData

        +
        public OGData​(java.lang.String title,
        +              java.lang.String type,
        +              java.lang.String description,
        +              java.lang.String determiner,
        +              java.lang.String siteName,
        +              java.lang.String locale,
        +              java.util.List<OGData.Image> images,
        +              java.util.List<OGData.Video> videos,
        +              java.util.List<OGData.Audio> audios,
        +              java.lang.String site,
        +              java.lang.String url)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getTitle

        +
        public java.lang.String getTitle()
        +
      • +
      + + + +
        +
      • +

        getDescription

        +
        public java.lang.String getDescription()
        +
      • +
      + + + +
        +
      • +

        getDeterminer

        +
        public java.lang.String getDeterminer()
        +
      • +
      + + + +
        +
      • +

        getLocale

        +
        public java.lang.String getLocale()
        +
      • +
      + + + +
        +
      • +

        getType

        +
        public java.lang.String getType()
        +
      • +
      + + + +
        +
      • +

        getSite

        +
        public java.lang.String getSite()
        +
      • +
      + + + +
        +
      • +

        getSiteName

        +
        public java.lang.String getSiteName()
        +
      • +
      + + + +
        +
      • +

        getImages

        +
        public java.util.List<OGData.Image> getImages()
        +
      • +
      + + + +
        +
      • +

        getVideos

        +
        public java.util.List<OGData.Video> getVideos()
        +
      • +
      + + + +
        +
      • +

        getAudios

        +
        public java.util.List<OGData.Audio> getAudios()
        +
      • +
      + + + +
        +
      • +

        getUrl

        +
        public java.lang.String getUrl()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/Paginated.html b/io/getstream/core/models/Paginated.html new file mode 100644 index 00000000..09343623 --- /dev/null +++ b/io/getstream/core/models/Paginated.html @@ -0,0 +1,408 @@ + + + + + +Paginated (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Paginated<T>

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Paginated<T>
    • +
    +
  • +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Paginated​(java.lang.String next, + java.util.List<T> results, + java.lang.String duration) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      java.lang.StringgetDuration() 
      java.lang.StringgetNext() 
      java.util.List<T>getResults() 
      inthashCode() 
      voidsetResults​(java.util.List<T> results) 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Paginated

        +
        public Paginated​(java.lang.String next,
        +                 java.util.List<T> results,
        +                 java.lang.String duration)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getNext

        +
        public java.lang.String getNext()
        +
      • +
      + + + +
        +
      • +

        getResults

        +
        public java.util.List<T> getResults()
        +
      • +
      + + + +
        +
      • +

        setResults

        +
        public void setResults​(java.util.List<T> results)
        +
      • +
      + + + +
        +
      • +

        getDuration

        +
        public java.lang.String getDuration()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/PaginatedNotificationGroup.html b/io/getstream/core/models/PaginatedNotificationGroup.html new file mode 100644 index 00000000..8be30781 --- /dev/null +++ b/io/getstream/core/models/PaginatedNotificationGroup.html @@ -0,0 +1,338 @@ + + + + + +PaginatedNotificationGroup (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class PaginatedNotificationGroup<T>

+
+
+ +
+ +
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        PaginatedNotificationGroup

        +
        public PaginatedNotificationGroup​(java.lang.String next,
        +                                  java.util.List<NotificationGroup<T>> results,
        +                                  java.lang.String duration,
        +                                  int unread,
        +                                  int unseen)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getUnread

        +
        public int getUnread()
        +
      • +
      + + + +
        +
      • +

        getUnseen

        +
        public int getUnseen()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/ProfileData.html b/io/getstream/core/models/ProfileData.html new file mode 100644 index 00000000..8ecbae35 --- /dev/null +++ b/io/getstream/core/models/ProfileData.html @@ -0,0 +1,438 @@ + + + + + +ProfileData (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ProfileData

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.ProfileData
    • +
    +
  • +
+
+
    +
  • +
    +
    public class ProfileData
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      ProfileData​(java.lang.String id, + int followingCount, + int followersCount, + java.util.Map<java.lang.String,​java.lang.Object> data) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      <T> Tget​(java.lang.String key) 
      java.util.Map<java.lang.String,​java.lang.Object>getData() 
      intgetFollowersCount() 
      intgetFollowingCount() 
      java.lang.StringgetID() 
      inthashCode() 
      <T> ProfileDataset​(java.lang.String key, + T value) 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ProfileData

        +
        public ProfileData​(java.lang.String id,
        +                   int followingCount,
        +                   int followersCount,
        +                   java.util.Map<java.lang.String,​java.lang.Object> data)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getID

        +
        public java.lang.String getID()
        +
      • +
      + + + +
        +
      • +

        getFollowersCount

        +
        public int getFollowersCount()
        +
      • +
      + + + +
        +
      • +

        getFollowingCount

        +
        public int getFollowingCount()
        +
      • +
      + + + +
        +
      • +

        getData

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getData()
        +
      • +
      + + + +
        +
      • +

        get

        +
        public <T> T get​(java.lang.String key)
        +
      • +
      + + + + + +
        +
      • +

        set

        +
        public <T> ProfileData set​(java.lang.String key,
        +                           T value)
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/Reaction.Builder.html b/io/getstream/core/models/Reaction.Builder.html new file mode 100644 index 00000000..b307a55d --- /dev/null +++ b/io/getstream/core/models/Reaction.Builder.html @@ -0,0 +1,522 @@ + + + + + +Reaction.Builder (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Reaction.Builder

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Reaction.Builder
    • +
    +
  • +
+
+
    +
  • +
    +
    Enclosing class:
    +
    Reaction
    +
    +
    +
    public static final class Reaction.Builder
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/models/Reaction.html b/io/getstream/core/models/Reaction.html new file mode 100644 index 00000000..fbc2f59b --- /dev/null +++ b/io/getstream/core/models/Reaction.html @@ -0,0 +1,495 @@ + + + + + +Reaction (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Reaction

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.Reaction
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Reaction
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getId

        +
        public java.lang.String getId()
        +
      • +
      + + + +
        +
      • +

        getKind

        +
        public java.lang.String getKind()
        +
      • +
      + + + +
        +
      • +

        getUserID

        +
        public java.lang.String getUserID()
        +
      • +
      + + + +
        +
      • +

        getActivityID

        +
        public java.lang.String getActivityID()
        +
      • +
      + + + +
        +
      • +

        getParent

        +
        public java.lang.String getParent()
        +
      • +
      + + + +
        +
      • +

        getOwnChildren

        +
        public java.util.Map<java.lang.String,​java.util.List<Reaction>> getOwnChildren()
        +
      • +
      + + + +
        +
      • +

        getLatestChildren

        +
        public java.util.Map<java.lang.String,​java.util.List<Reaction>> getLatestChildren()
        +
      • +
      + + + +
        +
      • +

        getChildrenCounts

        +
        public java.util.Map<java.lang.String,​java.lang.Number> getChildrenCounts()
        +
      • +
      + + + +
        +
      • +

        getUserData

        +
        public Data getUserData()
        +
      • +
      + + + +
        +
      • +

        getActivityData

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getActivityData()
        +
      • +
      + + + +
        +
      • +

        getExtra

        +
        public java.util.Map<java.lang.String,​java.lang.Object> getExtra()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/models/RealtimeMessage.html b/io/getstream/core/models/RealtimeMessage.html new file mode 100644 index 00000000..1727bbe8 --- /dev/null +++ b/io/getstream/core/models/RealtimeMessage.html @@ -0,0 +1,422 @@ + + + + + +RealtimeMessage (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class RealtimeMessage

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.RealtimeMessage
    • +
    +
  • +
+
+
    +
  • +
    +
    public class RealtimeMessage
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        RealtimeMessage

        +
        public RealtimeMessage​(FeedID feed,
        +                       java.lang.String appID,
        +                       java.util.List<java.lang.String> deleted,
        +                       java.util.List<EnrichedActivity> newActivities,
        +                       java.util.Date publishedAt)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getFeed

        +
        public FeedID getFeed()
        +
      • +
      + + + +
        +
      • +

        getAppID

        +
        public java.lang.String getAppID()
        +
      • +
      + + + +
        +
      • +

        getDeleted

        +
        public java.util.List<java.lang.String> getDeleted()
        +
      • +
      + + + +
        +
      • +

        getNewActivities

        +
        public java.util.List<EnrichedActivity> getNewActivities()
        +
      • +
      + + + +
        +
      • +

        getPublishedAt

        +
        public java.util.Date getPublishedAt()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/UnfollowOperation.html b/io/getstream/core/models/UnfollowOperation.html new file mode 100644 index 00000000..2a76d90b --- /dev/null +++ b/io/getstream/core/models/UnfollowOperation.html @@ -0,0 +1,405 @@ + + + + + +UnfollowOperation (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class UnfollowOperation

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.UnfollowOperation
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class UnfollowOperation
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        UnfollowOperation

        +
        public UnfollowOperation​(java.lang.String source,
        +                         java.lang.String target,
        +                         KeepHistory keepHistory)
        +
      • +
      + + + + +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getSource

        +
        public java.lang.String getSource()
        +
      • +
      + + + +
        +
      • +

        getTarget

        +
        public java.lang.String getTarget()
        +
      • +
      + + + +
        +
      • +

        getKeepHistory

        +
        public KeepHistory getKeepHistory()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/UserData.html b/io/getstream/core/models/UserData.html new file mode 100644 index 00000000..e6c3af40 --- /dev/null +++ b/io/getstream/core/models/UserData.html @@ -0,0 +1,374 @@ + + + + + +UserData (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class UserData

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.models.UserData
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class UserData
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      UserData​(java.lang.String id, + java.lang.String alias) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      booleanequals​(java.lang.Object o) 
      java.lang.StringgetAlias() 
      java.lang.StringgetID() 
      inthashCode() 
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        UserData

        +
        public UserData​(java.lang.String id,
        +                java.lang.String alias)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getID

        +
        public java.lang.String getID()
        +
      • +
      + + + +
        +
      • +

        getAlias

        +
        public java.lang.String getAlias()
        +
      • +
      + + + +
        +
      • +

        equals

        +
        public boolean equals​(java.lang.Object o)
        +
        +
        Overrides:
        +
        equals in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        hashCode

        +
        public int hashCode()
        +
        +
        Overrides:
        +
        hashCode in class java.lang.Object
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/package-summary.html b/io/getstream/core/models/package-summary.html new file mode 100644 index 00000000..4be8f883 --- /dev/null +++ b/io/getstream/core/models/package-summary.html @@ -0,0 +1,288 @@ + + + + + +io.getstream.core.models (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core.models

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/core/models/package-tree.html b/io/getstream/core/models/package-tree.html new file mode 100644 index 00000000..702b52e8 --- /dev/null +++ b/io/getstream/core/models/package-tree.html @@ -0,0 +1,199 @@ + + + + + +io.getstream.core.models Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core.models

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+
+ + + diff --git a/io/getstream/core/models/serialization/DataDeserializer.html b/io/getstream/core/models/serialization/DataDeserializer.html new file mode 100644 index 00000000..644c31b8 --- /dev/null +++ b/io/getstream/core/models/serialization/DataDeserializer.html @@ -0,0 +1,379 @@ + + + + + +DataDeserializer (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DataDeserializer

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • com.fasterxml.jackson.databind.JsonDeserializer<T>
    • +
    • +
        +
      • com.fasterxml.jackson.databind.deser.std.StdDeserializer<Data>
      • +
      • +
          +
        • io.getstream.core.models.serialization.DataDeserializer
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.deser.NullValueProvider, java.io.Serializable
    +
    +
    +
    public final class DataDeserializer
    +extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<Data>
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +com.fasterxml.jackson.databind.JsonDeserializer.None
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_valueClass, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      DataDeserializer() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      Datadeserialize​(com.fasterxml.jackson.core.JsonParser parser, + com.fasterxml.jackson.databind.DeserializationContext ctx) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, deserializeWithType, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +deserialize, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DataDeserializer

        +
        public DataDeserializer()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        deserialize

        +
        public Data deserialize​(com.fasterxml.jackson.core.JsonParser parser,
        +                        com.fasterxml.jackson.databind.DeserializationContext ctx)
        +                 throws java.io.IOException
        +
        +
        Specified by:
        +
        deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<Data>
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/serialization/DateDeserializer.html b/io/getstream/core/models/serialization/DateDeserializer.html new file mode 100644 index 00000000..c0bfa16c --- /dev/null +++ b/io/getstream/core/models/serialization/DateDeserializer.html @@ -0,0 +1,381 @@ + + + + + +DateDeserializer (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DateDeserializer

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • com.fasterxml.jackson.databind.JsonDeserializer<T>
    • +
    • +
        +
      • com.fasterxml.jackson.databind.deser.std.StdDeserializer<java.util.Date>
      • +
      • +
          +
        • io.getstream.core.models.serialization.DateDeserializer
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    com.fasterxml.jackson.databind.deser.NullValueProvider, java.io.Serializable
    +
    +
    +
    public class DateDeserializer
    +extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<java.util.Date>
    +
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +com.fasterxml.jackson.databind.JsonDeserializer.None
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_valueClass, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      DateDeserializer() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.util.Datedeserialize​(com.fasterxml.jackson.core.JsonParser parser, + com.fasterxml.jackson.databind.DeserializationContext context) 
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

        +_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, deserializeWithType, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
      • +
      +
        +
      • + + +

        Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

        +deserialize, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        DateDeserializer

        +
        public DateDeserializer()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        deserialize

        +
        public java.util.Date deserialize​(com.fasterxml.jackson.core.JsonParser parser,
        +                                  com.fasterxml.jackson.databind.DeserializationContext context)
        +                           throws java.io.IOException,
        +                                  com.fasterxml.jackson.core.JsonProcessingException
        +
        +
        Specified by:
        +
        deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<java.util.Date>
        +
        Throws:
        +
        java.io.IOException
        +
        com.fasterxml.jackson.core.JsonProcessingException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/models/serialization/package-summary.html b/io/getstream/core/models/serialization/package-summary.html new file mode 100644 index 00000000..381a02c1 --- /dev/null +++ b/io/getstream/core/models/serialization/package-summary.html @@ -0,0 +1,168 @@ + + + + + +io.getstream.core.models.serialization (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core.models.serialization

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/core/models/serialization/package-tree.html b/io/getstream/core/models/serialization/package-tree.html new file mode 100644 index 00000000..052446cc --- /dev/null +++ b/io/getstream/core/models/serialization/package-tree.html @@ -0,0 +1,170 @@ + + + + + +io.getstream.core.models.serialization Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core.models.serialization

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • com.fasterxml.jackson.databind.JsonDeserializer<T> (implements com.fasterxml.jackson.databind.deser.NullValueProvider) +
        +
      • com.fasterxml.jackson.databind.deser.std.StdDeserializer<T> (implements java.io.Serializable) + +
      • +
      +
    • +
    +
  • +
+
+
+
+ + + diff --git a/io/getstream/core/options/ActivityMarker.html b/io/getstream/core/options/ActivityMarker.html new file mode 100644 index 00000000..5676140e --- /dev/null +++ b/io/getstream/core/options/ActivityMarker.html @@ -0,0 +1,397 @@ + + + + + +ActivityMarker (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class ActivityMarker

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.options.ActivityMarker
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RequestOption
    +
    +
    +
    public final class ActivityMarker
    +extends java.lang.Object
    +implements RequestOption
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/options/Crop.Type.html b/io/getstream/core/options/Crop.Type.html new file mode 100644 index 00000000..e0aa8c8d --- /dev/null +++ b/io/getstream/core/options/Crop.Type.html @@ -0,0 +1,437 @@ + + + + + +Crop.Type (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Crop.Type

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<Crop.Type>
    • +
    • +
        +
      • io.getstream.core.options.Crop.Type
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Crop.Type>
    +
    +
    +
    Enclosing class:
    +
    Crop
    +
    +
    +
    public static enum Crop.Type
    +extends java.lang.Enum<Crop.Type>
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      BOTTOM 
      CENTER 
      LEFT 
      RIGHT 
      TOP 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringtoString() 
      static Crop.TypevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Crop.Type[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Crop.Type[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Crop.Type c : Crop.Type.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Crop.Type valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Enum<Crop.Type>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/options/Crop.html b/io/getstream/core/options/Crop.html new file mode 100644 index 00000000..6c61e3fd --- /dev/null +++ b/io/getstream/core/options/Crop.html @@ -0,0 +1,397 @@ + + + + + +Crop (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Crop

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.options.Crop
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RequestOption
    +
    +
    +
    public final class Crop
    +extends java.lang.Object
    +implements RequestOption
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class Crop.Type 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Crop​(int width, + int height) 
      Crop​(int width, + int height, + Crop.Type... types) 
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Crop

        +
        public Crop​(int width,
        +            int height,
        +            Crop.Type... types)
        +
      • +
      + + + +
        +
      • +

        Crop

        +
        public Crop​(int width,
        +            int height)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/options/CustomQueryParameter.html b/io/getstream/core/options/CustomQueryParameter.html new file mode 100644 index 00000000..5820651f --- /dev/null +++ b/io/getstream/core/options/CustomQueryParameter.html @@ -0,0 +1,343 @@ + + + + + +CustomQueryParameter (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class CustomQueryParameter

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.options.CustomQueryParameter
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RequestOption
    +
    +
    +
    public final class CustomQueryParameter
    +extends java.lang.Object
    +implements RequestOption
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      CustomQueryParameter​(java.lang.String name, + java.lang.String value) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidapply​(Request.Builder builder) 
      java.lang.StringgetName() 
      java.lang.StringgetValue() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        CustomQueryParameter

        +
        public CustomQueryParameter​(java.lang.String name,
        +                            java.lang.String value)
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getName

        +
        public java.lang.String getName()
        +
      • +
      + + + +
        +
      • +

        getValue

        +
        public java.lang.String getValue()
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/options/EnrichmentFlags.html b/io/getstream/core/options/EnrichmentFlags.html new file mode 100644 index 00000000..67a60862 --- /dev/null +++ b/io/getstream/core/options/EnrichmentFlags.html @@ -0,0 +1,425 @@ + + + + + +EnrichmentFlags (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class EnrichmentFlags

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.options.EnrichmentFlags
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RequestOption
    +
    +
    +
    public final class EnrichmentFlags
    +extends java.lang.Object
    +implements RequestOption
    +
  • +
+
+
+ +
+
+ +
+
+
+ + + + diff --git a/io/getstream/core/options/Filter.html b/io/getstream/core/options/Filter.html new file mode 100644 index 00000000..d89495d6 --- /dev/null +++ b/io/getstream/core/options/Filter.html @@ -0,0 +1,369 @@ + + + + + +Filter (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Filter

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.options.Filter
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RequestOption
    +
    +
    +
    public final class Filter
    +extends java.lang.Object
    +implements RequestOption
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Filter

        +
        public Filter()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        idGreaterThan

        +
        public Filter idGreaterThan​(java.lang.String id)
        +
      • +
      + + + +
        +
      • +

        idGreaterThanEqual

        +
        public Filter idGreaterThanEqual​(java.lang.String id)
        +
      • +
      + + + +
        +
      • +

        idLessThan

        +
        public Filter idLessThan​(java.lang.String id)
        +
      • +
      + + + +
        +
      • +

        idLessThanEqual

        +
        public Filter idLessThanEqual​(java.lang.String id)
        +
      • +
      + + + + +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/options/KeepHistory.html b/io/getstream/core/options/KeepHistory.html new file mode 100644 index 00000000..ad15a0d7 --- /dev/null +++ b/io/getstream/core/options/KeepHistory.html @@ -0,0 +1,327 @@ + + + + + +KeepHistory (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class KeepHistory

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.options.KeepHistory
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RequestOption
    +
    +
    +
    public final class KeepHistory
    +extends java.lang.Object
    +implements RequestOption
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      KeepHistory​(KeepHistory keepHistory) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidapply​(Request.Builder builder) 
      booleangetFlag() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        KeepHistory

        +
        public KeepHistory​(KeepHistory keepHistory)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/options/Limit.html b/io/getstream/core/options/Limit.html new file mode 100644 index 00000000..9d999b1e --- /dev/null +++ b/io/getstream/core/options/Limit.html @@ -0,0 +1,313 @@ + + + + + +Limit (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Limit

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.options.Limit
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RequestOption
    +
    +
    +
    public final class Limit
    +extends java.lang.Object
    +implements RequestOption
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Limit​(int value) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidapply​(Request.Builder builder) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Limit

        +
        public Limit​(int value)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/options/Offset.html b/io/getstream/core/options/Offset.html new file mode 100644 index 00000000..24168e89 --- /dev/null +++ b/io/getstream/core/options/Offset.html @@ -0,0 +1,313 @@ + + + + + +Offset (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Offset

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.options.Offset
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RequestOption
    +
    +
    +
    public final class Offset
    +extends java.lang.Object
    +implements RequestOption
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Offset​(int value) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidapply​(Request.Builder builder) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Offset

        +
        public Offset​(int value)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/options/Ranking.html b/io/getstream/core/options/Ranking.html new file mode 100644 index 00000000..e50ebb26 --- /dev/null +++ b/io/getstream/core/options/Ranking.html @@ -0,0 +1,327 @@ + + + + + +Ranking (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Ranking

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.options.Ranking
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RequestOption
    +
    +
    +
    public final class Ranking
    +extends java.lang.Object
    +implements RequestOption
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Ranking​(java.lang.String ranking) 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidapply​(Request.Builder builder) 
      java.lang.StringgetRanking() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Ranking

        +
        public Ranking​(java.lang.String ranking)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/options/RequestOption.html b/io/getstream/core/options/RequestOption.html new file mode 100644 index 00000000..dde134e3 --- /dev/null +++ b/io/getstream/core/options/RequestOption.html @@ -0,0 +1,252 @@ + + + + + +RequestOption (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Interface RequestOption

+
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/options/Resize.Type.html b/io/getstream/core/options/Resize.Type.html new file mode 100644 index 00000000..bf630fd3 --- /dev/null +++ b/io/getstream/core/options/Resize.Type.html @@ -0,0 +1,424 @@ + + + + + +Resize.Type (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Resize.Type

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<Resize.Type>
    • +
    • +
        +
      • io.getstream.core.options.Resize.Type
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Resize.Type>
    +
    +
    +
    Enclosing class:
    +
    Resize
    +
    +
    +
    public static enum Resize.Type
    +extends java.lang.Enum<Resize.Type>
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      CLIP 
      CROP 
      FILL 
      SCALE 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringtoString() 
      static Resize.TypevalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Resize.Type[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Resize.Type[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Resize.Type c : Resize.Type.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Resize.Type valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Enum<Resize.Type>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/options/Resize.html b/io/getstream/core/options/Resize.html new file mode 100644 index 00000000..c7e8affd --- /dev/null +++ b/io/getstream/core/options/Resize.html @@ -0,0 +1,397 @@ + + + + + +Resize (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Resize

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.options.Resize
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    RequestOption
    +
    +
    +
    public final class Resize
    +extends java.lang.Object
    +implements RequestOption
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClassDescription
      static class Resize.Type 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Resize​(int width, + int height) 
      Resize​(int width, + int height, + Resize.Type type) 
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Resize

        +
        public Resize​(int width,
        +              int height,
        +              Resize.Type type)
        +
      • +
      + + + +
        +
      • +

        Resize

        +
        public Resize​(int width,
        +              int height)
        +
      • +
      +
    • +
    +
    + +
    + +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/options/package-summary.html b/io/getstream/core/options/package-summary.html new file mode 100644 index 00000000..1c1df171 --- /dev/null +++ b/io/getstream/core/options/package-summary.html @@ -0,0 +1,234 @@ + + + + + +io.getstream.core.options (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core.options

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/core/options/package-tree.html b/io/getstream/core/options/package-tree.html new file mode 100644 index 00000000..f62b07d4 --- /dev/null +++ b/io/getstream/core/options/package-tree.html @@ -0,0 +1,191 @@ + + + + + +io.getstream.core.options Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core.options

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+
+
+ + + diff --git a/io/getstream/core/package-summary.html b/io/getstream/core/package-summary.html new file mode 100644 index 00000000..8e93dd53 --- /dev/null +++ b/io/getstream/core/package-summary.html @@ -0,0 +1,215 @@ + + + + + +io.getstream.core (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/core/package-tree.html b/io/getstream/core/package-tree.html new file mode 100644 index 00000000..c6fcce46 --- /dev/null +++ b/io/getstream/core/package-tree.html @@ -0,0 +1,184 @@ + + + + + +io.getstream.core Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+
+
+ + + diff --git a/io/getstream/core/utils/Auth.TokenAction.html b/io/getstream/core/utils/Auth.TokenAction.html new file mode 100644 index 00000000..6cf1e8cd --- /dev/null +++ b/io/getstream/core/utils/Auth.TokenAction.html @@ -0,0 +1,424 @@ + + + + + +Auth.TokenAction (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Auth.TokenAction

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<Auth.TokenAction>
    • +
    • +
        +
      • io.getstream.core.utils.Auth.TokenAction
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Auth.TokenAction>
    +
    +
    +
    Enclosing class:
    +
    Auth
    +
    +
    +
    public static enum Auth.TokenAction
    +extends java.lang.Enum<Auth.TokenAction>
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Enum Constant Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      Enum Constants 
      Enum ConstantDescription
      ANY 
      DELETE 
      READ 
      WRITE 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      java.lang.StringtoString() 
      static Auth.TokenActionvalueOf​(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Auth.TokenAction[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Auth.TokenAction[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Auth.TokenAction c : Auth.TokenAction.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Auth.TokenAction valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Enum<Auth.TokenAction>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/utils/Auth.TokenResource.html b/io/getstream/core/utils/Auth.TokenResource.html new file mode 100644 index 00000000..3627e57d --- /dev/null +++ b/io/getstream/core/utils/Auth.TokenResource.html @@ -0,0 +1,541 @@ + + + + + +Auth.TokenResource (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Enum Auth.TokenResource

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<Auth.TokenResource>
    • +
    • +
        +
      • io.getstream.core.utils.Auth.TokenResource
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Auth.TokenResource>
    +
    +
    +
    Enclosing class:
    +
    Auth
    +
    +
    +
    public static enum Auth.TokenResource
    +extends java.lang.Enum<Auth.TokenResource>
    +
  • +
+
+
+ +
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Auth.TokenResource[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Auth.TokenResource c : Auth.TokenResource.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Auth.TokenResource valueOf​(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Enum<Auth.TokenResource>
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/utils/Auth.html b/io/getstream/core/utils/Auth.html new file mode 100644 index 00000000..b04505d0 --- /dev/null +++ b/io/getstream/core/utils/Auth.html @@ -0,0 +1,582 @@ + + + + + +Auth (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Auth

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.utils.Auth
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Auth
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        buildToTargetUpdateToken

        +
        public static Token buildToTargetUpdateToken​(java.lang.String secret,
        +                                             FeedID feed,
        +                                             Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildFeedToken

        +
        public static Token buildFeedToken​(java.lang.String secret,
        +                                   Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildActivityToken

        +
        public static Token buildActivityToken​(java.lang.String secret,
        +                                       Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildFollowToken

        +
        public static Token buildFollowToken​(java.lang.String secret,
        +                                     Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildFollowToken

        +
        public static Token buildFollowToken​(java.lang.String secret,
        +                                     FeedID feed,
        +                                     Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildCollectionsToken

        +
        public static Token buildCollectionsToken​(java.lang.String secret,
        +                                          Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildPersonalizationToken

        +
        public static Token buildPersonalizationToken​(java.lang.String secret,
        +                                              java.lang.String userID,
        +                                              Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildReactionsToken

        +
        public static Token buildReactionsToken​(java.lang.String secret,
        +                                        Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildAnalyticsToken

        +
        public static Token buildAnalyticsToken​(java.lang.String secret,
        +                                        Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildAnalyticsRedirectToken

        +
        public static Token buildAnalyticsRedirectToken​(java.lang.String secret)
        +
      • +
      + + + +
        +
      • +

        buildUsersToken

        +
        public static Token buildUsersToken​(java.lang.String secret,
        +                                    Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildOpenGraphToken

        +
        public static Token buildOpenGraphToken​(java.lang.String secret)
        +
      • +
      + + + +
        +
      • +

        buildFilesToken

        +
        public static Token buildFilesToken​(java.lang.String secret,
        +                                    Auth.TokenAction action)
        +
      • +
      + + + +
        +
      • +

        buildFrontendToken

        +
        public static Token buildFrontendToken​(java.lang.String secret,
        +                                       java.lang.String userID)
        +
      • +
      + + + +
        +
      • +

        buildFrontendToken

        +
        public static Token buildFrontendToken​(java.lang.String secret,
        +                                       java.lang.String userID,
        +                                       java.util.Date expiresAt)
        +
      • +
      + + + + + + + +
        +
      • +

        buildBackendToken

        +
        public static Token buildBackendToken​(java.lang.String secret,
        +                                      Auth.TokenResource resource,
        +                                      Auth.TokenAction action,
        +                                      java.lang.String feedID,
        +                                      java.lang.String userID)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/utils/DefaultOptions.html b/io/getstream/core/utils/DefaultOptions.html new file mode 100644 index 00000000..7c3af34d --- /dev/null +++ b/io/getstream/core/utils/DefaultOptions.html @@ -0,0 +1,360 @@ + + + + + +DefaultOptions (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class DefaultOptions

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.utils.DefaultOptions
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class DefaultOptions
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        DEFAULT_LIMIT

        +
        public static final Limit DEFAULT_LIMIT
        +
      • +
      + + + +
        +
      • +

        DEFAULT_OFFSET

        +
        public static final Offset DEFAULT_OFFSET
        +
      • +
      + + + +
        +
      • +

        DEFAULT_FILTER

        +
        public static final Filter DEFAULT_FILTER
        +
      • +
      + + + +
        +
      • +

        DEFAULT_MARKER

        +
        public static final ActivityMarker DEFAULT_MARKER
        +
      • +
      + + + +
        +
      • +

        DEFAULT_ENRICHMENT_FLAGS

        +
        public static final EnrichmentFlags DEFAULT_ENRICHMENT_FLAGS
        +
      • +
      + + + +
        +
      • +

        DEFAULT_ACTIVITY_COPY_LIMIT

        +
        public static final int DEFAULT_ACTIVITY_COPY_LIMIT
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        MAX_ACTIVITY_COPY_LIMIT

        +
        public static final int MAX_ACTIVITY_COPY_LIMIT
        +
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/utils/Enrichment.html b/io/getstream/core/utils/Enrichment.html new file mode 100644 index 00000000..155c2931 --- /dev/null +++ b/io/getstream/core/utils/Enrichment.html @@ -0,0 +1,294 @@ + + + + + +Enrichment (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Enrichment

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.utils.Enrichment
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Enrichment
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static java.lang.StringcreateActivityReference​(java.lang.String id) 
      static java.lang.StringcreateCollectionReference​(java.lang.String collection, + java.lang.String id) 
      static java.lang.StringcreateUserReference​(java.lang.String id) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        createCollectionReference

        +
        public static java.lang.String createCollectionReference​(java.lang.String collection,
        +                                                         java.lang.String id)
        +
      • +
      + + + +
        +
      • +

        createUserReference

        +
        public static java.lang.String createUserReference​(java.lang.String id)
        +
      • +
      + + + +
        +
      • +

        createActivityReference

        +
        public static java.lang.String createActivityReference​(java.lang.String id)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/utils/Info.html b/io/getstream/core/utils/Info.html new file mode 100644 index 00000000..d566e79d --- /dev/null +++ b/io/getstream/core/utils/Info.html @@ -0,0 +1,310 @@ + + + + + +Info (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Info

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.utils.Info
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Info
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Field Summary

      + + + + + + + + + + + + +
      Fields 
      Modifier and TypeFieldDescription
      static java.lang.StringVERSION 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static java.util.PropertiesgetProperties() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    + +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getProperties

        +
        public static java.util.Properties getProperties()
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/utils/Request.html b/io/getstream/core/utils/Request.html new file mode 100644 index 00000000..c0feb45a --- /dev/null +++ b/io/getstream/core/utils/Request.html @@ -0,0 +1,449 @@ + + + + + +Request (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Request

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.utils.Request
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Request
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        buildRequest

        +
        public static Request.Builder buildRequest​(java.net.URL url,
        +                                           java.lang.String apiKey,
        +                                           Token token,
        +                                           RequestOption... options)
        +                                    throws java.net.URISyntaxException,
        +                                           java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.URISyntaxException
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildGet

        +
        public static Request buildGet​(java.net.URL url,
        +                               java.lang.String apiKey,
        +                               Token token,
        +                               RequestOption... options)
        +                        throws java.net.URISyntaxException,
        +                               java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.URISyntaxException
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildDelete

        +
        public static Request buildDelete​(java.net.URL url,
        +                                  java.lang.String apiKey,
        +                                  Token token,
        +                                  RequestOption... options)
        +                           throws java.net.URISyntaxException,
        +                                  java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.URISyntaxException
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildPost

        +
        public static Request buildPost​(java.net.URL url,
        +                                java.lang.String apiKey,
        +                                Token token,
        +                                byte[] payload,
        +                                RequestOption... options)
        +                         throws java.net.URISyntaxException,
        +                                java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.URISyntaxException
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildMultiPartPost

        +
        public static Request buildMultiPartPost​(java.net.URL url,
        +                                         java.lang.String apiKey,
        +                                         Token token,
        +                                         java.lang.String fileName,
        +                                         byte[] payload,
        +                                         RequestOption... options)
        +                                  throws java.net.URISyntaxException,
        +                                         java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.URISyntaxException
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildMultiPartPost

        +
        public static Request buildMultiPartPost​(java.net.URL url,
        +                                         java.lang.String apiKey,
        +                                         Token token,
        +                                         java.io.File payload,
        +                                         RequestOption... options)
        +                                  throws java.net.URISyntaxException,
        +                                         java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.URISyntaxException
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildPut

        +
        public static Request buildPut​(java.net.URL url,
        +                               java.lang.String apiKey,
        +                               Token token,
        +                               byte[] payload,
        +                               RequestOption... options)
        +                        throws java.net.URISyntaxException,
        +                               java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.URISyntaxException
        +
        java.net.MalformedURLException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/utils/Routes.html b/io/getstream/core/utils/Routes.html new file mode 100644 index 00000000..1172e026 --- /dev/null +++ b/io/getstream/core/utils/Routes.html @@ -0,0 +1,669 @@ + + + + + +Routes (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Routes

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.utils.Routes
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Routes
    +extends java.lang.Object
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        buildFeedURL

        +
        public static java.net.URL buildFeedURL​(java.net.URL baseURL,
        +                                        FeedID feed,
        +                                        java.lang.String path)
        +                                 throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildEnrichedFeedURL

        +
        public static java.net.URL buildEnrichedFeedURL​(java.net.URL baseURL,
        +                                                FeedID feed,
        +                                                java.lang.String path)
        +                                         throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildToTargetUpdateURL

        +
        public static java.net.URL buildToTargetUpdateURL​(java.net.URL baseURL,
        +                                                  FeedID feed)
        +                                           throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildActivitiesURL

        +
        public static java.net.URL buildActivitiesURL​(java.net.URL baseURL)
        +                                       throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildEnrichedActivitiesURL

        +
        public static java.net.URL buildEnrichedActivitiesURL​(java.net.URL baseURL)
        +                                               throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildCollectionsURL

        +
        public static java.net.URL buildCollectionsURL​(java.net.URL baseURL,
        +                                               java.lang.String path)
        +                                        throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildReactionsURL

        +
        public static java.net.URL buildReactionsURL​(java.net.URL baseURL)
        +                                      throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildReactionsURL

        +
        public static java.net.URL buildReactionsURL​(java.net.URL baseURL,
        +                                             java.lang.String path)
        +                                      throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildUsersURL

        +
        public static java.net.URL buildUsersURL​(java.net.URL baseURL)
        +                                  throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildUsersURL

        +
        public static java.net.URL buildUsersURL​(java.net.URL baseURL,
        +                                         java.lang.String path)
        +                                  throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildBatchCollectionsURL

        +
        public static java.net.URL buildBatchCollectionsURL​(java.net.URL baseURL)
        +                                             throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildOpenGraphURL

        +
        public static java.net.URL buildOpenGraphURL​(java.net.URL baseURL)
        +                                      throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildFilesURL

        +
        public static java.net.URL buildFilesURL​(java.net.URL baseURL)
        +                                  throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildImagesURL

        +
        public static java.net.URL buildImagesURL​(java.net.URL baseURL)
        +                                   throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildPersonalizationURL

        +
        public static java.net.URL buildPersonalizationURL​(java.net.URL baseURL,
        +                                                   java.lang.String path)
        +                                            throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildAnalyticsURL

        +
        public static java.net.URL buildAnalyticsURL​(java.net.URL baseURL,
        +                                             java.lang.String path)
        +                                      throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildActivityUpdateURL

        +
        public static java.net.URL buildActivityUpdateURL​(java.net.URL baseURL)
        +                                           throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildAddToManyURL

        +
        public static java.net.URL buildAddToManyURL​(java.net.URL baseURL)
        +                                      throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildFollowManyURL

        +
        public static java.net.URL buildFollowManyURL​(java.net.URL baseURL)
        +                                       throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        buildUnfollowManyURL

        +
        public static java.net.URL buildUnfollowManyURL​(java.net.URL baseURL)
        +                                         throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      + + + +
        +
      • +

        followStatsPath

        +
        public static java.net.URL followStatsPath​(java.net.URL baseURL)
        +                                    throws java.net.MalformedURLException
        +
        +
        Throws:
        +
        java.net.MalformedURLException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/utils/Serialization.html b/io/getstream/core/utils/Serialization.html new file mode 100644 index 00000000..843fe865 --- /dev/null +++ b/io/getstream/core/utils/Serialization.html @@ -0,0 +1,655 @@ + + + + + +Serialization (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Serialization

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.utils.Serialization
    • +
    +
  • +
+
+
    +
  • +
    +
    public final class Serialization
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <T,​U>
      T
      convert​(U obj, + com.fasterxml.jackson.core.type.TypeReference<T> type) 
      static <T,​U>
      T
      convert​(U obj, + java.lang.Class<T> type) 
      static <T> Tdeserialize​(Response response, + com.fasterxml.jackson.core.type.TypeReference<T> type) 
      static <T> Tdeserialize​(Response response, + java.lang.Class<T> type) 
      static <T> Tdeserialize​(Response response, + java.lang.String wrapper, + java.lang.Class<T> type) 
      static <T> TdeserializeContainer​(Response response, + java.lang.Class<?> wrapperType, + java.lang.Class<?>... types) 
      static <T> java.util.List<T>deserializeContainer​(Response response, + java.lang.Class<T> type) 
      static <T> TdeserializeContainer​(Response response, + java.lang.String wrapper, + com.fasterxml.jackson.databind.JavaType element) 
      static <T> java.util.List<T>deserializeContainer​(Response response, + java.lang.String wrapper, + java.lang.Class<T> element) 
      static <T> TdeserializeContainerSingleItem​(Response response, + java.lang.Class<T> element) 
      static java.lang.VoiddeserializeError​(Response response) 
      static <T> TfromJSON​(java.io.InputStream json, + com.fasterxml.jackson.core.type.TypeReference<T> type) 
      static <T> TfromJSON​(java.io.InputStream json, + java.lang.Class<T> type) 
      static <T> TfromJSON​(java.io.InputStream json, + java.lang.String wrapper, + com.fasterxml.jackson.databind.JavaType type) 
      static <T> TfromJSON​(java.lang.String json, + java.lang.Class<T> type) 
      static <T> java.util.List<T>fromJSONList​(java.lang.String json, + java.lang.Class<T> type) 
      com.fasterxml.jackson.databind.ObjectMappergetObjectMapper() 
      voidsetObjectMapper​(com.fasterxml.jackson.databind.ObjectMapper mapper) 
      static <T> byte[]toJSON​(T obj) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getObjectMapper

        +
        public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
        +
      • +
      + + + +
        +
      • +

        setObjectMapper

        +
        public void setObjectMapper​(com.fasterxml.jackson.databind.ObjectMapper mapper)
        +
      • +
      + + + + + +
        +
      • +

        toJSON

        +
        public static <T> byte[] toJSON​(T obj)
        +                         throws com.fasterxml.jackson.core.JsonProcessingException
        +
        +
        Throws:
        +
        com.fasterxml.jackson.core.JsonProcessingException
        +
        +
      • +
      + + + +
        +
      • +

        fromJSON

        +
        public static <T> T fromJSON​(java.io.InputStream json,
        +                             java.lang.Class<T> type)
        +                      throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        fromJSON

        +
        public static <T> T fromJSON​(java.io.InputStream json,
        +                             com.fasterxml.jackson.core.type.TypeReference<T> type)
        +                      throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        fromJSON

        +
        public static <T> T fromJSON​(java.io.InputStream json,
        +                             java.lang.String wrapper,
        +                             com.fasterxml.jackson.databind.JavaType type)
        +                      throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        fromJSON

        +
        public static <T> T fromJSON​(java.lang.String json,
        +                             java.lang.Class<T> type)
        +                      throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        fromJSONList

        +
        public static <T> java.util.List<T> fromJSONList​(java.lang.String json,
        +                                                 java.lang.Class<T> type)
        +                                          throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + + + +
        +
      • +

        convert

        +
        public static <T,​U> T convert​(U obj,
        +                                    java.lang.Class<T> type)
        +
      • +
      + + + + + +
        +
      • +

        convert

        +
        public static <T,​U> T convert​(U obj,
        +                                    com.fasterxml.jackson.core.type.TypeReference<T> type)
        +
      • +
      + + + +
        +
      • +

        deserializeContainer

        +
        public static <T> java.util.List<T> deserializeContainer​(Response response,
        +                                                         java.lang.Class<T> type)
        +                                                  throws java.io.IOException,
        +                                                         StreamException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeContainer

        +
        public static <T> T deserializeContainer​(Response response,
        +                                         java.lang.Class<?> wrapperType,
        +                                         java.lang.Class<?>... types)
        +                                  throws java.io.IOException,
        +                                         StreamException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeContainer

        +
        public static <T> java.util.List<T> deserializeContainer​(Response response,
        +                                                         java.lang.String wrapper,
        +                                                         java.lang.Class<T> element)
        +                                                  throws java.io.IOException,
        +                                                         StreamException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeContainerSingleItem

        +
        public static <T> T deserializeContainerSingleItem​(Response response,
        +                                                   java.lang.Class<T> element)
        +                                            throws java.io.IOException,
        +                                                   StreamException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeContainer

        +
        public static <T> T deserializeContainer​(Response response,
        +                                         java.lang.String wrapper,
        +                                         com.fasterxml.jackson.databind.JavaType element)
        +                                  throws java.io.IOException,
        +                                         StreamException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public static <T> T deserialize​(Response response,
        +                                java.lang.String wrapper,
        +                                java.lang.Class<T> type)
        +                         throws java.io.IOException,
        +                                StreamException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public static <T> T deserialize​(Response response,
        +                                java.lang.Class<T> type)
        +                         throws java.io.IOException,
        +                                StreamException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        deserialize

        +
        public static <T> T deserialize​(Response response,
        +                                com.fasterxml.jackson.core.type.TypeReference<T> type)
        +                         throws java.io.IOException,
        +                                StreamException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        StreamException
        +
        +
      • +
      + + + +
        +
      • +

        deserializeError

        +
        public static java.lang.Void deserializeError​(Response response)
        +                                       throws java.io.IOException,
        +                                              StreamException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        StreamException
        +
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ +
+ +
+ + diff --git a/io/getstream/core/utils/Streams.html b/io/getstream/core/utils/Streams.html new file mode 100644 index 00000000..1af88581 --- /dev/null +++ b/io/getstream/core/utils/Streams.html @@ -0,0 +1,304 @@ + + + + + +Streams (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+ +
+
+ +

Class Streams

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • io.getstream.core.utils.Streams
    • +
    +
  • +
+
+
    +
  • +
    +
    public class Streams
    +extends java.lang.Object
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Summary

      + + + + + + + + + + +
      Constructors 
      ConstructorDescription
      Streams() 
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static <T> java8.util.stream.Stream<T>stream​(java.lang.Iterable<T> iterable) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
    +
  • +
+
+
+
    +
  • + +
    +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Streams

        +
        public Streams()
        +
      • +
      +
    • +
    +
    + +
    +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        stream

        +
        public static <T> java8.util.stream.Stream<T> stream​(java.lang.Iterable<T> iterable)
        +
      • +
      +
    • +
    +
    +
  • +
+
+
+
+ + + + diff --git a/io/getstream/core/utils/package-summary.html b/io/getstream/core/utils/package-summary.html new file mode 100644 index 00000000..6d0cc1ce --- /dev/null +++ b/io/getstream/core/utils/package-summary.html @@ -0,0 +1,211 @@ + + + + + +io.getstream.core.utils (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Package io.getstream.core.utils

+
+
+ +
+
+
+ +
+ + diff --git a/io/getstream/core/utils/package-tree.html b/io/getstream/core/utils/package-tree.html new file mode 100644 index 00000000..0d1d59ce --- /dev/null +++ b/io/getstream/core/utils/package-tree.html @@ -0,0 +1,183 @@ + + + + + +io.getstream.core.utils Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package io.getstream.core.utils

+Package Hierarchies: + +
+
+
+

Class Hierarchy

+ +
+
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+
+
+ + + diff --git a/jquery-ui.overrides.css b/jquery-ui.overrides.css new file mode 100644 index 00000000..facf852c --- /dev/null +++ b/jquery-ui.overrides.css @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; + border: 1px solid #F8981D; +} diff --git a/jquery/external/jquery/jquery.js b/jquery/external/jquery/jquery.js new file mode 100644 index 00000000..50937333 --- /dev/null +++ b/jquery/external/jquery/jquery.js @@ -0,0 +1,10872 @@ +/*! + * jQuery JavaScript Library v3.5.1 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2020-05-04T22:49Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; + + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + return typeof obj === "function" && typeof obj.nodeType !== "number"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + +var document = window.document; + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { + doc = doc || document; + + var i, val, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.5.1", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + copy = options[ name ]; + + // Prevent Object.prototype pollution + // Prevent never-ending loop + if ( name === "__proto__" || target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; + } else { + clone = src; + } + copyIsArray = false; + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return flat( ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), +function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +} ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.5 + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://js.foundation/ + * + * Date: 2020-03-14 + */ +( function( window ) { +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + nonnativeSelectorCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ( {} ).hasOwnProperty, + arr = [], + pop = arr.pop, + pushNative = arr.push, + push = arr.push, + slice = arr.slice, + + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[ i ] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + + "ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + + // "Attribute values must be CSS identifiers [capture 5] + // or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + + "*" ), + rdescend = new RegExp( whitespace + "|>" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rhtml = /HTML$/i, + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + return nonHex ? + + // Strip the backslash prefix from a non-hex escape sequence + nonHex : + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + ( arr = slice.call( preferredDoc.childNodes ) ), + preferredDoc.childNodes + ); + + // Support: Android<4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + pushNative.apply( target, slice.call( els ) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + + // Can't trust NodeList.length + while ( ( target[ j++ ] = els[ i++ ] ) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + setDocument( context ); + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + + // ID selector + if ( ( m = match[ 1 ] ) ) { + + // Document context + if ( nodeType === 9 ) { + if ( ( elem = context.getElementById( m ) ) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && ( elem = newContext.getElementById( m ) ) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[ 2 ] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && + + // Support: IE 8 only + // Exclude object elements + ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && + ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + if ( newContext !== context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); + } + newSelector = groups.join( "," ); + } + + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return ( cache[ key + " " ] = value ); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement( "fieldset" ); + + try { + return !!fn( el ); + } catch ( e ) { + return false; + } finally { + + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split( "|" ), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[ i ] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( ( cur = cur.nextSibling ) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return ( name === "input" || name === "button" ) && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction( function( argument ) { + argument = +argument; + return markFunction( function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); + } + } + } ); + } ); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + var namespace = elem.namespaceURI, + docElem = ( elem.ownerDocument || elem ).documentElement; + + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, + // Safari 4 - 5 only, Opera <=11.6 - 12.x only + // IE/Edge & older browsers don't support the :scope pseudo-class. + // Support: Safari 6.0 only + // Safari 6.0 supports :scope but it's an alias of :root there. + support.scope = assert( function( el ) { + docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); + return typeof el.querySelectorAll !== "undefined" && + !el.querySelectorAll( ":scope fieldset div" ).length; + } ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert( function( el ) { + el.className = "i"; + return !el.getAttribute( "className" ); + } ); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert( function( el ) { + el.appendChild( document.createComment( "" ) ); + return !el.getElementsByTagName( "*" ).length; + } ); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + } ); + + // ID filter and find + if ( support.getById ) { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute( "id" ) === attrId; + }; + }; + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode( "id" ); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find[ "TAG" ] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { + + var input; + + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } + + // Support: Firefox <=3.6 - 5 only + // Old Firefox doesn't throw on a badly-escaped identifier. + el.querySelectorAll( "\\\f" ); + rbuggyQSA.push( "[\\r\\n\\f]" ); + } ); + + assert( function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll( "[name=d]" ).length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: Opera 10 - 11 only + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll( "*,:x" ); + rbuggyQSA.push( ",.*:" ); + } ); + } + + if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector ) ) ) ) { + + assert( function( el ) { + + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + } ); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); + } : + function( a, b ) { + if ( b ) { + while ( ( b = b.parentNode ) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a == document || a.ownerDocument == preferredDoc && + contains( preferredDoc, a ) ) { + return -1; + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b == document || b.ownerDocument == preferredDoc && + contains( preferredDoc, b ) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + return a == document ? -1 : + b == document ? 1 : + /* eslint-enable eqeqeq */ + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( ( cur = cur.parentNode ) ) { + ap.unshift( cur ); + } + cur = b; + while ( ( cur = cur.parentNode ) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[ i ] === bp[ i ] ) { + i++; + } + + return i ? + + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[ i ], bp[ i ] ) : + + // Otherwise nodes in our document sort first + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + ap[ i ] == preferredDoc ? -1 : + bp[ i ] == preferredDoc ? 1 : + /* eslint-enable eqeqeq */ + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + setDocument( elem ); + + if ( support.matchesSelector && documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch ( e ) { + nonnativeSelectorCache( expr, true ); + } + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { + + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || + match[ 5 ] || "" ).replace( runescape, funescape ); + + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + + // nth-* requires argument + if ( !match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + + // other types prohibit arguments + } else if ( match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[ 6 ] && match[ 2 ]; + + if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + + // Get excess from tokenize (recursively) + ( excess = tokenize( unquoted, true ) ) && + + // advance to the next closing parenthesis + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + + // excess is a negative index + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { + return true; + } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + ( pattern = new RegExp( "(^|" + whitespace + + ")" + className + "(" + whitespace + "|$)" ) ) && classCache( + className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + /* eslint-disable max-len */ + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + /* eslint-enable max-len */ + + }; + }, + + "CHILD": function( type, what, _argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, _context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( ( node = node[ dir ] ) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( ( node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + + // Use previously-cached element index if available + if ( useCache ) { + + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + + // Use the same loop as above to seek `elem` from the start + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || + ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + + // Potentially complex pseudos + "not": markFunction( function( selector ) { + + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction( function( seed, matches, _context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); + } + } + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; + matcher( input, null, xml, results ); + + // Don't keep the element (issue #299) + input[ 0 ] = null; + return !results.pop(); + }; + } ), + + "has": markFunction( function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + } ), + + "contains": markFunction( function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; + }; + } ), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + + // lang value must be a valid identifier + if ( !ridentifier.test( lang || "" ) ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( ( elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + return false; + }; + } ), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && + ( !document.hasFocus || document.hasFocus() ) && + !!( elem.type || elem.href || ~elem.tabIndex ); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return ( nodeName === "input" && !!elem.checked ) || + ( nodeName === "option" && !!elem.selected ); + }, + + "selected": function( elem ) { + + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos[ "empty" ]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo( function() { + return [ 0 ]; + } ), + + "last": createPositionalPseudo( function( _matchIndexes, length ) { + return [ length - 1 ]; + } ), + + "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + } ), + + "even": createPositionalPseudo( function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "odd": createPositionalPseudo( function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? + argument + length : + argument > length ? + length : + argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ) + } +}; + +Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( match ) { + + // Don't consume trailing commas as valid + soFar = soFar.slice( match[ 0 ].length ) || soFar; + } + groups.push( ( tokens = [] ) ); + } + + matched = false; + + // Combinators + if ( ( match = rcombinators.exec( soFar ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + + // Cast descendant combinators to space + type: match[ 0 ].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[ i ].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || + ( outerCache[ elem.uniqueID ] = {} ); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( ( oldCache = uniqueCache[ key ] ) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return ( newCache[ 2 ] = oldCache[ 2 ] ); + } else { + + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[ i ]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[ 0 ]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[ i ], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( ( elem = unmatched[ i ] ) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction( function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( + selector || "*", + context.nodeType ? [ context ] : context, + [] + ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) ) { + + // Restore matcherIn since elem is not yet a final match + temp.push( ( matcherIn[ i ] = elem ) ); + } + } + postFinder( null, ( matcherOut = [] ), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { + + seed[ temp ] = !( results[ temp ] = elem ); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + } ); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + ( checkContext = context ).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[ j ].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens + .slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), + + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + len = elems.length; + + if ( outermost ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + + // They will have gone through all possible matchers + if ( ( elem = !matcher && elem ) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( ( matcher = setMatchers[ j++ ] ) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[ i ] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( + selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) + ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + + context = ( Expr.find[ "ID" ]( token.matches[ 0 ] + .replace( runescape, funescape ), context ) || [] )[ 0 ]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[ i ]; + + // Abort if we hit a combinator + if ( Expr.relative[ ( type = token.type ) ] ) { + break; + } + if ( ( find = Expr.find[ type ] ) ) { + + // Search, expanding context for leading sibling combinators + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || + context + ) ) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert( function( el ) { + + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert( function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute( "href" ) === "#"; +} ) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + } ); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert( function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +} ) ) { + addHandle( "value", function( elem, _name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + } ); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert( function( el ) { + return el.getAttribute( "disabled" ) == null; +} ) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; + } + } ); +} + +return Sizzle; + +} )( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +}; +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, _i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, _i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, _i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( _i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the master Deferred + master = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + master.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( master.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return master.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); + } + + return master.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, _key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // Support: IE <=9 only + // IE <=9 replaces "; + support.option = !!div.lastChild; +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] +}; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + attached = isAttached( elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 - 11+ +// focus() and blur() are asynchronous, except when they are no-op. +// So expect focus to be synchronous when the element is already active, +// and blur to be synchronous when the element is not already active. +// (focus and blur are always synchronous in other supported browsers, +// this just defines when we can count on it). +function expectSync( elem, type ) { + return ( elem === safeActiveElement() ) === ( type === "focus" ); +} + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = Object.create( null ); + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", returnTrue ); + } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; + }, + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function( event ) { + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, expectSync ) { + + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if ( !expectSync ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var notAsync, result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if ( !saved.length ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync( this, type ); + this[ type ](); + result = dataPriv.get( this, type ); + if ( saved !== result || notAsync ) { + dataPriv.set( this, type, false ); + } else { + result = {}; + } + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + return result.value; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved.length ) { + + // ...and capture the result + dataPriv.set( this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), + saved.slice( 1 ), + this + ) + } ); + + // Abort handling of the native event + event.stopImmediatePropagation(); + } + } + } ); +} + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + + which: function( event ) { + var button = event.button; + + // Add which for key events + if ( event.which == null && rkeyEvent.test( event.type ) ) { + return event.charCode != null ? event.charCode : event.keyCode; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) { + if ( button & 1 ) { + return 1; + } + + if ( button & 2 ) { + return 3; + } + + if ( button & 4 ) { + return 2; + } + + return 0; + } + + return event.which; + } +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, expectSync ); + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + delegateType: delegateType + }; +} ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.get( src ); + events = pdataOld.events; + + if ( events ) { + dataPriv.remove( dest, "handle events" ); + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = flat( args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + }, doc ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html; + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = isAttached( elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableTrDimensionsVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px"; + tr.style.height = "1px"; + trChild.style.height = "9px"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !isAttached( elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; + +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + +function setPositiveNumber( _elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; + + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta; +} + +function getWidthOrHeight( elem, dimension, extra ) { + + // Start with computed style + var styles = getStyles( elem ), + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, + + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ( ( !support.boxSizingReliable() && isBorderBox || + + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + val === "auto" || + + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + + // Make sure the element is visible & connected + elem.getClientRects().length ) { + + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "gridArea": true, + "gridColumn": true, + "gridColumnEnd": true, + "gridColumnStart": true, + "gridRow": true, + "gridRowEnd": true, + "gridRowStart": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( _i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( isValidValue ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = classesToArray( value ); + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +support.focusin = "onfocusin" in window; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( + dataPriv.get( cur, "events" ) || Object.create( null ) + )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = { guid: Date.now() }; + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) { + xml = undefined; + } + + if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + if ( a == null ) { + return ""; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ) + .filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ) + .map( function( _i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); + } + } + match = responseHeaders[ key.toLowerCase() + " " ]; + } + return match == null ? null : match.join( ", " ); + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Use a noop converter for missing script + if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { + s.converters[ "text script" ] = function() {}; + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( _i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; + } + } +} ); + + +jQuery._evalUrl = function( url, options, doc ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options, doc ); + } + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( "\r\n"; + +// inject VBScript +document.write(IEBinaryToArray_ByteStr_Script); + +global.JSZipUtils._getBinaryFromXHR = function (xhr) { + var binary = xhr.responseBody; + var byteMapping = {}; + for ( var i = 0; i < 256; i++ ) { + for ( var j = 0; j < 256; j++ ) { + byteMapping[ String.fromCharCode( i + (j << 8) ) ] = + String.fromCharCode(i) + String.fromCharCode(j); + } + } + var rawBytes = IEBinaryToArray_ByteStr(binary); + var lastChr = IEBinaryToArray_ByteStr_Last(binary); + return rawBytes.replace(/[\s\S]/g, function( match ) { + return byteMapping[match]; + }) + lastChr; +}; + +// enforcing Stuk's coding style +// vim: set shiftwidth=4 softtabstop=4: + +},{}]},{},[1]) +; diff --git a/jquery/jszip-utils/dist/jszip-utils-ie.min.js b/jquery/jszip-utils/dist/jszip-utils-ie.min.js new file mode 100644 index 00000000..93d8bc8e --- /dev/null +++ b/jquery/jszip-utils/dist/jszip-utils-ie.min.js @@ -0,0 +1,10 @@ +/*! + +JSZipUtils - A collection of cross-browser utilities to go along with JSZip. + + +(c) 2014 Stuart Knightley, David Duponchel +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. + +*/ +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g\r\n";document.write(b),a.JSZipUtils._getBinaryFromXHR=function(a){for(var b=a.responseBody,c={},d=0;256>d;d++)for(var e=0;256>e;e++)c[String.fromCharCode(d+(e<<8))]=String.fromCharCode(d)+String.fromCharCode(e);var f=IEBinaryToArray_ByteStr(b),g=IEBinaryToArray_ByteStr_Last(b);return f.replace(/[\s\S]/g,function(a){return c[a]})+g}},{}]},{},[1]); diff --git a/jquery/jszip-utils/dist/jszip-utils.js b/jquery/jszip-utils/dist/jszip-utils.js new file mode 100644 index 00000000..775895ec --- /dev/null +++ b/jquery/jszip-utils/dist/jszip-utils.js @@ -0,0 +1,118 @@ +/*! + +JSZipUtils - A collection of cross-browser utilities to go along with JSZip. + + +(c) 2014 Stuart Knightley, David Duponchel +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. + +*/ +!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.JSZipUtils=e():"undefined"!=typeof global?global.JSZipUtils=e():"undefined"!=typeof self&&(self.JSZipUtils=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o + +(c) 2014 Stuart Knightley, David Duponchel +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown. + +*/ +!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZipUtils=a():"undefined"!=typeof global?global.JSZipUtils=a():"undefined"!=typeof self&&(self.JSZipUtils=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g + +(c) 2009-2016 Stuart Knightley +Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown. + +JSZip uses the library pako released under the MIT license : +https://github.com/nodeca/pako/blob/master/LICENSE +*/ + +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSZip = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o> 2; + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); + enc3 = remainingBytes > 1 ? (((chr2 & 15) << 2) | (chr3 >> 6)) : 64; + enc4 = remainingBytes > 2 ? (chr3 & 63) : 64; + + output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4)); + + } + + return output.join(""); +}; + +// public method for decoding +exports.decode = function(input) { + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0, resultIndex = 0; + + var dataUrlPrefix = "data:"; + + if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) { + // This is a common error: people give a data url + // (data:image/png;base64,iVBOR...) with a {base64: true} and + // wonders why things don't work. + // We can detect that the string input looks like a data url but we + // *can't* be sure it is one: removing everything up to the comma would + // be too dangerous. + throw new Error("Invalid base64 input, it looks like a data url."); + } + + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); + + var totalLength = input.length * 3 / 4; + if(input.charAt(input.length - 1) === _keyStr.charAt(64)) { + totalLength--; + } + if(input.charAt(input.length - 2) === _keyStr.charAt(64)) { + totalLength--; + } + if (totalLength % 1 !== 0) { + // totalLength is not an integer, the length does not match a valid + // base64 content. That can happen if: + // - the input is not a base64 content + // - the input is *almost* a base64 content, with a extra chars at the + // beginning or at the end + // - the input uses a base64 variant (base64url for example) + throw new Error("Invalid base64 input, bad content length."); + } + var output; + if (support.uint8array) { + output = new Uint8Array(totalLength|0); + } else { + output = new Array(totalLength|0); + } + + while (i < input.length) { + + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + + chr1 = (enc1 << 2) | (enc2 >> 4); + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); + chr3 = ((enc3 & 3) << 6) | enc4; + + output[resultIndex++] = chr1; + + if (enc3 !== 64) { + output[resultIndex++] = chr2; + } + if (enc4 !== 64) { + output[resultIndex++] = chr3; + } + + } + + return output; +}; + +},{"./support":30,"./utils":32}],2:[function(require,module,exports){ +'use strict'; + +var external = require("./external"); +var DataWorker = require('./stream/DataWorker'); +var Crc32Probe = require('./stream/Crc32Probe'); +var DataLengthProbe = require('./stream/DataLengthProbe'); + +/** + * Represent a compressed object, with everything needed to decompress it. + * @constructor + * @param {number} compressedSize the size of the data compressed. + * @param {number} uncompressedSize the size of the data after decompression. + * @param {number} crc32 the crc32 of the decompressed file. + * @param {object} compression the type of compression, see lib/compressions.js. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the compressed data. + */ +function CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) { + this.compressedSize = compressedSize; + this.uncompressedSize = uncompressedSize; + this.crc32 = crc32; + this.compression = compression; + this.compressedContent = data; +} + +CompressedObject.prototype = { + /** + * Create a worker to get the uncompressed content. + * @return {GenericWorker} the worker. + */ + getContentWorker: function () { + var worker = new DataWorker(external.Promise.resolve(this.compressedContent)) + .pipe(this.compression.uncompressWorker()) + .pipe(new DataLengthProbe("data_length")); + + var that = this; + worker.on("end", function () { + if (this.streamInfo['data_length'] !== that.uncompressedSize) { + throw new Error("Bug : uncompressed data size mismatch"); + } + }); + return worker; + }, + /** + * Create a worker to get the compressed content. + * @return {GenericWorker} the worker. + */ + getCompressedWorker: function () { + return new DataWorker(external.Promise.resolve(this.compressedContent)) + .withStreamInfo("compressedSize", this.compressedSize) + .withStreamInfo("uncompressedSize", this.uncompressedSize) + .withStreamInfo("crc32", this.crc32) + .withStreamInfo("compression", this.compression) + ; + } +}; + +/** + * Chain the given worker with other workers to compress the content with the + * given compression. + * @param {GenericWorker} uncompressedWorker the worker to pipe. + * @param {Object} compression the compression object. + * @param {Object} compressionOptions the options to use when compressing. + * @return {GenericWorker} the new worker compressing the content. + */ +CompressedObject.createWorkerFrom = function (uncompressedWorker, compression, compressionOptions) { + return uncompressedWorker + .pipe(new Crc32Probe()) + .pipe(new DataLengthProbe("uncompressedSize")) + .pipe(compression.compressWorker(compressionOptions)) + .pipe(new DataLengthProbe("compressedSize")) + .withStreamInfo("compression", compression); +}; + +module.exports = CompressedObject; + +},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(require,module,exports){ +'use strict'; + +var GenericWorker = require("./stream/GenericWorker"); + +exports.STORE = { + magic: "\x00\x00", + compressWorker : function (compressionOptions) { + return new GenericWorker("STORE compression"); + }, + uncompressWorker : function () { + return new GenericWorker("STORE decompression"); + } +}; +exports.DEFLATE = require('./flate'); + +},{"./flate":7,"./stream/GenericWorker":28}],4:[function(require,module,exports){ +'use strict'; + +var utils = require('./utils'); + +/** + * The following functions come from pako, from pako/lib/zlib/crc32.js + * released under the MIT license, see pako https://github.com/nodeca/pako/ + */ + +// Use ordinary array, since untyped makes no boost here +function makeTable() { + var c, table = []; + + for(var n =0; n < 256; n++){ + c = n; + for(var k =0; k < 8; k++){ + c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + table[n] = c; + } + + return table; +} + +// Create table on load. Just 255 signed longs. Not a problem. +var crcTable = makeTable(); + + +function crc32(crc, buf, len, pos) { + var t = crcTable, end = pos + len; + + crc = crc ^ (-1); + + for (var i = pos; i < end; i++ ) { + crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + +// That's all for the pako functions. + +/** + * Compute the crc32 of a string. + * This is almost the same as the function crc32, but for strings. Using the + * same function for the two use cases leads to horrible performances. + * @param {Number} crc the starting value of the crc. + * @param {String} str the string to use. + * @param {Number} len the length of the string. + * @param {Number} pos the starting position for the crc32 computation. + * @return {Number} the computed crc32. + */ +function crc32str(crc, str, len, pos) { + var t = crcTable, end = pos + len; + + crc = crc ^ (-1); + + for (var i = pos; i < end; i++ ) { + crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + +module.exports = function crc32wrapper(input, crc) { + if (typeof input === "undefined" || !input.length) { + return 0; + } + + var isArray = utils.getTypeOf(input) !== "string"; + + if(isArray) { + return crc32(crc|0, input, input.length, 0); + } else { + return crc32str(crc|0, input, input.length, 0); + } +}; + +},{"./utils":32}],5:[function(require,module,exports){ +'use strict'; +exports.base64 = false; +exports.binary = false; +exports.dir = false; +exports.createFolders = true; +exports.date = null; +exports.compression = null; +exports.compressionOptions = null; +exports.comment = null; +exports.unixPermissions = null; +exports.dosPermissions = null; + +},{}],6:[function(require,module,exports){ +/* global Promise */ +'use strict'; + +// load the global object first: +// - it should be better integrated in the system (unhandledRejection in node) +// - the environment may have a custom Promise implementation (see zone.js) +var ES6Promise = null; +if (typeof Promise !== "undefined") { + ES6Promise = Promise; +} else { + ES6Promise = require("lie"); +} + +/** + * Let the user use/change some implementations. + */ +module.exports = { + Promise: ES6Promise +}; + +},{"lie":37}],7:[function(require,module,exports){ +'use strict'; +var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined'); + +var pako = require("pako"); +var utils = require("./utils"); +var GenericWorker = require("./stream/GenericWorker"); + +var ARRAY_TYPE = USE_TYPEDARRAY ? "uint8array" : "array"; + +exports.magic = "\x08\x00"; + +/** + * Create a worker that uses pako to inflate/deflate. + * @constructor + * @param {String} action the name of the pako function to call : either "Deflate" or "Inflate". + * @param {Object} options the options to use when (de)compressing. + */ +function FlateWorker(action, options) { + GenericWorker.call(this, "FlateWorker/" + action); + + this._pako = null; + this._pakoAction = action; + this._pakoOptions = options; + // the `meta` object from the last chunk received + // this allow this worker to pass around metadata + this.meta = {}; +} + +utils.inherits(FlateWorker, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +FlateWorker.prototype.processChunk = function (chunk) { + this.meta = chunk.meta; + if (this._pako === null) { + this._createPako(); + } + this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false); +}; + +/** + * @see GenericWorker.flush + */ +FlateWorker.prototype.flush = function () { + GenericWorker.prototype.flush.call(this); + if (this._pako === null) { + this._createPako(); + } + this._pako.push([], true); +}; +/** + * @see GenericWorker.cleanUp + */ +FlateWorker.prototype.cleanUp = function () { + GenericWorker.prototype.cleanUp.call(this); + this._pako = null; +}; + +/** + * Create the _pako object. + * TODO: lazy-loading this object isn't the best solution but it's the + * quickest. The best solution is to lazy-load the worker list. See also the + * issue #446. + */ +FlateWorker.prototype._createPako = function () { + this._pako = new pako[this._pakoAction]({ + raw: true, + level: this._pakoOptions.level || -1 // default compression + }); + var self = this; + this._pako.onData = function(data) { + self.push({ + data : data, + meta : self.meta + }); + }; +}; + +exports.compressWorker = function (compressionOptions) { + return new FlateWorker("Deflate", compressionOptions); +}; +exports.uncompressWorker = function () { + return new FlateWorker("Inflate", {}); +}; + +},{"./stream/GenericWorker":28,"./utils":32,"pako":38}],8:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var GenericWorker = require('../stream/GenericWorker'); +var utf8 = require('../utf8'); +var crc32 = require('../crc32'); +var signature = require('../signature'); + +/** + * Transform an integer into a string in hexadecimal. + * @private + * @param {number} dec the number to convert. + * @param {number} bytes the number of bytes to generate. + * @returns {string} the result. + */ +var decToHex = function(dec, bytes) { + var hex = "", i; + for (i = 0; i < bytes; i++) { + hex += String.fromCharCode(dec & 0xff); + dec = dec >>> 8; + } + return hex; +}; + +/** + * Generate the UNIX part of the external file attributes. + * @param {Object} unixPermissions the unix permissions or null. + * @param {Boolean} isDir true if the entry is a directory, false otherwise. + * @return {Number} a 32 bit integer. + * + * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute : + * + * TTTTsstrwxrwxrwx0000000000ADVSHR + * ^^^^____________________________ file type, see zipinfo.c (UNX_*) + * ^^^_________________________ setuid, setgid, sticky + * ^^^^^^^^^________________ permissions + * ^^^^^^^^^^______ not used ? + * ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only + */ +var generateUnixExternalFileAttr = function (unixPermissions, isDir) { + + var result = unixPermissions; + if (!unixPermissions) { + // I can't use octal values in strict mode, hence the hexa. + // 040775 => 0x41fd + // 0100664 => 0x81b4 + result = isDir ? 0x41fd : 0x81b4; + } + return (result & 0xFFFF) << 16; +}; + +/** + * Generate the DOS part of the external file attributes. + * @param {Object} dosPermissions the dos permissions or null. + * @param {Boolean} isDir true if the entry is a directory, false otherwise. + * @return {Number} a 32 bit integer. + * + * Bit 0 Read-Only + * Bit 1 Hidden + * Bit 2 System + * Bit 3 Volume Label + * Bit 4 Directory + * Bit 5 Archive + */ +var generateDosExternalFileAttr = function (dosPermissions, isDir) { + + // the dir flag is already set for compatibility + return (dosPermissions || 0) & 0x3F; +}; + +/** + * Generate the various parts used in the construction of the final zip file. + * @param {Object} streamInfo the hash with information about the compressed file. + * @param {Boolean} streamedContent is the content streamed ? + * @param {Boolean} streamingEnded is the stream finished ? + * @param {number} offset the current offset from the start of the zip file. + * @param {String} platform let's pretend we are this platform (change platform dependents fields) + * @param {Function} encodeFileName the function to encode the file name / comment. + * @return {Object} the zip parts. + */ +var generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) { + var file = streamInfo['file'], + compression = streamInfo['compression'], + useCustomEncoding = encodeFileName !== utf8.utf8encode, + encodedFileName = utils.transformTo("string", encodeFileName(file.name)), + utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)), + comment = file.comment, + encodedComment = utils.transformTo("string", encodeFileName(comment)), + utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)), + useUTF8ForFileName = utfEncodedFileName.length !== file.name.length, + useUTF8ForComment = utfEncodedComment.length !== comment.length, + dosTime, + dosDate, + extraFields = "", + unicodePathExtraField = "", + unicodeCommentExtraField = "", + dir = file.dir, + date = file.date; + + + var dataInfo = { + crc32 : 0, + compressedSize : 0, + uncompressedSize : 0 + }; + + // if the content is streamed, the sizes/crc32 are only available AFTER + // the end of the stream. + if (!streamedContent || streamingEnded) { + dataInfo.crc32 = streamInfo['crc32']; + dataInfo.compressedSize = streamInfo['compressedSize']; + dataInfo.uncompressedSize = streamInfo['uncompressedSize']; + } + + var bitflag = 0; + if (streamedContent) { + // Bit 3: the sizes/crc32 are set to zero in the local header. + // The correct values are put in the data descriptor immediately + // following the compressed data. + bitflag |= 0x0008; + } + if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) { + // Bit 11: Language encoding flag (EFS). + bitflag |= 0x0800; + } + + + var extFileAttr = 0; + var versionMadeBy = 0; + if (dir) { + // dos or unix, we set the dos dir flag + extFileAttr |= 0x00010; + } + if(platform === "UNIX") { + versionMadeBy = 0x031E; // UNIX, version 3.0 + extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir); + } else { // DOS or other, fallback to DOS + versionMadeBy = 0x0014; // DOS, version 2.0 + extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir); + } + + // date + // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html + // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html + // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html + + dosTime = date.getUTCHours(); + dosTime = dosTime << 6; + dosTime = dosTime | date.getUTCMinutes(); + dosTime = dosTime << 5; + dosTime = dosTime | date.getUTCSeconds() / 2; + + dosDate = date.getUTCFullYear() - 1980; + dosDate = dosDate << 4; + dosDate = dosDate | (date.getUTCMonth() + 1); + dosDate = dosDate << 5; + dosDate = dosDate | date.getUTCDate(); + + if (useUTF8ForFileName) { + // set the unicode path extra field. unzip needs at least one extra + // field to correctly handle unicode path, so using the path is as good + // as any other information. This could improve the situation with + // other archive managers too. + // This field is usually used without the utf8 flag, with a non + // unicode path in the header (winrar, winzip). This helps (a bit) + // with the messy Windows' default compressed folders feature but + // breaks on p7zip which doesn't seek the unicode path extra field. + // So for now, UTF-8 everywhere ! + unicodePathExtraField = + // Version + decToHex(1, 1) + + // NameCRC32 + decToHex(crc32(encodedFileName), 4) + + // UnicodeName + utfEncodedFileName; + + extraFields += + // Info-ZIP Unicode Path Extra Field + "\x75\x70" + + // size + decToHex(unicodePathExtraField.length, 2) + + // content + unicodePathExtraField; + } + + if(useUTF8ForComment) { + + unicodeCommentExtraField = + // Version + decToHex(1, 1) + + // CommentCRC32 + decToHex(crc32(encodedComment), 4) + + // UnicodeName + utfEncodedComment; + + extraFields += + // Info-ZIP Unicode Path Extra Field + "\x75\x63" + + // size + decToHex(unicodeCommentExtraField.length, 2) + + // content + unicodeCommentExtraField; + } + + var header = ""; + + // version needed to extract + header += "\x0A\x00"; + // general purpose bit flag + header += decToHex(bitflag, 2); + // compression method + header += compression.magic; + // last mod file time + header += decToHex(dosTime, 2); + // last mod file date + header += decToHex(dosDate, 2); + // crc-32 + header += decToHex(dataInfo.crc32, 4); + // compressed size + header += decToHex(dataInfo.compressedSize, 4); + // uncompressed size + header += decToHex(dataInfo.uncompressedSize, 4); + // file name length + header += decToHex(encodedFileName.length, 2); + // extra field length + header += decToHex(extraFields.length, 2); + + + var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields; + + var dirRecord = signature.CENTRAL_FILE_HEADER + + // version made by (00: DOS) + decToHex(versionMadeBy, 2) + + // file header (common to file and central directory) + header + + // file comment length + decToHex(encodedComment.length, 2) + + // disk number start + "\x00\x00" + + // internal file attributes TODO + "\x00\x00" + + // external file attributes + decToHex(extFileAttr, 4) + + // relative offset of local header + decToHex(offset, 4) + + // file name + encodedFileName + + // extra field + extraFields + + // file comment + encodedComment; + + return { + fileRecord: fileRecord, + dirRecord: dirRecord + }; +}; + +/** + * Generate the EOCD record. + * @param {Number} entriesCount the number of entries in the zip file. + * @param {Number} centralDirLength the length (in bytes) of the central dir. + * @param {Number} localDirLength the length (in bytes) of the local dir. + * @param {String} comment the zip file comment as a binary string. + * @param {Function} encodeFileName the function to encode the comment. + * @return {String} the EOCD record. + */ +var generateCentralDirectoryEnd = function (entriesCount, centralDirLength, localDirLength, comment, encodeFileName) { + var dirEnd = ""; + var encodedComment = utils.transformTo("string", encodeFileName(comment)); + + // end of central dir signature + dirEnd = signature.CENTRAL_DIRECTORY_END + + // number of this disk + "\x00\x00" + + // number of the disk with the start of the central directory + "\x00\x00" + + // total number of entries in the central directory on this disk + decToHex(entriesCount, 2) + + // total number of entries in the central directory + decToHex(entriesCount, 2) + + // size of the central directory 4 bytes + decToHex(centralDirLength, 4) + + // offset of start of central directory with respect to the starting disk number + decToHex(localDirLength, 4) + + // .ZIP file comment length + decToHex(encodedComment.length, 2) + + // .ZIP file comment + encodedComment; + + return dirEnd; +}; + +/** + * Generate data descriptors for a file entry. + * @param {Object} streamInfo the hash generated by a worker, containing information + * on the file entry. + * @return {String} the data descriptors. + */ +var generateDataDescriptors = function (streamInfo) { + var descriptor = ""; + descriptor = signature.DATA_DESCRIPTOR + + // crc-32 4 bytes + decToHex(streamInfo['crc32'], 4) + + // compressed size 4 bytes + decToHex(streamInfo['compressedSize'], 4) + + // uncompressed size 4 bytes + decToHex(streamInfo['uncompressedSize'], 4); + + return descriptor; +}; + + +/** + * A worker to concatenate other workers to create a zip file. + * @param {Boolean} streamFiles `true` to stream the content of the files, + * `false` to accumulate it. + * @param {String} comment the comment to use. + * @param {String} platform the platform to use, "UNIX" or "DOS". + * @param {Function} encodeFileName the function to encode file names and comments. + */ +function ZipFileWorker(streamFiles, comment, platform, encodeFileName) { + GenericWorker.call(this, "ZipFileWorker"); + // The number of bytes written so far. This doesn't count accumulated chunks. + this.bytesWritten = 0; + // The comment of the zip file + this.zipComment = comment; + // The platform "generating" the zip file. + this.zipPlatform = platform; + // the function to encode file names and comments. + this.encodeFileName = encodeFileName; + // Should we stream the content of the files ? + this.streamFiles = streamFiles; + // If `streamFiles` is false, we will need to accumulate the content of the + // files to calculate sizes / crc32 (and write them *before* the content). + // This boolean indicates if we are accumulating chunks (it will change a lot + // during the lifetime of this worker). + this.accumulate = false; + // The buffer receiving chunks when accumulating content. + this.contentBuffer = []; + // The list of generated directory records. + this.dirRecords = []; + // The offset (in bytes) from the beginning of the zip file for the current source. + this.currentSourceOffset = 0; + // The total number of entries in this zip file. + this.entriesCount = 0; + // the name of the file currently being added, null when handling the end of the zip file. + // Used for the emitted metadata. + this.currentFile = null; + + + + this._sources = []; +} +utils.inherits(ZipFileWorker, GenericWorker); + +/** + * @see GenericWorker.push + */ +ZipFileWorker.prototype.push = function (chunk) { + + var currentFilePercent = chunk.meta.percent || 0; + var entriesCount = this.entriesCount; + var remainingFiles = this._sources.length; + + if(this.accumulate) { + this.contentBuffer.push(chunk); + } else { + this.bytesWritten += chunk.data.length; + + GenericWorker.prototype.push.call(this, { + data : chunk.data, + meta : { + currentFile : this.currentFile, + percent : entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100 + } + }); + } +}; + +/** + * The worker started a new source (an other worker). + * @param {Object} streamInfo the streamInfo object from the new source. + */ +ZipFileWorker.prototype.openedSource = function (streamInfo) { + this.currentSourceOffset = this.bytesWritten; + this.currentFile = streamInfo['file'].name; + + var streamedContent = this.streamFiles && !streamInfo['file'].dir; + + // don't stream folders (because they don't have any content) + if(streamedContent) { + var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); + this.push({ + data : record.fileRecord, + meta : {percent:0} + }); + } else { + // we need to wait for the whole file before pushing anything + this.accumulate = true; + } +}; + +/** + * The worker finished a source (an other worker). + * @param {Object} streamInfo the streamInfo object from the finished source. + */ +ZipFileWorker.prototype.closedSource = function (streamInfo) { + this.accumulate = false; + var streamedContent = this.streamFiles && !streamInfo['file'].dir; + var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); + + this.dirRecords.push(record.dirRecord); + if(streamedContent) { + // after the streamed file, we put data descriptors + this.push({ + data : generateDataDescriptors(streamInfo), + meta : {percent:100} + }); + } else { + // the content wasn't streamed, we need to push everything now + // first the file record, then the content + this.push({ + data : record.fileRecord, + meta : {percent:0} + }); + while(this.contentBuffer.length) { + this.push(this.contentBuffer.shift()); + } + } + this.currentFile = null; +}; + +/** + * @see GenericWorker.flush + */ +ZipFileWorker.prototype.flush = function () { + + var localDirLength = this.bytesWritten; + for(var i = 0; i < this.dirRecords.length; i++) { + this.push({ + data : this.dirRecords[i], + meta : {percent:100} + }); + } + var centralDirLength = this.bytesWritten - localDirLength; + + var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName); + + this.push({ + data : dirEnd, + meta : {percent:100} + }); +}; + +/** + * Prepare the next source to be read. + */ +ZipFileWorker.prototype.prepareNextSource = function () { + this.previous = this._sources.shift(); + this.openedSource(this.previous.streamInfo); + if (this.isPaused) { + this.previous.pause(); + } else { + this.previous.resume(); + } +}; + +/** + * @see GenericWorker.registerPrevious + */ +ZipFileWorker.prototype.registerPrevious = function (previous) { + this._sources.push(previous); + var self = this; + + previous.on('data', function (chunk) { + self.processChunk(chunk); + }); + previous.on('end', function () { + self.closedSource(self.previous.streamInfo); + if(self._sources.length) { + self.prepareNextSource(); + } else { + self.end(); + } + }); + previous.on('error', function (e) { + self.error(e); + }); + return this; +}; + +/** + * @see GenericWorker.resume + */ +ZipFileWorker.prototype.resume = function () { + if(!GenericWorker.prototype.resume.call(this)) { + return false; + } + + if (!this.previous && this._sources.length) { + this.prepareNextSource(); + return true; + } + if (!this.previous && !this._sources.length && !this.generatedError) { + this.end(); + return true; + } +}; + +/** + * @see GenericWorker.error + */ +ZipFileWorker.prototype.error = function (e) { + var sources = this._sources; + if(!GenericWorker.prototype.error.call(this, e)) { + return false; + } + for(var i = 0; i < sources.length; i++) { + try { + sources[i].error(e); + } catch(e) { + // the `error` exploded, nothing to do + } + } + return true; +}; + +/** + * @see GenericWorker.lock + */ +ZipFileWorker.prototype.lock = function () { + GenericWorker.prototype.lock.call(this); + var sources = this._sources; + for(var i = 0; i < sources.length; i++) { + sources[i].lock(); + } +}; + +module.exports = ZipFileWorker; + +},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(require,module,exports){ +'use strict'; + +var compressions = require('../compressions'); +var ZipFileWorker = require('./ZipFileWorker'); + +/** + * Find the compression to use. + * @param {String} fileCompression the compression defined at the file level, if any. + * @param {String} zipCompression the compression defined at the load() level. + * @return {Object} the compression object to use. + */ +var getCompression = function (fileCompression, zipCompression) { + + var compressionName = fileCompression || zipCompression; + var compression = compressions[compressionName]; + if (!compression) { + throw new Error(compressionName + " is not a valid compression method !"); + } + return compression; +}; + +/** + * Create a worker to generate a zip file. + * @param {JSZip} zip the JSZip instance at the right root level. + * @param {Object} options to generate the zip file. + * @param {String} comment the comment to use. + */ +exports.generateWorker = function (zip, options, comment) { + + var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName); + var entriesCount = 0; + try { + + zip.forEach(function (relativePath, file) { + entriesCount++; + var compression = getCompression(file.options.compression, options.compression); + var compressionOptions = file.options.compressionOptions || options.compressionOptions || {}; + var dir = file.dir, date = file.date; + + file._compressWorker(compression, compressionOptions) + .withStreamInfo("file", { + name : relativePath, + dir : dir, + date : date, + comment : file.comment || "", + unixPermissions : file.unixPermissions, + dosPermissions : file.dosPermissions + }) + .pipe(zipFileWorker); + }); + zipFileWorker.entriesCount = entriesCount; + } catch (e) { + zipFileWorker.error(e); + } + + return zipFileWorker; +}; + +},{"../compressions":3,"./ZipFileWorker":8}],10:[function(require,module,exports){ +'use strict'; + +/** + * Representation a of zip file in js + * @constructor + */ +function JSZip() { + // if this constructor isΒ used withoutΒ `new`, itΒ adds `new` beforeΒ itself: + if(!(this instanceof JSZip)) { + return new JSZip(); + } + + if(arguments.length) { + throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide."); + } + + // object containing the files : + // { + // "folder/" : {...}, + // "folder/data.txt" : {...} + // } + // NOTE: we use a null prototype because we do not + // want filenames like "toString" coming from a zip file + // to overwrite methods and attributes in a normal Object. + this.files = Object.create(null); + + this.comment = null; + + // Where we are in the hierarchy + this.root = ""; + this.clone = function() { + var newObj = new JSZip(); + for (var i in this) { + if (typeof this[i] !== "function") { + newObj[i] = this[i]; + } + } + return newObj; + }; +} +JSZip.prototype = require('./object'); +JSZip.prototype.loadAsync = require('./load'); +JSZip.support = require('./support'); +JSZip.defaults = require('./defaults'); + +// TODO find a better way to handle this version, +// a require('package.json').version doesn't work with webpack, see #327 +JSZip.version = "3.7.1"; + +JSZip.loadAsync = function (content, options) { + return new JSZip().loadAsync(content, options); +}; + +JSZip.external = require("./external"); +module.exports = JSZip; + +},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(require,module,exports){ +'use strict'; +var utils = require('./utils'); +var external = require("./external"); +var utf8 = require('./utf8'); +var ZipEntries = require('./zipEntries'); +var Crc32Probe = require('./stream/Crc32Probe'); +var nodejsUtils = require("./nodejsUtils"); + +/** + * Check the CRC32 of an entry. + * @param {ZipEntry} zipEntry the zip entry to check. + * @return {Promise} the result. + */ +function checkEntryCRC32(zipEntry) { + return new external.Promise(function (resolve, reject) { + var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe()); + worker.on("error", function (e) { + reject(e); + }) + .on("end", function () { + if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) { + reject(new Error("Corrupted zip : CRC32 mismatch")); + } else { + resolve(); + } + }) + .resume(); + }); +} + +module.exports = function (data, options) { + var zip = this; + options = utils.extend(options || {}, { + base64: false, + checkCRC32: false, + optimizedBinaryString: false, + createFolders: false, + decodeFileName: utf8.utf8decode + }); + + if (nodejsUtils.isNode && nodejsUtils.isStream(data)) { + return external.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")); + } + + return utils.prepareContent("the loaded zip file", data, true, options.optimizedBinaryString, options.base64) + .then(function (data) { + var zipEntries = new ZipEntries(options); + zipEntries.load(data); + return zipEntries; + }).then(function checkCRC32(zipEntries) { + var promises = [external.Promise.resolve(zipEntries)]; + var files = zipEntries.files; + if (options.checkCRC32) { + for (var i = 0; i < files.length; i++) { + promises.push(checkEntryCRC32(files[i])); + } + } + return external.Promise.all(promises); + }).then(function addFiles(results) { + var zipEntries = results.shift(); + var files = zipEntries.files; + for (var i = 0; i < files.length; i++) { + var input = files[i]; + zip.file(input.fileNameStr, input.decompressed, { + binary: true, + optimizedBinaryString: true, + date: input.date, + dir: input.dir, + comment: input.fileCommentStr.length ? input.fileCommentStr : null, + unixPermissions: input.unixPermissions, + dosPermissions: input.dosPermissions, + createFolders: options.createFolders + }); + } + if (zipEntries.zipComment.length) { + zip.comment = zipEntries.zipComment; + } + + return zip; + }); +}; + +},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(require,module,exports){ +"use strict"; + +var utils = require('../utils'); +var GenericWorker = require('../stream/GenericWorker'); + +/** + * A worker that use a nodejs stream as source. + * @constructor + * @param {String} filename the name of the file entry for this stream. + * @param {Readable} stream the nodejs stream. + */ +function NodejsStreamInputAdapter(filename, stream) { + GenericWorker.call(this, "Nodejs stream input adapter for " + filename); + this._upstreamEnded = false; + this._bindStream(stream); +} + +utils.inherits(NodejsStreamInputAdapter, GenericWorker); + +/** + * Prepare the stream and bind the callbacks on it. + * Do this ASAP on node 0.10 ! A lazy binding doesn't always work. + * @param {Stream} stream the nodejs stream to use. + */ +NodejsStreamInputAdapter.prototype._bindStream = function (stream) { + var self = this; + this._stream = stream; + stream.pause(); + stream + .on("data", function (chunk) { + self.push({ + data: chunk, + meta : { + percent : 0 + } + }); + }) + .on("error", function (e) { + if(self.isPaused) { + this.generatedError = e; + } else { + self.error(e); + } + }) + .on("end", function () { + if(self.isPaused) { + self._upstreamEnded = true; + } else { + self.end(); + } + }); +}; +NodejsStreamInputAdapter.prototype.pause = function () { + if(!GenericWorker.prototype.pause.call(this)) { + return false; + } + this._stream.pause(); + return true; +}; +NodejsStreamInputAdapter.prototype.resume = function () { + if(!GenericWorker.prototype.resume.call(this)) { + return false; + } + + if(this._upstreamEnded) { + this.end(); + } else { + this._stream.resume(); + } + + return true; +}; + +module.exports = NodejsStreamInputAdapter; + +},{"../stream/GenericWorker":28,"../utils":32}],13:[function(require,module,exports){ +'use strict'; + +var Readable = require('readable-stream').Readable; + +var utils = require('../utils'); +utils.inherits(NodejsStreamOutputAdapter, Readable); + +/** +* A nodejs stream using a worker as source. +* @see the SourceWrapper in http://nodejs.org/api/stream.html +* @constructor +* @param {StreamHelper} helper the helper wrapping the worker +* @param {Object} options the nodejs stream options +* @param {Function} updateCb the update callback. +*/ +function NodejsStreamOutputAdapter(helper, options, updateCb) { + Readable.call(this, options); + this._helper = helper; + + var self = this; + helper.on("data", function (data, meta) { + if (!self.push(data)) { + self._helper.pause(); + } + if(updateCb) { + updateCb(meta); + } + }) + .on("error", function(e) { + self.emit('error', e); + }) + .on("end", function () { + self.push(null); + }); +} + + +NodejsStreamOutputAdapter.prototype._read = function() { + this._helper.resume(); +}; + +module.exports = NodejsStreamOutputAdapter; + +},{"../utils":32,"readable-stream":16}],14:[function(require,module,exports){ +'use strict'; + +module.exports = { + /** + * True if this is running in Nodejs, will be undefined in a browser. + * In a browser, browserify won't include this file and the whole module + * will be resolved an empty object. + */ + isNode : typeof Buffer !== "undefined", + /** + * Create a new nodejs Buffer from an existing content. + * @param {Object} data the data to pass to the constructor. + * @param {String} encoding the encoding to use. + * @return {Buffer} a new Buffer. + */ + newBufferFrom: function(data, encoding) { + if (Buffer.from && Buffer.from !== Uint8Array.from) { + return Buffer.from(data, encoding); + } else { + if (typeof data === "number") { + // Safeguard for old Node.js versions. On newer versions, + // Buffer.from(number) / Buffer(number, encoding) already throw. + throw new Error("The \"data\" argument must not be a number"); + } + return new Buffer(data, encoding); + } + }, + /** + * Create a new nodejs Buffer with the specified size. + * @param {Integer} size the size of the buffer. + * @return {Buffer} a new Buffer. + */ + allocBuffer: function (size) { + if (Buffer.alloc) { + return Buffer.alloc(size); + } else { + var buf = new Buffer(size); + buf.fill(0); + return buf; + } + }, + /** + * Find out if an object is a Buffer. + * @param {Object} b the object to test. + * @return {Boolean} true if the object is a Buffer, false otherwise. + */ + isBuffer : function(b){ + return Buffer.isBuffer(b); + }, + + isStream : function (obj) { + return obj && + typeof obj.on === "function" && + typeof obj.pause === "function" && + typeof obj.resume === "function"; + } +}; + +},{}],15:[function(require,module,exports){ +'use strict'; +var utf8 = require('./utf8'); +var utils = require('./utils'); +var GenericWorker = require('./stream/GenericWorker'); +var StreamHelper = require('./stream/StreamHelper'); +var defaults = require('./defaults'); +var CompressedObject = require('./compressedObject'); +var ZipObject = require('./zipObject'); +var generate = require("./generate"); +var nodejsUtils = require("./nodejsUtils"); +var NodejsStreamInputAdapter = require("./nodejs/NodejsStreamInputAdapter"); + + +/** + * Add a file in the current folder. + * @private + * @param {string} name the name of the file + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file + * @param {Object} originalOptions the options of the file + * @return {Object} the new file. + */ +var fileAdd = function(name, data, originalOptions) { + // be sure sub folders exist + var dataType = utils.getTypeOf(data), + parent; + + + /* + * Correct options. + */ + + var o = utils.extend(originalOptions || {}, defaults); + o.date = o.date || new Date(); + if (o.compression !== null) { + o.compression = o.compression.toUpperCase(); + } + + if (typeof o.unixPermissions === "string") { + o.unixPermissions = parseInt(o.unixPermissions, 8); + } + + // UNX_IFDIR 0040000 see zipinfo.c + if (o.unixPermissions && (o.unixPermissions & 0x4000)) { + o.dir = true; + } + // Bit 4 Directory + if (o.dosPermissions && (o.dosPermissions & 0x0010)) { + o.dir = true; + } + + if (o.dir) { + name = forceTrailingSlash(name); + } + if (o.createFolders && (parent = parentFolder(name))) { + folderAdd.call(this, parent, true); + } + + var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false; + if (!originalOptions || typeof originalOptions.binary === "undefined") { + o.binary = !isUnicodeString; + } + + + var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0; + + if (isCompressedEmpty || o.dir || !data || data.length === 0) { + o.base64 = false; + o.binary = true; + data = ""; + o.compression = "STORE"; + dataType = "string"; + } + + /* + * Convert content to fit. + */ + + var zipObjectContent = null; + if (data instanceof CompressedObject || data instanceof GenericWorker) { + zipObjectContent = data; + } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) { + zipObjectContent = new NodejsStreamInputAdapter(name, data); + } else { + zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64); + } + + var object = new ZipObject(name, zipObjectContent, o); + this.files[name] = object; + /* + TODO: we can't throw an exception because we have async promises + (we can have a promise of a Date() for example) but returning a + promise is useless because file(name, data) returns the JSZip + object for chaining. Should we break that to allow the user + to catch the error ? + + return external.Promise.resolve(zipObjectContent) + .then(function () { + return object; + }); + */ +}; + +/** + * Find the parent folder of the path. + * @private + * @param {string} path the path to use + * @return {string} the parent folder, or "" + */ +var parentFolder = function (path) { + if (path.slice(-1) === '/') { + path = path.substring(0, path.length - 1); + } + var lastSlash = path.lastIndexOf('/'); + return (lastSlash > 0) ? path.substring(0, lastSlash) : ""; +}; + +/** + * Returns the path with a slash at the end. + * @private + * @param {String} path the path to check. + * @return {String} the path with a trailing slash. + */ +var forceTrailingSlash = function(path) { + // Check the name ends with a / + if (path.slice(-1) !== "/") { + path += "/"; // IE doesn't like substr(-1) + } + return path; +}; + +/** + * Add a (sub) folder in the current folder. + * @private + * @param {string} name the folder's name + * @param {boolean=} [createFolders] If true, automatically create sub + * folders. Defaults to false. + * @return {Object} the new folder. + */ +var folderAdd = function(name, createFolders) { + createFolders = (typeof createFolders !== 'undefined') ? createFolders : defaults.createFolders; + + name = forceTrailingSlash(name); + + // Does this folder already exist? + if (!this.files[name]) { + fileAdd.call(this, name, null, { + dir: true, + createFolders: createFolders + }); + } + return this.files[name]; +}; + +/** +* Cross-window, cross-Node-context regular expression detection +* @param {Object} object Anything +* @return {Boolean} true if the object is a regular expression, +* false otherwise +*/ +function isRegExp(object) { + return Object.prototype.toString.call(object) === "[object RegExp]"; +} + +// return the actual prototype of JSZip +var out = { + /** + * @see loadAsync + */ + load: function() { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); + }, + + + /** + * Call a callback function for each entry at this folder level. + * @param {Function} cb the callback function: + * function (relativePath, file) {...} + * It takes 2 arguments : the relative path and the file. + */ + forEach: function(cb) { + var filename, relativePath, file; + /* jshint ignore:start */ + // ignore warning about unwanted properties because this.files is a null prototype object + for (filename in this.files) { + file = this.files[filename]; + relativePath = filename.slice(this.root.length, filename.length); + if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root + cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn... + } + } + /* jshint ignore:end */ + }, + + /** + * Filter nested files/folders with the specified function. + * @param {Function} search the predicate to use : + * function (relativePath, file) {...} + * It takes 2 arguments : the relative path and the file. + * @return {Array} An array of matching elements. + */ + filter: function(search) { + var result = []; + this.forEach(function (relativePath, entry) { + if (search(relativePath, entry)) { // the file matches the function + result.push(entry); + } + + }); + return result; + }, + + /** + * Add a file to the zip file, or search a file. + * @param {string|RegExp} name The name of the file to add (if data is defined), + * the name of the file to find (if no data) or a regex to match files. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded + * @param {Object} o File options + * @return {JSZip|Object|Array} this JSZip object (when adding a file), + * a file (when searching by string) or an array of files (when searching by regex). + */ + file: function(name, data, o) { + if (arguments.length === 1) { + if (isRegExp(name)) { + var regexp = name; + return this.filter(function(relativePath, file) { + return !file.dir && regexp.test(relativePath); + }); + } + else { // text + var obj = this.files[this.root + name]; + if (obj && !obj.dir) { + return obj; + } else { + return null; + } + } + } + else { // more than one argument : we have data ! + name = this.root + name; + fileAdd.call(this, name, data, o); + } + return this; + }, + + /** + * Add a directory to the zip file, or search. + * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders. + * @return {JSZip} an object with the new directory as the root, or an array containing matching folders. + */ + folder: function(arg) { + if (!arg) { + return this; + } + + if (isRegExp(arg)) { + return this.filter(function(relativePath, file) { + return file.dir && arg.test(relativePath); + }); + } + + // else, name is a new folder + var name = this.root + arg; + var newFolder = folderAdd.call(this, name); + + // Allow chaining by returning a new object with this folder as the root + var ret = this.clone(); + ret.root = newFolder.name; + return ret; + }, + + /** + * Delete a file, or a directory and all sub-files, from the zip + * @param {string} name the name of the file to delete + * @return {JSZip} this JSZip object + */ + remove: function(name) { + name = this.root + name; + var file = this.files[name]; + if (!file) { + // Look for any folders + if (name.slice(-1) !== "/") { + name += "/"; + } + file = this.files[name]; + } + + if (file && !file.dir) { + // file + delete this.files[name]; + } else { + // maybe a folder, delete recursively + var kids = this.filter(function(relativePath, file) { + return file.name.slice(0, name.length) === name; + }); + for (var i = 0; i < kids.length; i++) { + delete this.files[kids[i].name]; + } + } + + return this; + }, + + /** + * Generate the complete zip file + * @param {Object} options the options to generate the zip file : + * - compression, "STORE" by default. + * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. + * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file + */ + generate: function(options) { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); + }, + + /** + * Generate the complete zip file as an internal stream. + * @param {Object} options the options to generate the zip file : + * - compression, "STORE" by default. + * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. + * @return {StreamHelper} the streamed zip file. + */ + generateInternalStream: function(options) { + var worker, opts = {}; + try { + opts = utils.extend(options || {}, { + streamFiles: false, + compression: "STORE", + compressionOptions : null, + type: "", + platform: "DOS", + comment: null, + mimeType: 'application/zip', + encodeFileName: utf8.utf8encode + }); + + opts.type = opts.type.toLowerCase(); + opts.compression = opts.compression.toUpperCase(); + + // "binarystring" is preferred but the internals use "string". + if(opts.type === "binarystring") { + opts.type = "string"; + } + + if (!opts.type) { + throw new Error("No output type specified."); + } + + utils.checkSupport(opts.type); + + // accept nodejs `process.platform` + if( + opts.platform === 'darwin' || + opts.platform === 'freebsd' || + opts.platform === 'linux' || + opts.platform === 'sunos' + ) { + opts.platform = "UNIX"; + } + if (opts.platform === 'win32') { + opts.platform = "DOS"; + } + + var comment = opts.comment || this.comment || ""; + worker = generate.generateWorker(this, opts, comment); + } catch (e) { + worker = new GenericWorker("error"); + worker.error(e); + } + return new StreamHelper(worker, opts.type || "string", opts.mimeType); + }, + /** + * Generate the complete zip file asynchronously. + * @see generateInternalStream + */ + generateAsync: function(options, onUpdate) { + return this.generateInternalStream(options).accumulate(onUpdate); + }, + /** + * Generate the complete zip file asynchronously. + * @see generateInternalStream + */ + generateNodeStream: function(options, onUpdate) { + options = options || {}; + if (!options.type) { + options.type = "nodebuffer"; + } + return this.generateInternalStream(options).toNodejsStream(onUpdate); + } +}; +module.exports = out; + +},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(require,module,exports){ +/* + * This file is used by module bundlers (browserify/webpack/etc) when + * including a stream implementation. We use "readable-stream" to get a + * consistent behavior between nodejs versions but bundlers often have a shim + * for "stream". Using this shim greatly improve the compatibility and greatly + * reduce the final size of the bundle (only one stream implementation, not + * two). + */ +module.exports = require("stream"); + +},{"stream":undefined}],17:[function(require,module,exports){ +'use strict'; +var DataReader = require('./DataReader'); +var utils = require('../utils'); + +function ArrayReader(data) { + DataReader.call(this, data); + for(var i = 0; i < this.data.length; i++) { + data[i] = data[i] & 0xFF; + } +} +utils.inherits(ArrayReader, DataReader); +/** + * @see DataReader.byteAt + */ +ArrayReader.prototype.byteAt = function(i) { + return this.data[this.zero + i]; +}; +/** + * @see DataReader.lastIndexOfSignature + */ +ArrayReader.prototype.lastIndexOfSignature = function(sig) { + var sig0 = sig.charCodeAt(0), + sig1 = sig.charCodeAt(1), + sig2 = sig.charCodeAt(2), + sig3 = sig.charCodeAt(3); + for (var i = this.length - 4; i >= 0; --i) { + if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) { + return i - this.zero; + } + } + + return -1; +}; +/** + * @see DataReader.readAndCheckSignature + */ +ArrayReader.prototype.readAndCheckSignature = function (sig) { + var sig0 = sig.charCodeAt(0), + sig1 = sig.charCodeAt(1), + sig2 = sig.charCodeAt(2), + sig3 = sig.charCodeAt(3), + data = this.readData(4); + return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3]; +}; +/** + * @see DataReader.readData + */ +ArrayReader.prototype.readData = function(size) { + this.checkOffset(size); + if(size === 0) { + return []; + } + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; +}; +module.exports = ArrayReader; + +},{"../utils":32,"./DataReader":18}],18:[function(require,module,exports){ +'use strict'; +var utils = require('../utils'); + +function DataReader(data) { + this.data = data; // type : see implementation + this.length = data.length; + this.index = 0; + this.zero = 0; +} +DataReader.prototype = { + /** + * Check that the offset will not go too far. + * @param {string} offset the additional offset to check. + * @throws {Error} an Error if the offset is out of bounds. + */ + checkOffset: function(offset) { + this.checkIndex(this.index + offset); + }, + /** + * Check that the specified index will not be too far. + * @param {string} newIndex the index to check. + * @throws {Error} an Error if the index is out of bounds. + */ + checkIndex: function(newIndex) { + if (this.length < this.zero + newIndex || newIndex < 0) { + throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?"); + } + }, + /** + * Change the index. + * @param {number} newIndex The new index. + * @throws {Error} if the new index is out of the data. + */ + setIndex: function(newIndex) { + this.checkIndex(newIndex); + this.index = newIndex; + }, + /** + * Skip the next n bytes. + * @param {number} n the number of bytes to skip. + * @throws {Error} if the new index is out of the data. + */ + skip: function(n) { + this.setIndex(this.index + n); + }, + /** + * Get the byte at the specified index. + * @param {number} i the index to use. + * @return {number} a byte. + */ + byteAt: function(i) { + // see implementations + }, + /** + * Get the next number with a given byte size. + * @param {number} size the number of bytes to read. + * @return {number} the corresponding number. + */ + readInt: function(size) { + var result = 0, + i; + this.checkOffset(size); + for (i = this.index + size - 1; i >= this.index; i--) { + result = (result << 8) + this.byteAt(i); + } + this.index += size; + return result; + }, + /** + * Get the next string with a given byte size. + * @param {number} size the number of bytes to read. + * @return {string} the corresponding string. + */ + readString: function(size) { + return utils.transformTo("string", this.readData(size)); + }, + /** + * Get raw data without conversion, bytes. + * @param {number} size the number of bytes to read. + * @return {Object} the raw data, implementation specific. + */ + readData: function(size) { + // see implementations + }, + /** + * Find the last occurrence of a zip signature (4 bytes). + * @param {string} sig the signature to find. + * @return {number} the index of the last occurrence, -1 if not found. + */ + lastIndexOfSignature: function(sig) { + // see implementations + }, + /** + * Read the signature (4 bytes) at the current position and compare it with sig. + * @param {string} sig the expected signature + * @return {boolean} true if the signature matches, false otherwise. + */ + readAndCheckSignature: function(sig) { + // see implementations + }, + /** + * Get the next date. + * @return {Date} the date. + */ + readDate: function() { + var dostime = this.readInt(4); + return new Date(Date.UTC( + ((dostime >> 25) & 0x7f) + 1980, // year + ((dostime >> 21) & 0x0f) - 1, // month + (dostime >> 16) & 0x1f, // day + (dostime >> 11) & 0x1f, // hour + (dostime >> 5) & 0x3f, // minute + (dostime & 0x1f) << 1)); // second + } +}; +module.exports = DataReader; + +},{"../utils":32}],19:[function(require,module,exports){ +'use strict'; +var Uint8ArrayReader = require('./Uint8ArrayReader'); +var utils = require('../utils'); + +function NodeBufferReader(data) { + Uint8ArrayReader.call(this, data); +} +utils.inherits(NodeBufferReader, Uint8ArrayReader); + +/** + * @see DataReader.readData + */ +NodeBufferReader.prototype.readData = function(size) { + this.checkOffset(size); + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; +}; +module.exports = NodeBufferReader; + +},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(require,module,exports){ +'use strict'; +var DataReader = require('./DataReader'); +var utils = require('../utils'); + +function StringReader(data) { + DataReader.call(this, data); +} +utils.inherits(StringReader, DataReader); +/** + * @see DataReader.byteAt + */ +StringReader.prototype.byteAt = function(i) { + return this.data.charCodeAt(this.zero + i); +}; +/** + * @see DataReader.lastIndexOfSignature + */ +StringReader.prototype.lastIndexOfSignature = function(sig) { + return this.data.lastIndexOf(sig) - this.zero; +}; +/** + * @see DataReader.readAndCheckSignature + */ +StringReader.prototype.readAndCheckSignature = function (sig) { + var data = this.readData(4); + return sig === data; +}; +/** + * @see DataReader.readData + */ +StringReader.prototype.readData = function(size) { + this.checkOffset(size); + // this will work because the constructor applied the "& 0xff" mask. + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; +}; +module.exports = StringReader; + +},{"../utils":32,"./DataReader":18}],21:[function(require,module,exports){ +'use strict'; +var ArrayReader = require('./ArrayReader'); +var utils = require('../utils'); + +function Uint8ArrayReader(data) { + ArrayReader.call(this, data); +} +utils.inherits(Uint8ArrayReader, ArrayReader); +/** + * @see DataReader.readData + */ +Uint8ArrayReader.prototype.readData = function(size) { + this.checkOffset(size); + if(size === 0) { + // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of []. + return new Uint8Array(0); + } + var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; +}; +module.exports = Uint8ArrayReader; + +},{"../utils":32,"./ArrayReader":17}],22:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var support = require('../support'); +var ArrayReader = require('./ArrayReader'); +var StringReader = require('./StringReader'); +var NodeBufferReader = require('./NodeBufferReader'); +var Uint8ArrayReader = require('./Uint8ArrayReader'); + +/** + * Create a reader adapted to the data. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data to read. + * @return {DataReader} the data reader. + */ +module.exports = function (data) { + var type = utils.getTypeOf(data); + utils.checkSupport(type); + if (type === "string" && !support.uint8array) { + return new StringReader(data); + } + if (type === "nodebuffer") { + return new NodeBufferReader(data); + } + if (support.uint8array) { + return new Uint8ArrayReader(utils.transformTo("uint8array", data)); + } + return new ArrayReader(utils.transformTo("array", data)); +}; + +},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(require,module,exports){ +'use strict'; +exports.LOCAL_FILE_HEADER = "PK\x03\x04"; +exports.CENTRAL_FILE_HEADER = "PK\x01\x02"; +exports.CENTRAL_DIRECTORY_END = "PK\x05\x06"; +exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07"; +exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06"; +exports.DATA_DESCRIPTOR = "PK\x07\x08"; + +},{}],24:[function(require,module,exports){ +'use strict'; + +var GenericWorker = require('./GenericWorker'); +var utils = require('../utils'); + +/** + * A worker which convert chunks to a specified type. + * @constructor + * @param {String} destType the destination type. + */ +function ConvertWorker(destType) { + GenericWorker.call(this, "ConvertWorker to " + destType); + this.destType = destType; +} +utils.inherits(ConvertWorker, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +ConvertWorker.prototype.processChunk = function (chunk) { + this.push({ + data : utils.transformTo(this.destType, chunk.data), + meta : chunk.meta + }); +}; +module.exports = ConvertWorker; + +},{"../utils":32,"./GenericWorker":28}],25:[function(require,module,exports){ +'use strict'; + +var GenericWorker = require('./GenericWorker'); +var crc32 = require('../crc32'); +var utils = require('../utils'); + +/** + * A worker which calculate the crc32 of the data flowing through. + * @constructor + */ +function Crc32Probe() { + GenericWorker.call(this, "Crc32Probe"); + this.withStreamInfo("crc32", 0); +} +utils.inherits(Crc32Probe, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +Crc32Probe.prototype.processChunk = function (chunk) { + this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0); + this.push(chunk); +}; +module.exports = Crc32Probe; + +},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var GenericWorker = require('./GenericWorker'); + +/** + * A worker which calculate the total length of the data flowing through. + * @constructor + * @param {String} propName the name used to expose the length + */ +function DataLengthProbe(propName) { + GenericWorker.call(this, "DataLengthProbe for " + propName); + this.propName = propName; + this.withStreamInfo(propName, 0); +} +utils.inherits(DataLengthProbe, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +DataLengthProbe.prototype.processChunk = function (chunk) { + if(chunk) { + var length = this.streamInfo[this.propName] || 0; + this.streamInfo[this.propName] = length + chunk.data.length; + } + GenericWorker.prototype.processChunk.call(this, chunk); +}; +module.exports = DataLengthProbe; + + +},{"../utils":32,"./GenericWorker":28}],27:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var GenericWorker = require('./GenericWorker'); + +// the size of the generated chunks +// TODO expose this as a public variable +var DEFAULT_BLOCK_SIZE = 16 * 1024; + +/** + * A worker that reads a content and emits chunks. + * @constructor + * @param {Promise} dataP the promise of the data to split + */ +function DataWorker(dataP) { + GenericWorker.call(this, "DataWorker"); + var self = this; + this.dataIsReady = false; + this.index = 0; + this.max = 0; + this.data = null; + this.type = ""; + + this._tickScheduled = false; + + dataP.then(function (data) { + self.dataIsReady = true; + self.data = data; + self.max = data && data.length || 0; + self.type = utils.getTypeOf(data); + if(!self.isPaused) { + self._tickAndRepeat(); + } + }, function (e) { + self.error(e); + }); +} + +utils.inherits(DataWorker, GenericWorker); + +/** + * @see GenericWorker.cleanUp + */ +DataWorker.prototype.cleanUp = function () { + GenericWorker.prototype.cleanUp.call(this); + this.data = null; +}; + +/** + * @see GenericWorker.resume + */ +DataWorker.prototype.resume = function () { + if(!GenericWorker.prototype.resume.call(this)) { + return false; + } + + if (!this._tickScheduled && this.dataIsReady) { + this._tickScheduled = true; + utils.delay(this._tickAndRepeat, [], this); + } + return true; +}; + +/** + * Trigger a tick a schedule an other call to this function. + */ +DataWorker.prototype._tickAndRepeat = function() { + this._tickScheduled = false; + if(this.isPaused || this.isFinished) { + return; + } + this._tick(); + if(!this.isFinished) { + utils.delay(this._tickAndRepeat, [], this); + this._tickScheduled = true; + } +}; + +/** + * Read and push a chunk. + */ +DataWorker.prototype._tick = function() { + + if(this.isPaused || this.isFinished) { + return false; + } + + var size = DEFAULT_BLOCK_SIZE; + var data = null, nextIndex = Math.min(this.max, this.index + size); + if (this.index >= this.max) { + // EOF + return this.end(); + } else { + switch(this.type) { + case "string": + data = this.data.substring(this.index, nextIndex); + break; + case "uint8array": + data = this.data.subarray(this.index, nextIndex); + break; + case "array": + case "nodebuffer": + data = this.data.slice(this.index, nextIndex); + break; + } + this.index = nextIndex; + return this.push({ + data : data, + meta : { + percent : this.max ? this.index / this.max * 100 : 0 + } + }); + } +}; + +module.exports = DataWorker; + +},{"../utils":32,"./GenericWorker":28}],28:[function(require,module,exports){ +'use strict'; + +/** + * A worker that does nothing but passing chunks to the next one. This is like + * a nodejs stream but with some differences. On the good side : + * - it works on IE 6-9 without any issue / polyfill + * - it weights less than the full dependencies bundled with browserify + * - it forwards errors (no need to declare an error handler EVERYWHERE) + * + * A chunk is an object with 2 attributes : `meta` and `data`. The former is an + * object containing anything (`percent` for example), see each worker for more + * details. The latter is the real data (String, Uint8Array, etc). + * + * @constructor + * @param {String} name the name of the stream (mainly used for debugging purposes) + */ +function GenericWorker(name) { + // the name of the worker + this.name = name || "default"; + // an object containing metadata about the workers chain + this.streamInfo = {}; + // an error which happened when the worker was paused + this.generatedError = null; + // an object containing metadata to be merged by this worker into the general metadata + this.extraStreamInfo = {}; + // true if the stream is paused (and should not do anything), false otherwise + this.isPaused = true; + // true if the stream is finished (and should not do anything), false otherwise + this.isFinished = false; + // true if the stream is locked to prevent further structure updates (pipe), false otherwise + this.isLocked = false; + // the event listeners + this._listeners = { + 'data':[], + 'end':[], + 'error':[] + }; + // the previous worker, if any + this.previous = null; +} + +GenericWorker.prototype = { + /** + * Push a chunk to the next workers. + * @param {Object} chunk the chunk to push + */ + push : function (chunk) { + this.emit("data", chunk); + }, + /** + * End the stream. + * @return {Boolean} true if this call ended the worker, false otherwise. + */ + end : function () { + if (this.isFinished) { + return false; + } + + this.flush(); + try { + this.emit("end"); + this.cleanUp(); + this.isFinished = true; + } catch (e) { + this.emit("error", e); + } + return true; + }, + /** + * End the stream with an error. + * @param {Error} e the error which caused the premature end. + * @return {Boolean} true if this call ended the worker with an error, false otherwise. + */ + error : function (e) { + if (this.isFinished) { + return false; + } + + if(this.isPaused) { + this.generatedError = e; + } else { + this.isFinished = true; + + this.emit("error", e); + + // in the workers chain exploded in the middle of the chain, + // the error event will go downward but we also need to notify + // workers upward that there has been an error. + if(this.previous) { + this.previous.error(e); + } + + this.cleanUp(); + } + return true; + }, + /** + * Add a callback on an event. + * @param {String} name the name of the event (data, end, error) + * @param {Function} listener the function to call when the event is triggered + * @return {GenericWorker} the current object for chainability + */ + on : function (name, listener) { + this._listeners[name].push(listener); + return this; + }, + /** + * Clean any references when a worker is ending. + */ + cleanUp : function () { + this.streamInfo = this.generatedError = this.extraStreamInfo = null; + this._listeners = []; + }, + /** + * Trigger an event. This will call registered callback with the provided arg. + * @param {String} name the name of the event (data, end, error) + * @param {Object} arg the argument to call the callback with. + */ + emit : function (name, arg) { + if (this._listeners[name]) { + for(var i = 0; i < this._listeners[name].length; i++) { + this._listeners[name][i].call(this, arg); + } + } + }, + /** + * Chain a worker with an other. + * @param {Worker} next the worker receiving events from the current one. + * @return {worker} the next worker for chainability + */ + pipe : function (next) { + return next.registerPrevious(this); + }, + /** + * Same as `pipe` in the other direction. + * Using an API with `pipe(next)` is very easy. + * Implementing the API with the point of view of the next one registering + * a source is easier, see the ZipFileWorker. + * @param {Worker} previous the previous worker, sending events to this one + * @return {Worker} the current worker for chainability + */ + registerPrevious : function (previous) { + if (this.isLocked) { + throw new Error("The stream '" + this + "' has already been used."); + } + + // sharing the streamInfo... + this.streamInfo = previous.streamInfo; + // ... and adding our own bits + this.mergeStreamInfo(); + this.previous = previous; + var self = this; + previous.on('data', function (chunk) { + self.processChunk(chunk); + }); + previous.on('end', function () { + self.end(); + }); + previous.on('error', function (e) { + self.error(e); + }); + return this; + }, + /** + * Pause the stream so it doesn't send events anymore. + * @return {Boolean} true if this call paused the worker, false otherwise. + */ + pause : function () { + if(this.isPaused || this.isFinished) { + return false; + } + this.isPaused = true; + + if(this.previous) { + this.previous.pause(); + } + return true; + }, + /** + * Resume a paused stream. + * @return {Boolean} true if this call resumed the worker, false otherwise. + */ + resume : function () { + if(!this.isPaused || this.isFinished) { + return false; + } + this.isPaused = false; + + // if true, the worker tried to resume but failed + var withError = false; + if(this.generatedError) { + this.error(this.generatedError); + withError = true; + } + if(this.previous) { + this.previous.resume(); + } + + return !withError; + }, + /** + * Flush any remaining bytes as the stream is ending. + */ + flush : function () {}, + /** + * Process a chunk. This is usually the method overridden. + * @param {Object} chunk the chunk to process. + */ + processChunk : function(chunk) { + this.push(chunk); + }, + /** + * Add a key/value to be added in the workers chain streamInfo once activated. + * @param {String} key the key to use + * @param {Object} value the associated value + * @return {Worker} the current worker for chainability + */ + withStreamInfo : function (key, value) { + this.extraStreamInfo[key] = value; + this.mergeStreamInfo(); + return this; + }, + /** + * Merge this worker's streamInfo into the chain's streamInfo. + */ + mergeStreamInfo : function () { + for(var key in this.extraStreamInfo) { + if (!this.extraStreamInfo.hasOwnProperty(key)) { + continue; + } + this.streamInfo[key] = this.extraStreamInfo[key]; + } + }, + + /** + * Lock the stream to prevent further updates on the workers chain. + * After calling this method, all calls to pipe will fail. + */ + lock: function () { + if (this.isLocked) { + throw new Error("The stream '" + this + "' has already been used."); + } + this.isLocked = true; + if (this.previous) { + this.previous.lock(); + } + }, + + /** + * + * Pretty print the workers chain. + */ + toString : function () { + var me = "Worker " + this.name; + if (this.previous) { + return this.previous + " -> " + me; + } else { + return me; + } + } +}; + +module.exports = GenericWorker; + +},{}],29:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var ConvertWorker = require('./ConvertWorker'); +var GenericWorker = require('./GenericWorker'); +var base64 = require('../base64'); +var support = require("../support"); +var external = require("../external"); + +var NodejsStreamOutputAdapter = null; +if (support.nodestream) { + try { + NodejsStreamOutputAdapter = require('../nodejs/NodejsStreamOutputAdapter'); + } catch(e) {} +} + +/** + * Apply the final transformation of the data. If the user wants a Blob for + * example, it's easier to work with an U8intArray and finally do the + * ArrayBuffer/Blob conversion. + * @param {String} type the name of the final type + * @param {String|Uint8Array|Buffer} content the content to transform + * @param {String} mimeType the mime type of the content, if applicable. + * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the content in the right format. + */ +function transformZipOutput(type, content, mimeType) { + switch(type) { + case "blob" : + return utils.newBlob(utils.transformTo("arraybuffer", content), mimeType); + case "base64" : + return base64.encode(content); + default : + return utils.transformTo(type, content); + } +} + +/** + * Concatenate an array of data of the given type. + * @param {String} type the type of the data in the given array. + * @param {Array} dataArray the array containing the data chunks to concatenate + * @return {String|Uint8Array|Buffer} the concatenated data + * @throws Error if the asked type is unsupported + */ +function concat (type, dataArray) { + var i, index = 0, res = null, totalLength = 0; + for(i = 0; i < dataArray.length; i++) { + totalLength += dataArray[i].length; + } + switch(type) { + case "string": + return dataArray.join(""); + case "array": + return Array.prototype.concat.apply([], dataArray); + case "uint8array": + res = new Uint8Array(totalLength); + for(i = 0; i < dataArray.length; i++) { + res.set(dataArray[i], index); + index += dataArray[i].length; + } + return res; + case "nodebuffer": + return Buffer.concat(dataArray); + default: + throw new Error("concat : unsupported type '" + type + "'"); + } +} + +/** + * Listen a StreamHelper, accumulate its content and concatenate it into a + * complete block. + * @param {StreamHelper} helper the helper to use. + * @param {Function} updateCallback a callback called on each update. Called + * with one arg : + * - the metadata linked to the update received. + * @return Promise the promise for the accumulation. + */ +function accumulate(helper, updateCallback) { + return new external.Promise(function (resolve, reject){ + var dataArray = []; + var chunkType = helper._internalType, + resultType = helper._outputType, + mimeType = helper._mimeType; + helper + .on('data', function (data, meta) { + dataArray.push(data); + if(updateCallback) { + updateCallback(meta); + } + }) + .on('error', function(err) { + dataArray = []; + reject(err); + }) + .on('end', function (){ + try { + var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType); + resolve(result); + } catch (e) { + reject(e); + } + dataArray = []; + }) + .resume(); + }); +} + +/** + * An helper to easily use workers outside of JSZip. + * @constructor + * @param {Worker} worker the worker to wrap + * @param {String} outputType the type of data expected by the use + * @param {String} mimeType the mime type of the content, if applicable. + */ +function StreamHelper(worker, outputType, mimeType) { + var internalType = outputType; + switch(outputType) { + case "blob": + case "arraybuffer": + internalType = "uint8array"; + break; + case "base64": + internalType = "string"; + break; + } + + try { + // the type used internally + this._internalType = internalType; + // the type used to output results + this._outputType = outputType; + // the mime type + this._mimeType = mimeType; + utils.checkSupport(internalType); + this._worker = worker.pipe(new ConvertWorker(internalType)); + // the last workers can be rewired without issues but we need to + // prevent any updates on previous workers. + worker.lock(); + } catch(e) { + this._worker = new GenericWorker("error"); + this._worker.error(e); + } +} + +StreamHelper.prototype = { + /** + * Listen a StreamHelper, accumulate its content and concatenate it into a + * complete block. + * @param {Function} updateCb the update callback. + * @return Promise the promise for the accumulation. + */ + accumulate : function (updateCb) { + return accumulate(this, updateCb); + }, + /** + * Add a listener on an event triggered on a stream. + * @param {String} evt the name of the event + * @param {Function} fn the listener + * @return {StreamHelper} the current helper. + */ + on : function (evt, fn) { + var self = this; + + if(evt === "data") { + this._worker.on(evt, function (chunk) { + fn.call(self, chunk.data, chunk.meta); + }); + } else { + this._worker.on(evt, function () { + utils.delay(fn, arguments, self); + }); + } + return this; + }, + /** + * Resume the flow of chunks. + * @return {StreamHelper} the current helper. + */ + resume : function () { + utils.delay(this._worker.resume, [], this._worker); + return this; + }, + /** + * Pause the flow of chunks. + * @return {StreamHelper} the current helper. + */ + pause : function () { + this._worker.pause(); + return this; + }, + /** + * Return a nodejs stream for this helper. + * @param {Function} updateCb the update callback. + * @return {NodejsStreamOutputAdapter} the nodejs stream. + */ + toNodejsStream : function (updateCb) { + utils.checkSupport("nodestream"); + if (this._outputType !== "nodebuffer") { + // an object stream containing blob/arraybuffer/uint8array/string + // is strange and I don't know if it would be useful. + // I you find this comment and have a good usecase, please open a + // bug report ! + throw new Error(this._outputType + " is not supported by this method"); + } + + return new NodejsStreamOutputAdapter(this, { + objectMode : this._outputType !== "nodebuffer" + }, updateCb); + } +}; + + +module.exports = StreamHelper; + +},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(require,module,exports){ +'use strict'; + +exports.base64 = true; +exports.array = true; +exports.string = true; +exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined"; +exports.nodebuffer = typeof Buffer !== "undefined"; +// contains true if JSZip can read/generate Uint8Array, false otherwise. +exports.uint8array = typeof Uint8Array !== "undefined"; + +if (typeof ArrayBuffer === "undefined") { + exports.blob = false; +} +else { + var buffer = new ArrayBuffer(0); + try { + exports.blob = new Blob([buffer], { + type: "application/zip" + }).size === 0; + } + catch (e) { + try { + var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; + var builder = new Builder(); + builder.append(buffer); + exports.blob = builder.getBlob('application/zip').size === 0; + } + catch (e) { + exports.blob = false; + } + } +} + +try { + exports.nodestream = !!require('readable-stream').Readable; +} catch(e) { + exports.nodestream = false; +} + +},{"readable-stream":16}],31:[function(require,module,exports){ +'use strict'; + +var utils = require('./utils'); +var support = require('./support'); +var nodejsUtils = require('./nodejsUtils'); +var GenericWorker = require('./stream/GenericWorker'); + +/** + * The following functions come from pako, from pako/lib/utils/strings + * released under the MIT license, see pako https://github.com/nodeca/pako/ + */ + +// Table with utf8 lengths (calculated by first byte of sequence) +// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS, +// because max possible codepoint is 0x10ffff +var _utf8len = new Array(256); +for (var i=0; i<256; i++) { + _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1); +} +_utf8len[254]=_utf8len[254]=1; // Invalid sequence start + +// convert string to array (typed, when possible) +var string2buf = function (str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + + // count binary size + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { + c2 = str.charCodeAt(m_pos+1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4; + } + + // allocate buffer + if (support.uint8array) { + buf = new Uint8Array(buf_len); + } else { + buf = new Array(buf_len); + } + + // convert + for (i=0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) { + c2 = str.charCodeAt(m_pos+1); + if ((c2 & 0xfc00) === 0xdc00) { + c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00); + m_pos++; + } + } + if (c < 0x80) { + /* one byte */ + buf[i++] = c; + } else if (c < 0x800) { + /* two bytes */ + buf[i++] = 0xC0 | (c >>> 6); + buf[i++] = 0x80 | (c & 0x3f); + } else if (c < 0x10000) { + /* three bytes */ + buf[i++] = 0xE0 | (c >>> 12); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } else { + /* four bytes */ + buf[i++] = 0xf0 | (c >>> 18); + buf[i++] = 0x80 | (c >>> 12 & 0x3f); + buf[i++] = 0x80 | (c >>> 6 & 0x3f); + buf[i++] = 0x80 | (c & 0x3f); + } + } + + return buf; +}; + +// Calculate max possible position in utf8 buffer, +// that will not break sequence. If that's not possible +// - (very small limits) return max size as is. +// +// buf[] - utf8 bytes array +// max - length limit (mandatory); +var utf8border = function(buf, max) { + var pos; + + max = max || buf.length; + if (max > buf.length) { max = buf.length; } + + // go back from last position, until start of sequence found + pos = max-1; + while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; } + + // Fuckup - very small and broken sequence, + // return max, because we should return something anyway. + if (pos < 0) { return max; } + + // If we came to start of buffer - that means vuffer is too small, + // return max too. + if (pos === 0) { return max; } + + return (pos + _utf8len[buf[pos]] > max) ? pos : max; +}; + +// convert array to string +var buf2string = function (buf) { + var str, i, out, c, c_len; + var len = buf.length; + + // Reserve max possible length (2 words per char) + // NB: by unknown reasons, Array is significantly faster for + // String.fromCharCode.apply than Uint16Array. + var utf16buf = new Array(len*2); + + for (out=0, i=0; i 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; } + + // apply mask on first byte + c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07; + // join the rest + while (c_len > 1 && i < len) { + c = (c << 6) | (buf[i++] & 0x3f); + c_len--; + } + + // terminated by end of string? + if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; } + + if (c < 0x10000) { + utf16buf[out++] = c; + } else { + c -= 0x10000; + utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff); + utf16buf[out++] = 0xdc00 | (c & 0x3ff); + } + } + + // shrinkBuf(utf16buf, out) + if (utf16buf.length !== out) { + if(utf16buf.subarray) { + utf16buf = utf16buf.subarray(0, out); + } else { + utf16buf.length = out; + } + } + + // return String.fromCharCode.apply(null, utf16buf); + return utils.applyFromCharCode(utf16buf); +}; + + +// That's all for the pako functions. + + +/** + * Transform a javascript string into an array (typed if possible) of bytes, + * UTF-8 encoded. + * @param {String} str the string to encode + * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string. + */ +exports.utf8encode = function utf8encode(str) { + if (support.nodebuffer) { + return nodejsUtils.newBufferFrom(str, "utf-8"); + } + + return string2buf(str); +}; + + +/** + * Transform a bytes array (or a representation) representing an UTF-8 encoded + * string into a javascript string. + * @param {Array|Uint8Array|Buffer} buf the data de decode + * @return {String} the decoded string. + */ +exports.utf8decode = function utf8decode(buf) { + if (support.nodebuffer) { + return utils.transformTo("nodebuffer", buf).toString("utf-8"); + } + + buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf); + + return buf2string(buf); +}; + +/** + * A worker to decode utf8 encoded binary chunks into string chunks. + * @constructor + */ +function Utf8DecodeWorker() { + GenericWorker.call(this, "utf-8 decode"); + // the last bytes if a chunk didn't end with a complete codepoint. + this.leftOver = null; +} +utils.inherits(Utf8DecodeWorker, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +Utf8DecodeWorker.prototype.processChunk = function (chunk) { + + var data = utils.transformTo(support.uint8array ? "uint8array" : "array", chunk.data); + + // 1st step, re-use what's left of the previous chunk + if (this.leftOver && this.leftOver.length) { + if(support.uint8array) { + var previousData = data; + data = new Uint8Array(previousData.length + this.leftOver.length); + data.set(this.leftOver, 0); + data.set(previousData, this.leftOver.length); + } else { + data = this.leftOver.concat(data); + } + this.leftOver = null; + } + + var nextBoundary = utf8border(data); + var usableData = data; + if (nextBoundary !== data.length) { + if (support.uint8array) { + usableData = data.subarray(0, nextBoundary); + this.leftOver = data.subarray(nextBoundary, data.length); + } else { + usableData = data.slice(0, nextBoundary); + this.leftOver = data.slice(nextBoundary, data.length); + } + } + + this.push({ + data : exports.utf8decode(usableData), + meta : chunk.meta + }); +}; + +/** + * @see GenericWorker.flush + */ +Utf8DecodeWorker.prototype.flush = function () { + if(this.leftOver && this.leftOver.length) { + this.push({ + data : exports.utf8decode(this.leftOver), + meta : {} + }); + this.leftOver = null; + } +}; +exports.Utf8DecodeWorker = Utf8DecodeWorker; + +/** + * A worker to endcode string chunks into utf8 encoded binary chunks. + * @constructor + */ +function Utf8EncodeWorker() { + GenericWorker.call(this, "utf-8 encode"); +} +utils.inherits(Utf8EncodeWorker, GenericWorker); + +/** + * @see GenericWorker.processChunk + */ +Utf8EncodeWorker.prototype.processChunk = function (chunk) { + this.push({ + data : exports.utf8encode(chunk.data), + meta : chunk.meta + }); +}; +exports.Utf8EncodeWorker = Utf8EncodeWorker; + +},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(require,module,exports){ +'use strict'; + +var support = require('./support'); +var base64 = require('./base64'); +var nodejsUtils = require('./nodejsUtils'); +var setImmediate = require('set-immediate-shim'); +var external = require("./external"); + + +/** + * Convert a string that pass as a "binary string": it should represent a byte + * array but may have > 255 char codes. Be sure to take only the first byte + * and returns the byte array. + * @param {String} str the string to transform. + * @return {Array|Uint8Array} the string in a binary format. + */ +function string2binary(str) { + var result = null; + if (support.uint8array) { + result = new Uint8Array(str.length); + } else { + result = new Array(str.length); + } + return stringToArrayLike(str, result); +} + +/** + * Create a new blob with the given content and the given type. + * @param {String|ArrayBuffer} part the content to put in the blob. DO NOT use + * an Uint8Array because the stock browser of android 4 won't accept it (it + * will be silently converted to a string, "[object Uint8Array]"). + * + * Use only ONE part to build the blob to avoid a memory leak in IE11 / Edge: + * when a large amount of Array is used to create the Blob, the amount of + * memory consumed is nearly 100 times the original data amount. + * + * @param {String} type the mime type of the blob. + * @return {Blob} the created blob. + */ +exports.newBlob = function(part, type) { + exports.checkSupport("blob"); + + try { + // Blob constructor + return new Blob([part], { + type: type + }); + } + catch (e) { + + try { + // deprecated, browser only, old way + var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; + var builder = new Builder(); + builder.append(part); + return builder.getBlob(type); + } + catch (e) { + + // well, fuck ?! + throw new Error("Bug : can't construct the Blob."); + } + } + + +}; +/** + * The identity function. + * @param {Object} input the input. + * @return {Object} the same input. + */ +function identity(input) { + return input; +} + +/** + * Fill in an array with a string. + * @param {String} str the string to use. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated). + * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array. + */ +function stringToArrayLike(str, array) { + for (var i = 0; i < str.length; ++i) { + array[i] = str.charCodeAt(i) & 0xFF; + } + return array; +} + +/** + * An helper for the function arrayLikeToString. + * This contains static information and functions that + * can be optimized by the browser JIT compiler. + */ +var arrayToStringHelper = { + /** + * Transform an array of int into a string, chunk by chunk. + * See the performances notes on arrayLikeToString. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. + * @param {String} type the type of the array. + * @param {Integer} chunk the chunk size. + * @return {String} the resulting string. + * @throws Error if the chunk is too big for the stack. + */ + stringifyByChunk: function(array, type, chunk) { + var result = [], k = 0, len = array.length; + // shortcut + if (len <= chunk) { + return String.fromCharCode.apply(null, array); + } + while (k < len) { + if (type === "array" || type === "nodebuffer") { + result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len)))); + } + else { + result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len)))); + } + k += chunk; + } + return result.join(""); + }, + /** + * Call String.fromCharCode on every item in the array. + * This is the naive implementation, which generate A LOT of intermediate string. + * This should be used when everything else fail. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. + * @return {String} the result. + */ + stringifyByChar: function(array){ + var resultStr = ""; + for(var i = 0; i < array.length; i++) { + resultStr += String.fromCharCode(array[i]); + } + return resultStr; + }, + applyCanBeUsed : { + /** + * true if the browser accepts to use String.fromCharCode on Uint8Array + */ + uint8array : (function () { + try { + return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1; + } catch (e) { + return false; + } + })(), + /** + * true if the browser accepts to use String.fromCharCode on nodejs Buffer. + */ + nodebuffer : (function () { + try { + return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1; + } catch (e) { + return false; + } + })() + } +}; + +/** + * Transform an array-like object to a string. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. + * @return {String} the result. + */ +function arrayLikeToString(array) { + // Performances notes : + // -------------------- + // String.fromCharCode.apply(null, array) is the fastest, see + // see http://jsperf.com/converting-a-uint8array-to-a-string/2 + // but the stack is limited (and we can get huge arrays !). + // + // result += String.fromCharCode(array[i]); generate too many strings ! + // + // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2 + // TODO : we now have workers that split the work. Do we still need that ? + var chunk = 65536, + type = exports.getTypeOf(array), + canUseApply = true; + if (type === "uint8array") { + canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array; + } else if (type === "nodebuffer") { + canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer; + } + + if (canUseApply) { + while (chunk > 1) { + try { + return arrayToStringHelper.stringifyByChunk(array, type, chunk); + } catch (e) { + chunk = Math.floor(chunk / 2); + } + } + } + + // no apply or chunk error : slow and painful algorithm + // default browser on android 4.* + return arrayToStringHelper.stringifyByChar(array); +} + +exports.applyFromCharCode = arrayLikeToString; + + +/** + * Copy the data from an array-like to an other array-like. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated. + * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array. + */ +function arrayLikeToArrayLike(arrayFrom, arrayTo) { + for (var i = 0; i < arrayFrom.length; i++) { + arrayTo[i] = arrayFrom[i]; + } + return arrayTo; +} + +// a matrix containing functions to transform everything into everything. +var transform = {}; + +// string to ? +transform["string"] = { + "string": identity, + "array": function(input) { + return stringToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return transform["string"]["uint8array"](input).buffer; + }, + "uint8array": function(input) { + return stringToArrayLike(input, new Uint8Array(input.length)); + }, + "nodebuffer": function(input) { + return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length)); + } +}; + +// array to ? +transform["array"] = { + "string": arrayLikeToString, + "array": identity, + "arraybuffer": function(input) { + return (new Uint8Array(input)).buffer; + }, + "uint8array": function(input) { + return new Uint8Array(input); + }, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(input); + } +}; + +// arraybuffer to ? +transform["arraybuffer"] = { + "string": function(input) { + return arrayLikeToString(new Uint8Array(input)); + }, + "array": function(input) { + return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength)); + }, + "arraybuffer": identity, + "uint8array": function(input) { + return new Uint8Array(input); + }, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(new Uint8Array(input)); + } +}; + +// uint8array to ? +transform["uint8array"] = { + "string": arrayLikeToString, + "array": function(input) { + return arrayLikeToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return input.buffer; + }, + "uint8array": identity, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(input); + } +}; + +// nodebuffer to ? +transform["nodebuffer"] = { + "string": arrayLikeToString, + "array": function(input) { + return arrayLikeToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return transform["nodebuffer"]["uint8array"](input).buffer; + }, + "uint8array": function(input) { + return arrayLikeToArrayLike(input, new Uint8Array(input.length)); + }, + "nodebuffer": identity +}; + +/** + * Transform an input into any type. + * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer. + * If no output type is specified, the unmodified input will be returned. + * @param {String} outputType the output type. + * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert. + * @throws {Error} an Error if the browser doesn't support the requested output type. + */ +exports.transformTo = function(outputType, input) { + if (!input) { + // undefined, null, etc + // an empty string won't harm. + input = ""; + } + if (!outputType) { + return input; + } + exports.checkSupport(outputType); + var inputType = exports.getTypeOf(input); + var result = transform[inputType][outputType](input); + return result; +}; + +/** + * Return the type of the input. + * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer. + * @param {Object} input the input to identify. + * @return {String} the (lowercase) type of the input. + */ +exports.getTypeOf = function(input) { + if (typeof input === "string") { + return "string"; + } + if (Object.prototype.toString.call(input) === "[object Array]") { + return "array"; + } + if (support.nodebuffer && nodejsUtils.isBuffer(input)) { + return "nodebuffer"; + } + if (support.uint8array && input instanceof Uint8Array) { + return "uint8array"; + } + if (support.arraybuffer && input instanceof ArrayBuffer) { + return "arraybuffer"; + } +}; + +/** + * Throw an exception if the type is not supported. + * @param {String} type the type to check. + * @throws {Error} an Error if the browser doesn't support the requested type. + */ +exports.checkSupport = function(type) { + var supported = support[type.toLowerCase()]; + if (!supported) { + throw new Error(type + " is not supported by this platform"); + } +}; + +exports.MAX_VALUE_16BITS = 65535; +exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1 + +/** + * Prettify a string read as binary. + * @param {string} str the string to prettify. + * @return {string} a pretty string. + */ +exports.pretty = function(str) { + var res = '', + code, i; + for (i = 0; i < (str || "").length; i++) { + code = str.charCodeAt(i); + res += '\\x' + (code < 16 ? "0" : "") + code.toString(16).toUpperCase(); + } + return res; +}; + +/** + * Defer the call of a function. + * @param {Function} callback the function to call asynchronously. + * @param {Array} args the arguments to give to the callback. + */ +exports.delay = function(callback, args, self) { + setImmediate(function () { + callback.apply(self || null, args || []); + }); +}; + +/** + * Extends a prototype with an other, without calling a constructor with + * side effects. Inspired by nodejs' `utils.inherits` + * @param {Function} ctor the constructor to augment + * @param {Function} superCtor the parent constructor to use + */ +exports.inherits = function (ctor, superCtor) { + var Obj = function() {}; + Obj.prototype = superCtor.prototype; + ctor.prototype = new Obj(); +}; + +/** + * Merge the objects passed as parameters into a new one. + * @private + * @param {...Object} var_args All objects to merge. + * @return {Object} a new object with the data of the others. + */ +exports.extend = function() { + var result = {}, i, attr; + for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers + for (attr in arguments[i]) { + if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === "undefined") { + result[attr] = arguments[i][attr]; + } + } + } + return result; +}; + +/** + * Transform arbitrary content into a Promise. + * @param {String} name a name for the content being processed. + * @param {Object} inputData the content to process. + * @param {Boolean} isBinary true if the content is not an unicode string + * @param {Boolean} isOptimizedBinaryString true if the string content only has one byte per character. + * @param {Boolean} isBase64 true if the string content is encoded with base64. + * @return {Promise} a promise in a format usable by JSZip. + */ +exports.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) { + + // if inputData is already a promise, this flatten it. + var promise = external.Promise.resolve(inputData).then(function(data) { + + + var isBlob = support.blob && (data instanceof Blob || ['[object File]', '[object Blob]'].indexOf(Object.prototype.toString.call(data)) !== -1); + + if (isBlob && typeof FileReader !== "undefined") { + return new external.Promise(function (resolve, reject) { + var reader = new FileReader(); + + reader.onload = function(e) { + resolve(e.target.result); + }; + reader.onerror = function(e) { + reject(e.target.error); + }; + reader.readAsArrayBuffer(data); + }); + } else { + return data; + } + }); + + return promise.then(function(data) { + var dataType = exports.getTypeOf(data); + + if (!dataType) { + return external.Promise.reject( + new Error("Can't read the data of '" + name + "'. Is it " + + "in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?") + ); + } + // special case : it's way easier to work with Uint8Array than with ArrayBuffer + if (dataType === "arraybuffer") { + data = exports.transformTo("uint8array", data); + } else if (dataType === "string") { + if (isBase64) { + data = base64.decode(data); + } + else if (isBinary) { + // optimizedBinaryString === true means that the file has already been filtered with a 0xFF mask + if (isOptimizedBinaryString !== true) { + // this is a string, not in a base64 format. + // Be sure that this is a correct "binary string" + data = string2binary(data); + } + } + } + return data; + }); +}; + +},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(require,module,exports){ +'use strict'; +var readerFor = require('./reader/readerFor'); +var utils = require('./utils'); +var sig = require('./signature'); +var ZipEntry = require('./zipEntry'); +var utf8 = require('./utf8'); +var support = require('./support'); +// class ZipEntries {{{ +/** + * All the entries in the zip file. + * @constructor + * @param {Object} loadOptions Options for loading the stream. + */ +function ZipEntries(loadOptions) { + this.files = []; + this.loadOptions = loadOptions; +} +ZipEntries.prototype = { + /** + * Check that the reader is on the specified signature. + * @param {string} expectedSignature the expected signature. + * @throws {Error} if it is an other signature. + */ + checkSignature: function(expectedSignature) { + if (!this.reader.readAndCheckSignature(expectedSignature)) { + this.reader.index -= 4; + var signature = this.reader.readString(4); + throw new Error("Corrupted zip or bug: unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")"); + } + }, + /** + * Check if the given signature is at the given index. + * @param {number} askedIndex the index to check. + * @param {string} expectedSignature the signature to expect. + * @return {boolean} true if the signature is here, false otherwise. + */ + isSignature: function(askedIndex, expectedSignature) { + var currentIndex = this.reader.index; + this.reader.setIndex(askedIndex); + var signature = this.reader.readString(4); + var result = signature === expectedSignature; + this.reader.setIndex(currentIndex); + return result; + }, + /** + * Read the end of the central directory. + */ + readBlockEndOfCentral: function() { + this.diskNumber = this.reader.readInt(2); + this.diskWithCentralDirStart = this.reader.readInt(2); + this.centralDirRecordsOnThisDisk = this.reader.readInt(2); + this.centralDirRecords = this.reader.readInt(2); + this.centralDirSize = this.reader.readInt(4); + this.centralDirOffset = this.reader.readInt(4); + + this.zipCommentLength = this.reader.readInt(2); + // warning : the encoding depends of the system locale + // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded. + // On a windows machine, this field is encoded with the localized windows code page. + var zipComment = this.reader.readData(this.zipCommentLength); + var decodeParamType = support.uint8array ? "uint8array" : "array"; + // To get consistent behavior with the generation part, we will assume that + // this is utf8 encoded unless specified otherwise. + var decodeContent = utils.transformTo(decodeParamType, zipComment); + this.zipComment = this.loadOptions.decodeFileName(decodeContent); + }, + /** + * Read the end of the Zip 64 central directory. + * Not merged with the method readEndOfCentral : + * The end of central can coexist with its Zip64 brother, + * I don't want to read the wrong number of bytes ! + */ + readBlockZip64EndOfCentral: function() { + this.zip64EndOfCentralSize = this.reader.readInt(8); + this.reader.skip(4); + // this.versionMadeBy = this.reader.readString(2); + // this.versionNeeded = this.reader.readInt(2); + this.diskNumber = this.reader.readInt(4); + this.diskWithCentralDirStart = this.reader.readInt(4); + this.centralDirRecordsOnThisDisk = this.reader.readInt(8); + this.centralDirRecords = this.reader.readInt(8); + this.centralDirSize = this.reader.readInt(8); + this.centralDirOffset = this.reader.readInt(8); + + this.zip64ExtensibleData = {}; + var extraDataSize = this.zip64EndOfCentralSize - 44, + index = 0, + extraFieldId, + extraFieldLength, + extraFieldValue; + while (index < extraDataSize) { + extraFieldId = this.reader.readInt(2); + extraFieldLength = this.reader.readInt(4); + extraFieldValue = this.reader.readData(extraFieldLength); + this.zip64ExtensibleData[extraFieldId] = { + id: extraFieldId, + length: extraFieldLength, + value: extraFieldValue + }; + } + }, + /** + * Read the end of the Zip 64 central directory locator. + */ + readBlockZip64EndOfCentralLocator: function() { + this.diskWithZip64CentralDirStart = this.reader.readInt(4); + this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8); + this.disksCount = this.reader.readInt(4); + if (this.disksCount > 1) { + throw new Error("Multi-volumes zip are not supported"); + } + }, + /** + * Read the local files, based on the offset read in the central part. + */ + readLocalFiles: function() { + var i, file; + for (i = 0; i < this.files.length; i++) { + file = this.files[i]; + this.reader.setIndex(file.localHeaderOffset); + this.checkSignature(sig.LOCAL_FILE_HEADER); + file.readLocalPart(this.reader); + file.handleUTF8(); + file.processAttributes(); + } + }, + /** + * Read the central directory. + */ + readCentralDir: function() { + var file; + + this.reader.setIndex(this.centralDirOffset); + while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) { + file = new ZipEntry({ + zip64: this.zip64 + }, this.loadOptions); + file.readCentralPart(this.reader); + this.files.push(file); + } + + if (this.centralDirRecords !== this.files.length) { + if (this.centralDirRecords !== 0 && this.files.length === 0) { + // We expected some records but couldn't find ANY. + // This is really suspicious, as if something went wrong. + throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length); + } else { + // We found some records but not all. + // Something is wrong but we got something for the user: no error here. + // console.warn("expected", this.centralDirRecords, "records in central dir, got", this.files.length); + } + } + }, + /** + * Read the end of central directory. + */ + readEndOfCentral: function() { + var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END); + if (offset < 0) { + // Check if the content is a truncated zip or complete garbage. + // A "LOCAL_FILE_HEADER" is not required at the beginning (auto + // extractible zip for example) but it can give a good hint. + // If an ajax request was used without responseType, we will also + // get unreadable data. + var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER); + + if (isGarbage) { + throw new Error("Can't find end of central directory : is this a zip file ? " + + "If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"); + } else { + throw new Error("Corrupted zip: can't find end of central directory"); + } + + } + this.reader.setIndex(offset); + var endOfCentralDirOffset = offset; + this.checkSignature(sig.CENTRAL_DIRECTORY_END); + this.readBlockEndOfCentral(); + + + /* extract from the zip spec : + 4) If one of the fields in the end of central directory + record is too small to hold required data, the field + should be set to -1 (0xFFFF or 0xFFFFFFFF) and the + ZIP64 format record should be created. + 5) The end of central directory record and the + Zip64 end of central directory locator record must + reside on the same disk when splitting or spanning + an archive. + */ + if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) { + this.zip64 = true; + + /* + Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from + the zip file can fit into a 32bits integer. This cannot be solved : JavaScript represents + all numbers as 64-bit double precision IEEE 754 floating point numbers. + So, we have 53bits for integers and bitwise operations treat everything as 32bits. + see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators + and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5 + */ + + // should look for a zip64 EOCD locator + offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); + if (offset < 0) { + throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator"); + } + this.reader.setIndex(offset); + this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); + this.readBlockZip64EndOfCentralLocator(); + + // now the zip64 EOCD record + if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) { + // console.warn("ZIP64 end of central directory not where expected."); + this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); + if (this.relativeOffsetEndOfZip64CentralDir < 0) { + throw new Error("Corrupted zip: can't find the ZIP64 end of central directory"); + } + } + this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir); + this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); + this.readBlockZip64EndOfCentral(); + } + + var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize; + if (this.zip64) { + expectedEndOfCentralDirOffset += 20; // end of central dir 64 locator + expectedEndOfCentralDirOffset += 12 /* should not include the leading 12 bytes */ + this.zip64EndOfCentralSize; + } + + var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset; + + if (extraBytes > 0) { + // console.warn(extraBytes, "extra bytes at beginning or within zipfile"); + if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) { + // The offsets seem wrong, but we have something at the specified offset. + // So… we keep it. + } else { + // the offset is wrong, update the "zero" of the reader + // this happens if data has been prepended (crx files for example) + this.reader.zero = extraBytes; + } + } else if (extraBytes < 0) { + throw new Error("Corrupted zip: missing " + Math.abs(extraBytes) + " bytes."); + } + }, + prepareReader: function(data) { + this.reader = readerFor(data); + }, + /** + * Read a zip file and create ZipEntries. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file. + */ + load: function(data) { + this.prepareReader(data); + this.readEndOfCentral(); + this.readCentralDir(); + this.readLocalFiles(); + } +}; +// }}} end of ZipEntries +module.exports = ZipEntries; + +},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(require,module,exports){ +'use strict'; +var readerFor = require('./reader/readerFor'); +var utils = require('./utils'); +var CompressedObject = require('./compressedObject'); +var crc32fn = require('./crc32'); +var utf8 = require('./utf8'); +var compressions = require('./compressions'); +var support = require('./support'); + +var MADE_BY_DOS = 0x00; +var MADE_BY_UNIX = 0x03; + +/** + * Find a compression registered in JSZip. + * @param {string} compressionMethod the method magic to find. + * @return {Object|null} the JSZip compression object, null if none found. + */ +var findCompression = function(compressionMethod) { + for (var method in compressions) { + if (!compressions.hasOwnProperty(method)) { + continue; + } + if (compressions[method].magic === compressionMethod) { + return compressions[method]; + } + } + return null; +}; + +// class ZipEntry {{{ +/** + * An entry in the zip file. + * @constructor + * @param {Object} options Options of the current file. + * @param {Object} loadOptions Options for loading the stream. + */ +function ZipEntry(options, loadOptions) { + this.options = options; + this.loadOptions = loadOptions; +} +ZipEntry.prototype = { + /** + * say if the file is encrypted. + * @return {boolean} true if the file is encrypted, false otherwise. + */ + isEncrypted: function() { + // bit 1 is set + return (this.bitFlag & 0x0001) === 0x0001; + }, + /** + * say if the file has utf-8 filename/comment. + * @return {boolean} true if the filename/comment is in utf-8, false otherwise. + */ + useUTF8: function() { + // bit 11 is set + return (this.bitFlag & 0x0800) === 0x0800; + }, + /** + * Read the local part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readLocalPart: function(reader) { + var compression, localExtraFieldsLength; + + // we already know everything from the central dir ! + // If the central dir data are false, we are doomed. + // On the bright side, the local part is scary : zip64, data descriptors, both, etc. + // The less data we get here, the more reliable this should be. + // Let's skip the whole header and dash to the data ! + reader.skip(22); + // in some zip created on windows, the filename stored in the central dir contains \ instead of /. + // Strangely, the filename here is OK. + // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes + // or APPNOTE#4.4.17.1, "All slashes MUST be forward slashes '/'") but there are a lot of bad zip generators... + // Search "unzip mismatching "local" filename continuing with "central" filename version" on + // the internet. + // + // I think I see the logic here : the central directory is used to display + // content and the local directory is used to extract the files. Mixing / and \ + // may be used to display \ to windows users and use / when extracting the files. + // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394 + this.fileNameLength = reader.readInt(2); + localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir + // the fileName is stored as binary data, the handleUTF8 method will take care of the encoding. + this.fileName = reader.readData(this.fileNameLength); + reader.skip(localExtraFieldsLength); + + if (this.compressedSize === -1 || this.uncompressedSize === -1) { + throw new Error("Bug or corrupted zip : didn't get enough information from the central directory " + "(compressedSize === -1 || uncompressedSize === -1)"); + } + + compression = findCompression(this.compressionMethod); + if (compression === null) { // no compression found + throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + utils.transformTo("string", this.fileName) + ")"); + } + this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize)); + }, + + /** + * Read the central part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readCentralPart: function(reader) { + this.versionMadeBy = reader.readInt(2); + reader.skip(2); + // this.versionNeeded = reader.readInt(2); + this.bitFlag = reader.readInt(2); + this.compressionMethod = reader.readString(2); + this.date = reader.readDate(); + this.crc32 = reader.readInt(4); + this.compressedSize = reader.readInt(4); + this.uncompressedSize = reader.readInt(4); + var fileNameLength = reader.readInt(2); + this.extraFieldsLength = reader.readInt(2); + this.fileCommentLength = reader.readInt(2); + this.diskNumberStart = reader.readInt(2); + this.internalFileAttributes = reader.readInt(2); + this.externalFileAttributes = reader.readInt(4); + this.localHeaderOffset = reader.readInt(4); + + if (this.isEncrypted()) { + throw new Error("Encrypted zip are not supported"); + } + + // will be read in the local part, see the comments there + reader.skip(fileNameLength); + this.readExtraFields(reader); + this.parseZIP64ExtraField(reader); + this.fileComment = reader.readData(this.fileCommentLength); + }, + + /** + * Parse the external file attributes and get the unix/dos permissions. + */ + processAttributes: function () { + this.unixPermissions = null; + this.dosPermissions = null; + var madeBy = this.versionMadeBy >> 8; + + // Check if we have the DOS directory flag set. + // We look for it in the DOS and UNIX permissions + // but some unknown platform could set it as a compatibility flag. + this.dir = this.externalFileAttributes & 0x0010 ? true : false; + + if(madeBy === MADE_BY_DOS) { + // first 6 bits (0 to 5) + this.dosPermissions = this.externalFileAttributes & 0x3F; + } + + if(madeBy === MADE_BY_UNIX) { + this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF; + // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8); + } + + // fail safe : if the name ends with a / it probably means a folder + if (!this.dir && this.fileNameStr.slice(-1) === '/') { + this.dir = true; + } + }, + + /** + * Parse the ZIP64 extra field and merge the info in the current ZipEntry. + * @param {DataReader} reader the reader to use. + */ + parseZIP64ExtraField: function(reader) { + + if (!this.extraFields[0x0001]) { + return; + } + + // should be something, preparing the extra reader + var extraReader = readerFor(this.extraFields[0x0001].value); + + // I really hope that these 64bits integer can fit in 32 bits integer, because js + // won't let us have more. + if (this.uncompressedSize === utils.MAX_VALUE_32BITS) { + this.uncompressedSize = extraReader.readInt(8); + } + if (this.compressedSize === utils.MAX_VALUE_32BITS) { + this.compressedSize = extraReader.readInt(8); + } + if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) { + this.localHeaderOffset = extraReader.readInt(8); + } + if (this.diskNumberStart === utils.MAX_VALUE_32BITS) { + this.diskNumberStart = extraReader.readInt(4); + } + }, + /** + * Read the central part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readExtraFields: function(reader) { + var end = reader.index + this.extraFieldsLength, + extraFieldId, + extraFieldLength, + extraFieldValue; + + if (!this.extraFields) { + this.extraFields = {}; + } + + while (reader.index + 4 < end) { + extraFieldId = reader.readInt(2); + extraFieldLength = reader.readInt(2); + extraFieldValue = reader.readData(extraFieldLength); + + this.extraFields[extraFieldId] = { + id: extraFieldId, + length: extraFieldLength, + value: extraFieldValue + }; + } + + reader.setIndex(end); + }, + /** + * Apply an UTF8 transformation if needed. + */ + handleUTF8: function() { + var decodeParamType = support.uint8array ? "uint8array" : "array"; + if (this.useUTF8()) { + this.fileNameStr = utf8.utf8decode(this.fileName); + this.fileCommentStr = utf8.utf8decode(this.fileComment); + } else { + var upath = this.findExtraFieldUnicodePath(); + if (upath !== null) { + this.fileNameStr = upath; + } else { + // ASCII text or unsupported code page + var fileNameByteArray = utils.transformTo(decodeParamType, this.fileName); + this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray); + } + + var ucomment = this.findExtraFieldUnicodeComment(); + if (ucomment !== null) { + this.fileCommentStr = ucomment; + } else { + // ASCII text or unsupported code page + var commentByteArray = utils.transformTo(decodeParamType, this.fileComment); + this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray); + } + } + }, + + /** + * Find the unicode path declared in the extra field, if any. + * @return {String} the unicode path, null otherwise. + */ + findExtraFieldUnicodePath: function() { + var upathField = this.extraFields[0x7075]; + if (upathField) { + var extraReader = readerFor(upathField.value); + + // wrong version + if (extraReader.readInt(1) !== 1) { + return null; + } + + // the crc of the filename changed, this field is out of date. + if (crc32fn(this.fileName) !== extraReader.readInt(4)) { + return null; + } + + return utf8.utf8decode(extraReader.readData(upathField.length - 5)); + } + return null; + }, + + /** + * Find the unicode comment declared in the extra field, if any. + * @return {String} the unicode comment, null otherwise. + */ + findExtraFieldUnicodeComment: function() { + var ucommentField = this.extraFields[0x6375]; + if (ucommentField) { + var extraReader = readerFor(ucommentField.value); + + // wrong version + if (extraReader.readInt(1) !== 1) { + return null; + } + + // the crc of the comment changed, this field is out of date. + if (crc32fn(this.fileComment) !== extraReader.readInt(4)) { + return null; + } + + return utf8.utf8decode(extraReader.readData(ucommentField.length - 5)); + } + return null; + } +}; +module.exports = ZipEntry; + +},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(require,module,exports){ +'use strict'; + +var StreamHelper = require('./stream/StreamHelper'); +var DataWorker = require('./stream/DataWorker'); +var utf8 = require('./utf8'); +var CompressedObject = require('./compressedObject'); +var GenericWorker = require('./stream/GenericWorker'); + +/** + * A simple object representing a file in the zip file. + * @constructor + * @param {string} name the name of the file + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data + * @param {Object} options the options of the file + */ +var ZipObject = function(name, data, options) { + this.name = name; + this.dir = options.dir; + this.date = options.date; + this.comment = options.comment; + this.unixPermissions = options.unixPermissions; + this.dosPermissions = options.dosPermissions; + + this._data = data; + this._dataBinary = options.binary; + // keep only the compression + this.options = { + compression : options.compression, + compressionOptions : options.compressionOptions + }; +}; + +ZipObject.prototype = { + /** + * Create an internal stream for the content of this object. + * @param {String} type the type of each chunk. + * @return StreamHelper the stream. + */ + internalStream: function (type) { + var result = null, outputType = "string"; + try { + if (!type) { + throw new Error("No output type specified."); + } + outputType = type.toLowerCase(); + var askUnicodeString = outputType === "string" || outputType === "text"; + if (outputType === "binarystring" || outputType === "text") { + outputType = "string"; + } + result = this._decompressWorker(); + + var isUnicodeString = !this._dataBinary; + + if (isUnicodeString && !askUnicodeString) { + result = result.pipe(new utf8.Utf8EncodeWorker()); + } + if (!isUnicodeString && askUnicodeString) { + result = result.pipe(new utf8.Utf8DecodeWorker()); + } + } catch (e) { + result = new GenericWorker("error"); + result.error(e); + } + + return new StreamHelper(result, outputType, ""); + }, + + /** + * Prepare the content in the asked type. + * @param {String} type the type of the result. + * @param {Function} onUpdate a function to call on each internal update. + * @return Promise the promise of the result. + */ + async: function (type, onUpdate) { + return this.internalStream(type).accumulate(onUpdate); + }, + + /** + * Prepare the content as a nodejs stream. + * @param {String} type the type of each chunk. + * @param {Function} onUpdate a function to call on each internal update. + * @return Stream the stream. + */ + nodeStream: function (type, onUpdate) { + return this.internalStream(type || "nodebuffer").toNodejsStream(onUpdate); + }, + + /** + * Return a worker for the compressed content. + * @private + * @param {Object} compression the compression object to use. + * @param {Object} compressionOptions the options to use when compressing. + * @return Worker the worker. + */ + _compressWorker: function (compression, compressionOptions) { + if ( + this._data instanceof CompressedObject && + this._data.compression.magic === compression.magic + ) { + return this._data.getCompressedWorker(); + } else { + var result = this._decompressWorker(); + if(!this._dataBinary) { + result = result.pipe(new utf8.Utf8EncodeWorker()); + } + return CompressedObject.createWorkerFrom(result, compression, compressionOptions); + } + }, + /** + * Return a worker for the decompressed content. + * @private + * @return Worker the worker. + */ + _decompressWorker : function () { + if (this._data instanceof CompressedObject) { + return this._data.getContentWorker(); + } else if (this._data instanceof GenericWorker) { + return this._data; + } else { + return new DataWorker(this._data); + } + } +}; + +var removedMethods = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"]; +var removedFn = function () { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); +}; + +for(var i = 0; i < removedMethods.length; i++) { + ZipObject.prototype[removedMethods[i]] = removedFn; +} +module.exports = ZipObject; + +},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(require,module,exports){ +(function (global){ +'use strict'; +var Mutation = global.MutationObserver || global.WebKitMutationObserver; + +var scheduleDrain; + +{ + if (Mutation) { + var called = 0; + var observer = new Mutation(nextTick); + var element = global.document.createTextNode(''); + observer.observe(element, { + characterData: true + }); + scheduleDrain = function () { + element.data = (called = ++called % 2); + }; + } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') { + var channel = new global.MessageChannel(); + channel.port1.onmessage = nextTick; + scheduleDrain = function () { + channel.port2.postMessage(0); + }; + } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) { + scheduleDrain = function () { + + // Create a + + + + + +
+ +

index.html

+
+ + diff --git a/overview-tree.html b/overview-tree.html new file mode 100644 index 00000000..196db5d9 --- /dev/null +++ b/overview-tree.html @@ -0,0 +1,357 @@ + + + + + +Class Hierarchy (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
+ +
+
+ +
+
+

Class Hierarchy

+ +
+
+

Interface Hierarchy

+ +
+
+

Enum Hierarchy

+ +
+
+
+
+ +
+ + diff --git a/package-search-index.js b/package-search-index.js new file mode 100644 index 00000000..c3fff7d9 --- /dev/null +++ b/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","url":"allpackages-index.html"},{"l":"io.getstream.client"},{"l":"io.getstream.cloud"},{"l":"io.getstream.core"},{"l":"io.getstream.core.exceptions"},{"l":"io.getstream.core.faye"},{"l":"io.getstream.core.faye.client"},{"l":"io.getstream.core.faye.emitter"},{"l":"io.getstream.core.faye.subscription"},{"l":"io.getstream.core.http"},{"l":"io.getstream.core.models"},{"l":"io.getstream.core.models.serialization"},{"l":"io.getstream.core.options"},{"l":"io.getstream.core.utils"}] \ No newline at end of file diff --git a/package-search-index.zip b/package-search-index.zip new file mode 100644 index 00000000..e05a9279 Binary files /dev/null and b/package-search-index.zip differ diff --git a/publish.gradle b/publish.gradle deleted file mode 100644 index 1d7563bf..00000000 --- a/publish.gradle +++ /dev/null @@ -1,95 +0,0 @@ -apply plugin: 'maven-publish' -apply plugin: 'signing' - -// Create variables with empty default values -ext["ossrhUsername"] = '' -ext["ossrhPassword"] = '' -ext["signing.keyId"] = '' -ext["signing.password"] = '' -ext["signing.secretKeyRingFile"] = '' -ext["sonatypeStagingProfileId"] = '' - -File secretPropsFile = project.rootProject.file('local.properties') -if (secretPropsFile.exists()) { - // Read local.properties file first if it exists - Properties p = new Properties() - new FileInputStream(secretPropsFile).withCloseable { is -> p.load(is) } - p.each { name, value -> ext[name] = value } -} else { - // Use system environment variables - ext["ossrhUsername"] = System.getenv('OSSRH_USERNAME') - ext["ossrhPassword"] = System.getenv('OSSRH_PASSWORD') - ext["signing.keyId"] = System.getenv('SIGNING_KEY_ID') - ext["signing.password"] = System.getenv('SIGNING_PASSWORD') - ext["signing.secretKeyRingFile"] = System.getenv('SIGNING_SECRET_KEY_RING_FILE') - ext["sonatypeStagingProfileId"] = System.getenv('SONATYPE_STAGING_PROFILE_ID') -} - -nexusPublishing { - repositories { - sonatype { - nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) - snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) - stagingProfileId = sonatypeStagingProfileId - username = ossrhUsername - password = ossrhPassword - } - } -} - -task javadocJar(type: Jar) { - archiveClassifier = 'javadoc' - from javadoc -} - -task sourcesJar(type: Jar) { - archiveClassifier = 'sources' - from sourceSets.main.allSource -} - -artifacts { - archives javadocJar, sourcesJar -} - -afterEvaluate { - publishing { - publications { - release(MavenPublication) { - from components.java - artifactId 'stream-java' - - artifact sourcesJar - artifact javadocJar - - pom { - name = "Stream Feeds official Java API Client" - description = "Stream Feeds Java Client for backend and android integrations" - url = 'https://github.com/getstream/stream-chat-java' - licenses { - license { - name = 'The 3-Clause BSD License' - url = 'https://opensource.org/licenses/BSD-3-Clause' - distribution = 'repo' - } - } - developers { - developer { - id = 'getstream-support' - name = 'Stream Support' - email = 'support@getstream.io' - } - } - scm { - connection = 'scm:git:github.com/getstream/stream-java.git' - developerConnection = 'scm:git:ssh://github.com/getstream/stream-java.git' - url = 'https://github.com/getstream/stream-java' - } - } - } - } - } -} - -signing { - sign publishing.publications -} diff --git a/resources/glass.png b/resources/glass.png new file mode 100644 index 00000000..a7f591f4 Binary files /dev/null and b/resources/glass.png differ diff --git a/resources/x.png b/resources/x.png new file mode 100644 index 00000000..30548a75 Binary files /dev/null and b/resources/x.png differ diff --git a/script.js b/script.js new file mode 100644 index 00000000..7dc93c48 --- /dev/null +++ b/script.js @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'jquery/jszip/dist/jszip.js'); + createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils.js'); + if (window.navigator.userAgent.indexOf('MSIE ') > 0 || window.navigator.userAgent.indexOf('Trident/') > 0 || + window.navigator.userAgent.indexOf('Edge/') > 0) { + createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils-ie.js'); + } + createElem(doc, tag, 'search.js'); + + $.get(pathtoroot + "module-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "module-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("module-search-index.json").async("text").then(function(content){ + moduleSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "package-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "package-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("package-search-index.json").async("text").then(function(content){ + packageSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "type-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "type-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("type-search-index.json").async("text").then(function(content){ + typeSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "member-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "member-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("member-search-index.json").async("text").then(function(content){ + memberSearchIndex = JSON.parse(content); + }); + }); + }); + }); + $.get(pathtoroot + "tag-search-index.zip") + .done(function() { + JSZipUtils.getBinaryContent(pathtoroot + "tag-search-index.zip", function(e, data) { + JSZip.loadAsync(data).then(function(zip){ + zip.file("tag-search-index.json").async("text").then(function(content){ + tagSearchIndex = JSON.parse(content); + }); + }); + }); + }); + if (!moduleSearchIndex) { + createElem(doc, tag, 'module-search-index.js'); + } + if (!packageSearchIndex) { + createElem(doc, tag, 'package-search-index.js'); + } + if (!typeSearchIndex) { + createElem(doc, tag, 'type-search-index.js'); + } + if (!memberSearchIndex) { + createElem(doc, tag, 'member-search-index.js'); + } + if (!tagSearchIndex) { + createElem(doc, tag, 'tag-search-index.js'); + } + $(window).resize(function() { + $('.navPadding').css('padding-top', $('.fixedNav').css("height")); + }); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(type) { + count = 0; + for (var key in data) { + var row = document.getElementById(key); + if ((data[key] & type) !== 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) { + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} + +function updateModuleFrame(pFrame, cFrame) { + top.packageFrame.location = pFrame; + top.classFrame.location = cFrame; +} diff --git a/scripts/get_changelog_diff.js b/scripts/get_changelog_diff.js deleted file mode 100644 index ce034389..00000000 --- a/scripts/get_changelog_diff.js +++ /dev/null @@ -1,26 +0,0 @@ -/* -Here we're trying to parse the latest changes from CHANGELOG.md file. -The changelog looks like this: - -## 0.0.3 -- Something #3 -## 0.0.2 -- Something #2 -## 0.0.1 -- Something #1 - -In this case we're trying to extract "- Something #3" since that's the latest change. -*/ -module.exports = () => { - const fs = require('fs') - - changelog = fs.readFileSync('CHANGELOG.md', 'utf8') - releases = changelog.match(/## [?[0-9](.+)/g) - - current_release = changelog.indexOf(releases[0]) - previous_release = changelog.indexOf(releases[1]) - - latest_changes = changelog.substr(current_release, previous_release - current_release) - - return latest_changes -} diff --git a/search.js b/search.js new file mode 100644 index 00000000..8492271e --- /dev/null +++ b/search.js @@ -0,0 +1,326 @@ +/* + * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var noResult = {l: "No results found"}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Types"; +var catMembers = "Members"; +var catSearchTags = "SearchTags"; +var highlight = "$&"; +var camelCaseRegexp = ""; +var secondaryMatcher = ""; +function getHighlightedText(item) { + var ccMatcher = new RegExp(camelCaseRegexp); + var label = item.replace(ccMatcher, highlight); + if (label === item) { + label = item.replace(secondaryMatcher, highlight); + } + return label; +} +function getURLPrefix(ui) { + var urlPrefix=""; + if (useModuleDirectories) { + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if ((ui.item.category === catTypes && ui.item.p) || ui.item.category === catMembers) { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p == item.l) { + urlPrefix = item.m + slash; + } + }); + return urlPrefix; + } else { + return urlPrefix; + } + } + return urlPrefix; +} +var watermark = 'Search'; +$(function() { + $("#search").val(''); + $("#search").prop("disabled", false); + $("#reset").prop("disabled", false); + $("#search").val(watermark).addClass('watermark'); + $("#search").blur(function() { + if ($(this).val().length == 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + $("#search").on('click keydown', function() { + if ($(this).val() == watermark) { + $(this).val('').removeClass('watermark'); + } + }); + $("#reset").click(function() { + $("#search").val(''); + $("#search").focus(); + }); + $("#search").focus(); + $("#search")[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this, + currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.l !== noResult.l && item.category !== currentCategory) { + ul.append("
  • " + item.category + "
  • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "resultItem"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "resultItem"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + if (item.category === catModules) { + label = getHighlightedText(item.l); + } else if (item.category === catPackages) { + label = (item.m) + ? getHighlightedText(item.m + "/" + item.l) + : getHighlightedText(item.l); + } else if (item.category === catTypes) { + label = (item.p) + ? getHighlightedText(item.p + "." + item.l) + : getHighlightedText(item.l); + } else if (item.category === catMembers) { + label = getHighlightedText(item.p + "." + (item.c + "." + item.l)); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l); + } else { + label = item.l; + } + var li = $("
  • ").appendTo(ul); + var div = $("
    ").appendTo(li); + if (item.category === catSearchTags) { + if (item.d) { + div.html(label + " (" + item.h + ")
    " + + item.d + "
    "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + div.html(label); + } + return li; + } +}); +$(function() { + $("#search").catcomplete({ + minLength: 1, + delay: 100, + source: function(request, response) { + var result = new Array(); + var presult = new Array(); + var tresult = new Array(); + var mresult = new Array(); + var tgresult = new Array(); + var secondaryresult = new Array(); + var displayCount = 0; + var exactMatcher = new RegExp("^" + $.ui.autocomplete.escapeRegex(request.term) + "$", "i"); + camelCaseRegexp = ($.ui.autocomplete.escapeRegex(request.term)).split(/(?=[A-Z])/).join("([a-z0-9_$]*?)"); + var camelCaseMatcher = new RegExp("^" + camelCaseRegexp); + secondaryMatcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i"); + + // Return the nested innermost name from the specified object + function nestedName(e) { + return e.l.substring(e.l.lastIndexOf(".") + 1); + } + + function concatResults(a1, a2) { + a1 = a1.concat(a2); + a2.length = 0; + return a1; + } + + if (moduleSearchIndex) { + var mdleCount = 0; + $.each(moduleSearchIndex, function(index, item) { + item.category = catModules; + if (exactMatcher.test(item.l)) { + result.push(item); + mdleCount++; + } else if (camelCaseMatcher.test(item.l)) { + result.push(item); + } else if (secondaryMatcher.test(item.l)) { + secondaryresult.push(item); + } + }); + displayCount = mdleCount; + result = concatResults(result, secondaryresult); + } + if (packageSearchIndex) { + var pCount = 0; + var pkg = ""; + $.each(packageSearchIndex, function(index, item) { + item.category = catPackages; + pkg = (item.m) + ? (item.m + "/" + item.l) + : item.l; + if (exactMatcher.test(item.l)) { + presult.push(item); + pCount++; + } else if (camelCaseMatcher.test(pkg)) { + presult.push(item); + } else if (secondaryMatcher.test(pkg)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(presult, secondaryresult)); + displayCount = (pCount > displayCount) ? pCount : displayCount; + } + if (typeSearchIndex) { + var tCount = 0; + $.each(typeSearchIndex, function(index, item) { + item.category = catTypes; + var s = nestedName(item); + if (exactMatcher.test(s)) { + tresult.push(item); + tCount++; + } else if (camelCaseMatcher.test(s)) { + tresult.push(item); + } else if (secondaryMatcher.test(item.p + "." + item.l)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(tresult, secondaryresult)); + displayCount = (tCount > displayCount) ? tCount : displayCount; + } + if (memberSearchIndex) { + var mCount = 0; + $.each(memberSearchIndex, function(index, item) { + item.category = catMembers; + var s = nestedName(item); + if (exactMatcher.test(s)) { + mresult.push(item); + mCount++; + } else if (camelCaseMatcher.test(s)) { + mresult.push(item); + } else if (secondaryMatcher.test(item.c + "." + item.l)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(mresult, secondaryresult)); + displayCount = (mCount > displayCount) ? mCount : displayCount; + } + if (tagSearchIndex) { + var tgCount = 0; + $.each(tagSearchIndex, function(index, item) { + item.category = catSearchTags; + if (exactMatcher.test(item.l)) { + tgresult.push(item); + tgCount++; + } else if (secondaryMatcher.test(item.l)) { + secondaryresult.push(item); + } + }); + result = result.concat(concatResults(tgresult, secondaryresult)); + displayCount = (tgCount > displayCount) ? tgCount : displayCount; + } + displayCount = (displayCount > 500) ? displayCount : 500; + var counter = function() { + var count = {Modules: 0, Packages: 0, Types: 0, Members: 0, SearchTags: 0}; + var f = function(item) { + count[item.category] += 1; + return (count[item.category] <= displayCount); + }; + return f; + }(); + response(result.filter(counter)); + }, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search").empty(); + } + }, + autoFocus: true, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.l !== noResult.l) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + if (useModuleDirectories) { + url += "module-summary.html"; + } else { + url = ui.item.l + "-summary.html"; + } + } else if (ui.item.category === catPackages) { + if (ui.item.url) { + url = ui.item.url; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.url) { + url = ui.item.url; + } else if (ui.item.p === "") { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === "") { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.url) { + url += ui.item.url; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search").focus(); + } + } + }); +}); diff --git a/serialized-form.html b/serialized-form.html new file mode 100644 index 00000000..fb3b2a8d --- /dev/null +++ b/serialized-form.html @@ -0,0 +1,233 @@ + + + + + +Serialized Form (stream-java 3.6.2 API) + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Serialized Form

    +
    +
    + +
    +
    +
    + +
    + + diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index d320843b..00000000 --- a/settings.gradle +++ /dev/null @@ -1,5 +0,0 @@ -/* - * This file was generated by the Gradle 'init' task. - */ - -rootProject.name = 'stream-java' diff --git a/src/main/java/io/getstream/client/AggregatedFeed.java b/src/main/java/io/getstream/client/AggregatedFeed.java deleted file mode 100644 index 107e7229..00000000 --- a/src/main/java/io/getstream/client/AggregatedFeed.java +++ /dev/null @@ -1,731 +0,0 @@ -package io.getstream.client; - -import static io.getstream.core.utils.Serialization.deserializeContainer; - -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.models.Activity; -import io.getstream.core.models.EnrichedActivity; -import io.getstream.core.models.FeedID; -import io.getstream.core.models.Group; -import io.getstream.core.options.*; -import io.getstream.core.utils.DefaultOptions; -import java.io.IOException; -import java.util.List; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public class AggregatedFeed extends Feed { - AggregatedFeed(Client client, FeedID id) { - super(client, id); - } - - public CompletableFuture>> getActivities() - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities(Limit limit) - throws StreamException { - return getActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities(Offset offset) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities(Filter filter) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities( - ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker); - } - - public CompletableFuture>> getActivities( - Limit limit, Offset offset) throws StreamException { - return getActivities( - limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities( - Limit limit, Filter filter) throws StreamException { - return getActivities( - limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities( - Limit limit, ActivityMarker marker) throws StreamException { - return getActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture>> getActivities( - Filter filter, ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture>> getActivities( - Offset offset, ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture>> getActivities( - Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture>> getActivities( - Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - CompletableFuture>> getActivities( - Limit limit, Offset offset, Filter filter, ActivityMarker marker) throws StreamException { - return getClient() - .getActivities(getID(), limit, offset, filter, marker) - .thenApply( - response -> { - try { - return deserializeContainer(response, Group.class, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture>> getCustomActivities( - Class type) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit) throws StreamException { - return getCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, Offset offset) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, Filter filter) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture>> getCustomActivities( - Class type, Filter filter, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture>> getCustomActivities( - Class type, Offset offset, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getCustomActivities(type, limit, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getCustomActivities(type, limit, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - CompletableFuture>> getCustomActivities( - Class type, Limit limit, Offset offset, Filter filter, ActivityMarker marker) - throws StreamException { - return getClient() - .getActivities(getID(), limit, offset, filter, marker) - .thenApply( - response -> { - try { - return deserializeContainer(response, Group.class, type); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture>> - getEnrichedActivities() throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedActivities( - Offset offset) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Filter filter) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Offset offset) throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Filter filter) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedActivities( - Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedActivities( - Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Filter filter, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Offset offset, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - CompletableFuture>> getEnrichedActivities( - Limit limit, Offset offset, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getClient() - .getEnrichedActivities(getID(), limit, offset, filter, marker, flags) - .thenApply( - response -> { - try { - return deserializeContainer(response, Group.class, EnrichedActivity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture>> getEnrichedActivities( - RequestOption... options) throws StreamException { - // If no options provided, use defaults - if (options == null || options.length == 0) { - options = new RequestOption[] { - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - DefaultOptions.DEFAULT_MARKER - }; - } - - return getClient() - .getEnrichedActivities(getID(), options) - .thenApply( - response -> { - try { - return deserializeContainer(response, Group.class, EnrichedActivity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Offset offset) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Filter filter) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - CompletableFuture>> getEnrichedCustomActivities( - Class type, - Limit limit, - Offset offset, - Filter filter, - ActivityMarker marker, - EnrichmentFlags flags) - throws StreamException { - return getClient() - .getEnrichedActivities(getID(), limit, offset, filter, marker, flags) - .thenApply( - response -> { - try { - return deserializeContainer(response, Group.class, type); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } -} diff --git a/src/main/java/io/getstream/client/AnalyticsClient.java b/src/main/java/io/getstream/client/AnalyticsClient.java deleted file mode 100644 index 7c03cbd3..00000000 --- a/src/main/java/io/getstream/client/AnalyticsClient.java +++ /dev/null @@ -1,62 +0,0 @@ -package io.getstream.client; - -import static io.getstream.core.utils.Auth.buildAnalyticsRedirectToken; -import static io.getstream.core.utils.Auth.buildAnalyticsToken; - -import com.google.common.collect.Iterables; -import io.getstream.core.StreamAnalytics; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.models.Engagement; -import io.getstream.core.models.Impression; -import io.getstream.core.utils.Auth.TokenAction; -import java.net.URL; -import java8.util.concurrent.CompletableFuture; - -public final class AnalyticsClient { - private final String secret; - private final StreamAnalytics analytics; - - AnalyticsClient(String secret, StreamAnalytics analytics) { - this.secret = secret; - this.analytics = analytics; - } - - public CompletableFuture trackEngagement(Iterable events) - throws StreamException { - return trackEngagement(Iterables.toArray(events, Engagement.class)); - } - - public CompletableFuture trackEngagement(Engagement... events) throws StreamException { - final Token token = buildAnalyticsToken(secret, TokenAction.WRITE); - return analytics.trackEngagement(token, events); - } - - public CompletableFuture trackImpression(Impression event) throws StreamException { - final Token token = buildAnalyticsToken(secret, TokenAction.WRITE); - return analytics.trackImpression(token, event); - } - - public URL createRedirectURL(URL url, Engagement... engagements) throws StreamException { - return createRedirectURL(url, new Impression[0], engagements); - } - - public URL createRedirectURL(URL url, Impression... impressions) throws StreamException { - return createRedirectURL(url, impressions, new Engagement[0]); - } - - public URL createRedirectURL( - URL url, Iterable impressions, Iterable engagements) - throws StreamException { - return createRedirectURL( - url, - Iterables.toArray(impressions, Impression.class), - Iterables.toArray(engagements, Engagement.class)); - } - - public URL createRedirectURL(URL url, Impression[] impressions, Engagement[] engagements) - throws StreamException { - final Token token = buildAnalyticsRedirectToken(secret); - return analytics.createRedirectURL(token, url, impressions, engagements); - } -} diff --git a/src/main/java/io/getstream/client/AuditLogsClient.java b/src/main/java/io/getstream/client/AuditLogsClient.java deleted file mode 100644 index 18e592a0..00000000 --- a/src/main/java/io/getstream/client/AuditLogsClient.java +++ /dev/null @@ -1,97 +0,0 @@ -package io.getstream.client; - -import io.getstream.core.Stream; -import io.getstream.core.http.Token; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.models.AuditLog; -import io.getstream.core.options.RequestOption; -import io.getstream.core.options.CustomQueryParameter; -import io.getstream.core.utils.Auth.TokenAction; -import java8.util.concurrent.CompletableFuture; - -import java.util.ArrayList; -import java.util.List; - -import static io.getstream.core.utils.Auth.buildAuditLogsToken; - -/** - * Client for querying Stream audit logs. - * Audit logs record changes to various entities within your Stream app. - */ -public final class AuditLogsClient { - private final String secret; - private final Stream stream; - - public AuditLogsClient(String secret, Stream stream) { - this.secret = secret; - this.stream = stream; - } - - /** - * Query audit logs with the specified filters and default pagination. - * - * @param filters Filters to apply to the query (either entityType+entityID OR userID is required) - * @return CompletableFuture with the query response - * @throws StreamException if the filters are invalid or if there's an API error - */ - public CompletableFuture queryAuditLogs(QueryAuditLogsFilters filters) throws StreamException { - return queryAuditLogs(filters, new QueryAuditLogsPager()); - } - - /** - * Query audit logs with the specified filters and pagination. - * - * @param filters Filters to apply to the query (either entityType+entityID OR userID is required) - * @param pager Pagination settings for the query - * @return CompletableFuture with the query response - * @throws StreamException if the filters are invalid or if there's an API error - */ - public CompletableFuture queryAuditLogs(QueryAuditLogsFilters filters, QueryAuditLogsPager pager) throws StreamException { - // Validate filters before making the API call - if (filters == null) { - throw new StreamException("Filters cannot be null for audit logs queries"); - } - - final Token token = buildAuditLogsToken(secret, TokenAction.READ); - - RequestOption[] options = buildRequestOptions(filters, pager); - return stream.queryAuditLogs(token, options); - } - - /** - * Builds request options from filters and pagination settings. - * - * @param filters Filters to apply to the query - * @param pager Pagination settings - * @return Array of RequestOption for the API call - */ - private RequestOption[] buildRequestOptions(QueryAuditLogsFilters filters, QueryAuditLogsPager pager) { - List options = new ArrayList<>(); - - if (filters.getEntityType() != null && !filters.getEntityType().isEmpty() && - filters.getEntityID() != null && !filters.getEntityID().isEmpty()) { - options.add(new CustomQueryParameter("entity_type", filters.getEntityType())); - options.add(new CustomQueryParameter("entity_id", filters.getEntityID())); - } - - if (filters.getUserID() != null && !filters.getUserID().isEmpty()) { - options.add(new CustomQueryParameter("user_id", filters.getUserID())); - } - - if (pager != null) { - if (pager.getNext() != null && !pager.getNext().isEmpty()) { - options.add(new CustomQueryParameter("next", pager.getNext())); - } - - if (pager.getPrev() != null && !pager.getPrev().isEmpty()) { - options.add(new CustomQueryParameter("prev", pager.getPrev())); - } - - if (pager.getLimit() > 0) { - options.add(new CustomQueryParameter("limit", Integer.toString(pager.getLimit()))); - } - } - - return options.toArray(new RequestOption[0]); - } -} \ No newline at end of file diff --git a/src/main/java/io/getstream/client/BatchClient.java b/src/main/java/io/getstream/client/BatchClient.java deleted file mode 100644 index e9cd30be..00000000 --- a/src/main/java/io/getstream/client/BatchClient.java +++ /dev/null @@ -1,137 +0,0 @@ -package io.getstream.client; - -import static io.getstream.core.utils.Auth.*; - -import com.google.common.collect.Iterables; -import io.getstream.core.KeepHistory; -import io.getstream.core.StreamBatch; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.models.*; -import io.getstream.core.options.EnrichmentFlags; -import io.getstream.core.utils.DefaultOptions; -import java.util.List; -import java8.util.J8Arrays; -import java8.util.concurrent.CompletableFuture; - -public final class BatchClient { - private final String secret; - private final StreamBatch batch; - - BatchClient(String secret, StreamBatch batch) { - this.secret = secret; - this.batch = batch; - } - - public CompletableFuture addToMany(Activity activity, FeedID... feeds) - throws StreamException { - final Token token = buildFeedToken(secret, TokenAction.WRITE); - return batch.addToMany(token, activity, feeds); - } - - public CompletableFuture followMany(int activityCopyLimit, FollowRelation... follows) - throws StreamException { - final Token token = buildFollowToken(secret, TokenAction.WRITE); - return batch.followMany(token, activityCopyLimit, follows); - } - - public CompletableFuture followMany(int activityCopyLimit, Iterable follows) - throws StreamException { - return followMany(activityCopyLimit, Iterables.toArray(follows, FollowRelation.class)); - } - - public CompletableFuture followMany(FollowRelation... follows) throws StreamException { - return followMany(DefaultOptions.DEFAULT_ACTIVITY_COPY_LIMIT, follows); - } - - public CompletableFuture followMany(Iterable follows) - throws StreamException { - return followMany(Iterables.toArray(follows, FollowRelation.class)); - } - - public CompletableFuture unfollowMany(FollowRelation... follows) throws StreamException { - final Token token = buildFollowToken(secret, TokenAction.WRITE); - final UnfollowOperation[] ops = - J8Arrays.stream(follows) - .map(follow -> new UnfollowOperation(follow, io.getstream.core.KeepHistory.YES)) - .toArray(UnfollowOperation[]::new); - return batch.unfollowMany(token, ops); - } - - public CompletableFuture unfollowMany(KeepHistory keepHistory, FollowRelation... follows) - throws StreamException { - final Token token = buildFollowToken(secret, TokenAction.WRITE); - final UnfollowOperation[] ops = - J8Arrays.stream(follows) - .map(follow -> new UnfollowOperation(follow, keepHistory)) - .toArray(UnfollowOperation[]::new); - return batch.unfollowMany(token, ops); - } - - public CompletableFuture unfollowMany(UnfollowOperation... unfollows) - throws StreamException { - final Token token = buildFollowToken(secret, TokenAction.WRITE); - return batch.unfollowMany(token, unfollows); - } - - public CompletableFuture> getActivitiesByID(Iterable activityIDs) - throws StreamException { - return getActivitiesByID(Iterables.toArray(activityIDs, String.class)); - } - - public CompletableFuture> getActivitiesByID(String... activityIDs) - throws StreamException { - final Token token = buildActivityToken(secret, TokenAction.READ); - return batch.getActivitiesByID(token, activityIDs); - } - - public CompletableFuture> getEnrichedActivitiesByID( - Iterable activityIDs) throws StreamException { - return getEnrichedActivitiesByID(Iterables.toArray(activityIDs, String.class)); - } - - public CompletableFuture> getEnrichedActivitiesByID(String... activityIDs) - throws StreamException { - return getEnrichedActivitiesByID(DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, activityIDs); - } - - public CompletableFuture> getEnrichedActivitiesByID( - EnrichmentFlags flags, String... activityIDs) throws StreamException { - final Token token = buildActivityToken(secret, TokenAction.READ); - return batch.getEnrichedActivitiesByID(token, flags, activityIDs); - } - - public CompletableFuture> getActivitiesByForeignID( - Iterable activityIDTimePairs) throws StreamException { - return getActivitiesByForeignID( - Iterables.toArray(activityIDTimePairs, ForeignIDTimePair.class)); - } - - public CompletableFuture> getActivitiesByForeignID( - ForeignIDTimePair... activityIDTimePairs) throws StreamException { - final Token token = buildActivityToken(secret, TokenAction.READ); - return batch.getActivitiesByForeignID(token, activityIDTimePairs); - } - - public CompletableFuture> getEnrichedActivitiesByForeignID( - Iterable activityIDTimePairs) throws StreamException { - return getEnrichedActivitiesByForeignID( - Iterables.toArray(activityIDTimePairs, ForeignIDTimePair.class)); - } - - public CompletableFuture> getEnrichedActivitiesByForeignID( - ForeignIDTimePair... activityIDTimePairs) throws StreamException { - final Token token = buildActivityToken(secret, TokenAction.READ); - return batch.getEnrichedActivitiesByForeignID(token, activityIDTimePairs); - } - - public CompletableFuture updateActivities(Iterable activities) - throws StreamException { - return updateActivities(Iterables.toArray(activities, Activity.class)); - } - - public CompletableFuture updateActivities(Activity... activities) throws StreamException { - final Token token = buildActivityToken(secret, TokenAction.WRITE); - return batch.updateActivities(token, activities); - } -} diff --git a/src/main/java/io/getstream/client/Client.java b/src/main/java/io/getstream/client/Client.java deleted file mode 100644 index 6beee690..00000000 --- a/src/main/java/io/getstream/client/Client.java +++ /dev/null @@ -1,404 +0,0 @@ -package io.getstream.client; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Auth.*; - -import com.google.common.collect.Iterables; -import io.getstream.core.Region; -import io.getstream.core.Stream; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.OKHTTPClientAdapter; -import io.getstream.core.http.Response; -import io.getstream.core.http.Token; -import io.getstream.core.models.*; -import io.getstream.core.options.RequestOption; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Date; -import java.util.List; -import java.util.Map; - -import io.getstream.core.utils.Auth; -import java8.util.concurrent.CompletableFuture; - -public final class Client { - private final String secret; - private final Stream stream; - - private Client(String key, String secret, URL baseURL, HTTPClient httpClient) { - this.secret = secret; - this.stream = new Stream(key, baseURL, httpClient); - } - - public static Builder builder(String apiKey, String secret) { - return new Builder(apiKey, secret); - } - - public CompletableFuture updateActivityByID( - String id, Map set, Iterable unset) throws StreamException { - return updateActivityByID(id, set, Iterables.toArray(unset, String.class)); - } - - public CompletableFuture updateActivityByID(ActivityUpdate update) - throws StreamException { - return updateActivityByID(update.getID(), update.getSet(), update.getUnset()); - } - - public CompletableFuture updateActivityByID( - String id, Map set, String[] unset, RequestOption... options) - throws StreamException { - final Token token = buildActivityToken(secret, TokenAction.WRITE); - return stream.updateActivityByID(token, id, set, unset, options); - } - - public CompletableFuture updateActivityByForeignID( - ForeignIDTimePair foreignIDTimePair, Map set, Iterable unset) - throws StreamException { - checkNotNull(foreignIDTimePair, "No activity to update"); - return updateActivityByForeignID( - foreignIDTimePair.getForeignID(), foreignIDTimePair.getTime(), set, unset); - } - - public CompletableFuture updateActivityByForeignID( - ForeignIDTimePair foreignIDTimePair, Map set, String[] unset) - throws StreamException { - checkNotNull(foreignIDTimePair, "No activity to update"); - return updateActivityByForeignID( - foreignIDTimePair.getForeignID(), foreignIDTimePair.getTime(), set, unset); - } - - public CompletableFuture updateActivityByForeignID( - String foreignID, Date timestamp, Map set, Iterable unset) - throws StreamException { - return updateActivityByForeignID( - foreignID, timestamp, set, Iterables.toArray(unset, String.class)); - } - - public CompletableFuture updateActivityByForeignID(ActivityUpdate update) - throws StreamException { - return updateActivityByForeignID( - update.getForeignID(), update.getTime(), update.getSet(), update.getUnset()); - } - - public CompletableFuture updateActivityByForeignID( - String foreignID, Date timestamp, Map set, String[] unset, - RequestOption... options) throws StreamException { - final Token token = buildActivityToken(secret, TokenAction.WRITE); - return stream.updateActivityByForeignID(token, foreignID, timestamp, set, unset, options); - } - - public CompletableFuture openGraph(URL url) throws StreamException { - final Token token = buildOpenGraphToken(secret); - return stream.openGraph(token, url); - } - - public CompletableFuture> updateActivitiesByID(Iterable updates) - throws StreamException { - return updateActivitiesByID(Iterables.toArray(updates, ActivityUpdate.class), new RequestOption[0]); - } - - public CompletableFuture> updateActivitiesByID(ActivityUpdate... updates) - throws StreamException { - return updateActivitiesByID(updates, new RequestOption[0]); - } - - public CompletableFuture> updateActivitiesByID( - ActivityUpdate[] updates, RequestOption... options) throws StreamException { - final Token token = buildActivityToken(secret, TokenAction.WRITE); - return stream.updateActivitiesByID(token, updates, options); - } - - public CompletableFuture> updateActivitiesByForeignID( - Iterable updates) throws StreamException { - return updateActivitiesByForeignID(Iterables.toArray(updates, ActivityUpdate.class), new RequestOption[0]); - } - - public CompletableFuture> updateActivitiesByForeignID(ActivityUpdate... updates) - throws StreamException { - return updateActivitiesByForeignID(updates, new RequestOption[0]); - } - - public CompletableFuture> updateActivitiesByForeignID( - ActivityUpdate[] updates, RequestOption... options) throws StreamException { - final Token token = buildActivityToken(secret, TokenAction.WRITE); - return stream.updateActivitiesByForeignID(token, updates, options); - } - - public static final class Builder { - private static final String DEFAULT_HOST = "stream-io-api.com"; - - private final String apiKey; - private final String secret; - private HTTPClient httpClient; - - private String scheme = "https"; - private String region = Region.US_EAST.toString(); - private String host = DEFAULT_HOST; - private int port = 443; - - public Builder(String apiKey, String secret) { - checkNotNull(apiKey, "API key can't be null"); - checkNotNull(secret, "Secret can't be null"); - checkArgument(!apiKey.isEmpty(), "API key can't be empty"); - checkArgument(!secret.isEmpty(), "Secret can't be empty"); - this.apiKey = apiKey; - this.secret = secret; - } - - public Builder httpClient(HTTPClient httpClient) { - checkNotNull(httpClient, "HTTP client can't be null"); - this.httpClient = httpClient; - return this; - } - - public Builder scheme(String scheme) { - checkNotNull(scheme, "Scheme can't be null"); - checkArgument(!scheme.isEmpty(), "Scheme can't be empty"); - this.scheme = scheme; - return this; - } - - public Builder host(String host) { - checkNotNull(host, "Host can't be null"); - checkArgument(!host.isEmpty(), "Host can't be empty"); - this.host = host; - return this; - } - - public Builder port(int port) { - checkArgument(port > 0, "Port has to be a non-zero positive number"); - this.port = port; - return this; - } - - public Builder region(Region region) { - checkNotNull(region, "Region can't be null"); - this.region = region.toString(); - return this; - } - - public Builder region(String region) { - checkNotNull(region, "Region can't be null"); - checkArgument(!region.isEmpty(), "Region can't be empty"); - this.region = region; - return this; - } - - private String buildHost() { - final StringBuilder sb = new StringBuilder(); - if (host.equals(DEFAULT_HOST)) { - sb.append(region).append("."); - } - sb.append(host); - return sb.toString(); - } - - public Client build() throws MalformedURLException { - if (httpClient == null) { - httpClient = new OKHTTPClientAdapter(); - } - return new Client(apiKey, secret, new URL(scheme, buildHost(), port, ""), httpClient); - } - } - - public T getHTTPClientImplementation() { - return stream.getHTTPClientImplementation(); - } - - public Token frontendToken(String userID) { - return buildFrontendToken(secret, userID); - } - - public Token frontendToken(String userID, Date expiresAt) { - return buildFrontendToken(secret, userID, expiresAt); - } - - public FlatFeed flatFeed(FeedID id) { - return new FlatFeed(this, id); - } - - public FlatFeed flatFeed(String slug, String userID) { - return flatFeed(new FeedID(slug, userID)); - } - - public AggregatedFeed aggregatedFeed(FeedID id) { - return new AggregatedFeed(this, id); - } - - public AggregatedFeed aggregatedFeed(String slug, String userID) { - return aggregatedFeed(new FeedID(slug, userID)); - } - - public NotificationFeed notificationFeed(FeedID id) { - return new NotificationFeed(this, id); - } - - public NotificationFeed notificationFeed(String slug, String userID) { - return notificationFeed(new FeedID(slug, userID)); - } - - public User user(String userID) { - return new User(this, userID); - } - - public BatchClient batch() { - return new BatchClient(secret, stream.batch()); - } - - public CollectionsClient collections() { - return new CollectionsClient(secret, stream.collections()); - } - - public PersonalizationClient personalization() { - return new PersonalizationClient(secret, stream.personalization()); - } - - public AnalyticsClient analytics() { - return new AnalyticsClient(secret, stream.analytics()); - } - - public ReactionsClient reactions() { - return new ReactionsClient(secret, stream.reactions()); - } - - public ModerationClient moderation() { - return new ModerationClient(secret, stream.moderation()); - } - - public AuditLogsClient auditLogs() { - return new AuditLogsClient(secret, stream); - } - - public FileStorageClient files() { - return new FileStorageClient(secret, stream.files()); - } - - public ImageStorageClient images() { - return new ImageStorageClient(secret, stream.images()); - } - - CompletableFuture getActivities(FeedID feed, RequestOption... options) - throws StreamException { - final Token token = buildFeedToken(secret, feed, TokenAction.READ); - return stream.getActivities(token, feed, options); - } - - CompletableFuture getEnrichedActivities(FeedID feed, RequestOption... options) - throws StreamException { - final Token token = buildFeedToken(secret, feed, TokenAction.READ); - return stream.getEnrichedActivities(token, feed, options); - } - - CompletableFuture addActivity(FeedID feed, Activity activity, RequestOption... options) - throws StreamException { - final Token token = buildFeedToken(secret, feed, TokenAction.WRITE); - return stream.addActivity(token, feed, activity, options); - } - - CompletableFuture addActivities(FeedID feed, Activity... activities) - throws StreamException { - return addActivities(feed, activities, new RequestOption[0]); - } - - CompletableFuture addActivities( - FeedID feed, Activity[] activities, RequestOption... options) throws StreamException { - final Token token = buildFeedToken(secret, feed, TokenAction.WRITE); - return stream.addActivities(token, feed, activities, options); - } - - CompletableFuture removeActivityByID(FeedID feed, String id) throws StreamException { - final Token token = buildFeedToken(secret, feed, TokenAction.DELETE); - return stream.removeActivityByID(token, feed, id); - } - - CompletableFuture removeActivityByForeignID(FeedID feed, String foreignID) - throws StreamException { - final Token token = buildFeedToken(secret, feed, TokenAction.DELETE); - return stream.removeActivityByForeignID(token, feed, foreignID); - } - - CompletableFuture follow(FeedID source, FeedID target, int activityCopyLimit) - throws StreamException { - final Token token = buildFollowToken(secret, source, TokenAction.WRITE); - final Token targetToken = buildFeedToken(secret, target, TokenAction.READ); - return stream.follow(token, targetToken, source, target, activityCopyLimit); - } - - CompletableFuture getFollowers(FeedID feed, RequestOption... options) - throws StreamException { - final Token token = buildFollowToken(secret, feed, TokenAction.READ); - return stream.getFollowers(token, feed, options); - } - - CompletableFuture getFollowed(FeedID feed, RequestOption... options) - throws StreamException { - final Token token = buildFollowToken(secret, feed, TokenAction.READ); - return stream.getFollowed(token, feed, options); - } - - CompletableFuture unfollow(FeedID source, FeedID target, RequestOption... options) - throws StreamException { - final Token token = buildFollowToken(secret, source, TokenAction.DELETE); - return stream.unfollow(token, source, target, options); - } - - CompletableFuture getFollowStats( - FeedID feed, String[] followerSlugs, String[] followingSlugs) throws StreamException { - final Token token = buildFollowToken(secret, TokenAction.READ); - return stream.getFollowStats(token, feed, followerSlugs, followingSlugs); - } - - CompletableFuture updateActivityToTargets( - FeedID feed, Activity activity, FeedID[] add, FeedID[] remove, FeedID[] newTargets) - throws StreamException { - final Token token = buildToTargetUpdateToken(secret, feed, TokenAction.WRITE); - return stream.updateActivityToTargets(token, feed, activity, add, remove, newTargets); - } - - CompletableFuture getUser(String id) throws StreamException { - final Token token = buildUsersToken(secret, TokenAction.READ); - return stream.getUser(token, id, false); - } - - CompletableFuture deleteUser(String id) throws StreamException { - final Token token = buildUsersToken(secret, TokenAction.DELETE); - return stream.deleteUser(token, id); - } - - CompletableFuture getOrCreateUser(String id, Data data) throws StreamException { - final Token token = buildUsersToken(secret, TokenAction.WRITE); - return stream.createUser(token, id, data, true); - } - - CompletableFuture createUser(String id, Data data) throws StreamException { - final Token token = buildUsersToken(secret, TokenAction.WRITE); - return stream.createUser(token, id, data, false); - } - - CompletableFuture updateUser(String id, Data data) throws StreamException { - final Token token = buildUsersToken(secret, TokenAction.WRITE); - return stream.updateUser(token, id, data); - } - - CompletableFuture userProfile(String id) throws StreamException { - final Token token = buildUsersToken(secret, TokenAction.READ); - return stream.getUser(token, id, true); - } - - public CompletableFuture deleteActivities(BatchDeleteActivitiesRequest request) throws StreamException { - final Token token = buildDataPrivacyToken(secret, Auth.TokenAction.WRITE); - return stream.deleteActivities(token, request); - } - - public CompletableFuture deleteReactions(BatchDeleteReactionsRequest request) throws StreamException { - final Token token = buildDataPrivacyToken(secret, Auth.TokenAction.WRITE); - return stream.deleteReactions(token, request); - } - - public CompletableFuture exportUserActivities(String userId) throws StreamException { - final Token token = buildDataPrivacyToken(secret, Auth.TokenAction.READ); - return stream.exportUserActivities(token, userId); - } -} diff --git a/src/main/java/io/getstream/client/CollectionsClient.java b/src/main/java/io/getstream/client/CollectionsClient.java deleted file mode 100644 index 39f2bee4..00000000 --- a/src/main/java/io/getstream/client/CollectionsClient.java +++ /dev/null @@ -1,151 +0,0 @@ -package io.getstream.client; - -import static io.getstream.core.utils.Auth.buildCollectionsToken; -import static io.getstream.core.utils.Serialization.convert; - -import com.google.common.collect.Iterables; -import io.getstream.core.StreamCollections; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.models.CollectionData; -import io.getstream.core.utils.Auth.TokenAction; -import io.getstream.core.utils.Streams; -import java.util.List; -import java8.util.J8Arrays; -import java8.util.concurrent.CompletableFuture; -import java8.util.stream.Collectors; -import java8.util.stream.StreamSupport; - -public final class CollectionsClient { - private final String secret; - private final StreamCollections collections; - - CollectionsClient(String secret, StreamCollections collections) { - this.secret = secret; - this.collections = collections; - } - - public CompletableFuture addCustom(String collection, T item) throws StreamException { - return addCustom(null, collection, item); - } - - public CompletableFuture addCustom(String userID, String collection, T item) - throws StreamException { - return add(userID, collection, convert(item, CollectionData.class)) - .thenApply(data -> convert(data, (Class) item.getClass())); - } - - public CompletableFuture add(String collection, CollectionData item) - throws StreamException { - return add(null, collection, item); - } - - public CompletableFuture add( - String userID, String collection, CollectionData item) throws StreamException { - final Token token = buildCollectionsToken(secret, TokenAction.WRITE); - return collections.add(token, userID, collection, item); - } - - public CompletableFuture updateCustom(String collection, T item) throws StreamException { - return updateCustom(null, collection, item); - } - - public CompletableFuture updateCustom(String userID, String collection, T item) - throws StreamException { - return update(userID, collection, convert(item, CollectionData.class)) - .thenApply(data -> convert(data, (Class) item.getClass())); - } - - public CompletableFuture update(String collection, CollectionData item) - throws StreamException { - return update(null, collection, item); - } - - public CompletableFuture update( - String userID, String collection, CollectionData item) throws StreamException { - final Token token = buildCollectionsToken(secret, TokenAction.WRITE); - return collections.update(token, userID, collection, item); - } - - public CompletableFuture upsertCustom(String collection, Iterable items) - throws StreamException { - final CollectionData[] custom = - Streams.stream(items) - .map(item -> CollectionData.buildFrom(item)) - .toArray(CollectionData[]::new); - return upsert(collection, custom); - } - - public CompletableFuture upsertCustom(String collection, T... items) - throws StreamException { - final CollectionData[] custom = - J8Arrays.stream(items) - .map(item -> CollectionData.buildFrom(item)) - .toArray(CollectionData[]::new); - return upsert(collection, custom); - } - - public CompletableFuture upsert(String collection, Iterable items) - throws StreamException { - return upsert(collection, Iterables.toArray(items, CollectionData.class)); - } - - public CompletableFuture upsert(String collection, CollectionData... items) - throws StreamException { - final Token token = buildCollectionsToken(secret, TokenAction.WRITE); - return collections.upsert(token, collection, items); - } - - public CompletableFuture getCustom(Class type, String collection, String id) - throws StreamException { - return get(collection, id).thenApply(data -> convert(data, type)); - } - - public CompletableFuture get(String collection, String id) - throws StreamException { - final Token token = buildCollectionsToken(secret, TokenAction.READ); - return collections.get(token, collection, id); - } - - public CompletableFuture> selectCustom( - Class type, String collection, Iterable ids) throws StreamException { - return selectCustom(type, collection, Iterables.toArray(ids, String.class)); - } - - public CompletableFuture> selectCustom( - Class type, String collection, String... ids) throws StreamException { - return select(collection, ids) - .thenApply( - data -> - StreamSupport.stream(data) - .map(item -> convert(item, type)) - .collect(Collectors.toList())); - } - - public CompletableFuture> select(String collection, Iterable ids) - throws StreamException { - return select(collection, Iterables.toArray(ids, String.class)); - } - - public CompletableFuture> select(String collection, String... ids) - throws StreamException { - final Token token = buildCollectionsToken(secret, TokenAction.READ); - return collections.select(token, collection, ids); - } - - public CompletableFuture delete(String collection, String id) throws StreamException { - final Token token = buildCollectionsToken(secret, TokenAction.DELETE); - return collections.delete(token, collection, id); - } - - public CompletableFuture deleteMany(String collection, Iterable ids) - throws StreamException { - return deleteMany(collection, Iterables.toArray(ids, String.class)); - } - - public CompletableFuture deleteMany(String collection, String... ids) - throws StreamException { - final Token token = buildCollectionsToken(secret, TokenAction.DELETE); - return collections.deleteMany(token, collection, ids); - } -} diff --git a/src/main/java/io/getstream/client/Feed.java b/src/main/java/io/getstream/client/Feed.java deleted file mode 100644 index 3fc1d45a..00000000 --- a/src/main/java/io/getstream/client/Feed.java +++ /dev/null @@ -1,395 +0,0 @@ -package io.getstream.client; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.*; -import static io.getstream.core.utils.Serialization.deserializeContainer; - -import com.google.common.collect.Iterables; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.models.*; -import io.getstream.core.options.CustomQueryParameter; -import io.getstream.core.options.Limit; -import io.getstream.core.options.Offset; -import io.getstream.core.options.RequestOption; -import io.getstream.core.utils.DefaultOptions; -import io.getstream.core.utils.Streams; -import java.io.IOException; -import java.lang.reflect.ParameterizedType; -import java.util.List; -import java8.util.J8Arrays; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public class Feed { - private final Client client; - private final FeedID id; - - Feed(Client client, FeedID id) { - checkNotNull(client, "Can't create feed w/o a client"); - checkNotNull(id, "Can't create feed w/o an ID"); - checkNotNull(id.getSlug(), "Feed slug can't be null"); - - this.client = client; - this.id = id; - } - - protected final Client getClient() { - return client; - } - - public final FeedID getID() { - return id; - } - - public final String getSlug() { - return id.getSlug(); - } - - public final String getUserID() { - return id.getUserID(); - } - - public final CompletableFuture addActivity(Activity activity, RequestOption... options) - throws StreamException { - return getClient() - .addActivity(id, activity, options) - .thenApply( - response -> { - try { - return deserialize(response, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture addCustomActivity(T activity, RequestOption... options) - throws StreamException { - return getClient() - .addActivity(id, Activity.builder().fromCustomActivity(activity).build(), options) - .thenApply( - response -> { - try { - return deserialize(response, (Class) activity.getClass()); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture> addActivities(Iterable activities) - throws StreamException { - return addActivities(Iterables.toArray(activities, Activity.class), new RequestOption[0]); - } - - public final CompletableFuture> addCustomActivities(Iterable activities) - throws StreamException { - final Activity[] custom = - Streams.stream(activities) - .map(activity -> Activity.builder().fromCustomActivity(activity).build()) - .toArray(Activity[]::new); - return getClient() - .addActivities(id, custom, new RequestOption[0]) - .thenApply( - response -> { - try { - Class element = - (Class) - ((ParameterizedType) getClass().getGenericSuperclass()) - .getActualTypeArguments()[0]; - return deserializeContainer(response, "activities", element); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture> addActivities(Activity... activities) - throws StreamException { - return addActivities(activities, new RequestOption[0]); - } - - public final CompletableFuture> addActivities( - Activity[] activities, RequestOption... options) throws StreamException { - return getClient() - .addActivities(id, activities, options) - .thenApply( - response -> { - try { - return deserializeContainer(response, "activities", Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture> addCustomActivities(T... activities) - throws StreamException { - final Activity[] custom = - J8Arrays.stream(activities) - .map(activity -> Activity.builder().fromCustomActivity(activity).build()) - .toArray(Activity[]::new); - return getClient() - .addActivities(id, custom, new RequestOption[0]) - .thenApply( - response -> { - try { - Class element = (Class) activities.getClass().getComponentType(); - return deserializeContainer(response, "activities", element); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture removeActivityByID(String id) throws StreamException { - return client - .removeActivityByID(this.id, id) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture removeActivityByForeignID(String foreignID) - throws StreamException { - return client - .removeActivityByForeignID(id, foreignID) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture follow(FlatFeed feed) throws StreamException { - return follow(feed, DefaultOptions.DEFAULT_ACTIVITY_COPY_LIMIT); - } - - public final CompletableFuture follow(FlatFeed feed, int activityCopyLimit) - throws StreamException { - checkArgument( - activityCopyLimit <= DefaultOptions.MAX_ACTIVITY_COPY_LIMIT, - String.format( - "Activity copy limit should be less then %d", DefaultOptions.MAX_ACTIVITY_COPY_LIMIT)); - - return client - .follow(id, feed.getID(), activityCopyLimit) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture> getFollowers(Iterable feedIDs) - throws StreamException { - return getFollowers( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowers(FeedID... feedIDs) - throws StreamException { - return getFollowers(DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, feedIDs); - } - - public final CompletableFuture> getFollowers( - Limit limit, Iterable feedIDs) throws StreamException { - return getFollowers( - limit, DefaultOptions.DEFAULT_OFFSET, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowers(Limit limit, FeedID... feedIDs) - throws StreamException { - return getFollowers(limit, DefaultOptions.DEFAULT_OFFSET, feedIDs); - } - - public final CompletableFuture> getFollowers( - Offset offset, Iterable feedIDs) throws StreamException { - return getFollowers( - DefaultOptions.DEFAULT_LIMIT, offset, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowers( - Offset offset, FeedID... feedIDs) throws StreamException { - return getFollowers(DefaultOptions.DEFAULT_LIMIT, offset, feedIDs); - } - - public final CompletableFuture> getFollowers( - Limit limit, Offset offset, Iterable feedIDs) throws StreamException { - return getFollowers(limit, offset, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowers( - Limit limit, Offset offset, FeedID... feeds) throws StreamException { - checkNotNull(feeds, "No feed ids to filter on"); - - final String[] feedIDs = J8Arrays.stream(feeds).map(id -> id.toString()).toArray(String[]::new); - final RequestOption[] options = - feedIDs.length == 0 - ? new RequestOption[] {limit, offset} - : new RequestOption[] { - limit, offset, new CustomQueryParameter("filter", String.join(",", feedIDs)) - }; - return client - .getFollowers(id, options) - .thenApply( - response -> { - try { - return deserializeContainer(response, FollowRelation.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture> getFollowed(Iterable feedIDs) - throws StreamException { - return getFollowed( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowed(FeedID... feedIDs) - throws StreamException { - return getFollowed(DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, feedIDs); - } - - public final CompletableFuture> getFollowed( - Offset offset, Iterable feedIDs) throws StreamException { - return getFollowed( - DefaultOptions.DEFAULT_LIMIT, offset, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowed(Offset offset, FeedID... feedIDs) - throws StreamException { - return getFollowed(DefaultOptions.DEFAULT_LIMIT, offset, feedIDs); - } - - public final CompletableFuture> getFollowed( - Limit limit, Iterable feedIDs) throws StreamException { - return getFollowed( - limit, DefaultOptions.DEFAULT_OFFSET, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowed(Limit limit, FeedID... feedIDs) - throws StreamException { - return getFollowed(limit, DefaultOptions.DEFAULT_OFFSET, feedIDs); - } - - public final CompletableFuture> getFollowed( - Limit limit, Offset offset, Iterable feedIDs) throws StreamException { - return getFollowed(limit, offset, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowed( - Limit limit, Offset offset, FeedID... feeds) throws StreamException { - checkNotNull(feeds, "No feed ids to filter on"); - - final String[] feedIDs = J8Arrays.stream(feeds).map(id -> id.toString()).toArray(String[]::new); - final RequestOption[] options = - feedIDs.length == 0 - ? new RequestOption[] {limit, offset} - : new RequestOption[] { - limit, offset, new CustomQueryParameter("filter", String.join(",", feedIDs)) - }; - return client - .getFollowed(id, options) - .thenApply( - response -> { - try { - return deserializeContainer(response, FollowRelation.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture unfollow(FlatFeed feed) throws StreamException { - return unfollow(feed, io.getstream.core.KeepHistory.NO); - } - - public final CompletableFuture unfollow( - FlatFeed feed, io.getstream.core.KeepHistory keepHistory) throws StreamException { - return client - .unfollow(id, feed.getID(), new io.getstream.core.options.KeepHistory(keepHistory)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture getFollowStats( - Iterable followerSlugs, Iterable followingSlugs) throws StreamException { - return client - .getFollowStats( - id, - Iterables.toArray(followerSlugs, String.class), - Iterables.toArray(followingSlugs, String.class)) - .thenApply( - response -> { - try { - return deserializeContainerSingleItem(response, FollowStats.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture updateActivityToTargets( - Activity activity, Iterable add, Iterable remove) throws StreamException { - return updateActivityToTargets( - activity, Iterables.toArray(add, FeedID.class), Iterables.toArray(remove, FeedID.class)); - } - - public final CompletableFuture updateActivityToTargets( - Activity activity, FeedID[] add, FeedID[] remove) throws StreamException { - return client - .updateActivityToTargets(id, activity, add, remove, new FeedID[0]) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture replaceActivityToTargets( - Activity activity, Iterable newTargets) throws StreamException { - return replaceActivityToTargets(activity, Iterables.toArray(newTargets, FeedID.class)); - } - - public final CompletableFuture replaceActivityToTargets( - Activity activity, FeedID... newTargets) throws StreamException { - return client - .updateActivityToTargets(id, activity, new FeedID[0], new FeedID[0], newTargets) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } -} diff --git a/src/main/java/io/getstream/client/FileStorageClient.java b/src/main/java/io/getstream/client/FileStorageClient.java deleted file mode 100644 index d8acb38e..00000000 --- a/src/main/java/io/getstream/client/FileStorageClient.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.getstream.client; - -import static io.getstream.core.utils.Auth.buildFilesToken; - -import io.getstream.core.StreamFiles; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.utils.Auth.TokenAction; -import java.io.File; -import java.net.URL; -import java8.util.concurrent.CompletableFuture; - -public final class FileStorageClient { - private final String secret; - private final StreamFiles files; - - FileStorageClient(String secret, StreamFiles files) { - this.secret = secret; - this.files = files; - } - - public CompletableFuture upload(String fileName, byte[] content) throws StreamException { - final Token token = buildFilesToken(secret, TokenAction.WRITE); - return files.upload(token, fileName, content); - } - - public CompletableFuture upload(File content) throws StreamException { - final Token token = buildFilesToken(secret, TokenAction.WRITE); - return files.upload(token, content); - } - - public CompletableFuture delete(URL url) throws StreamException { - final Token token = buildFilesToken(secret, TokenAction.DELETE); - return files.delete(token, url); - } -} diff --git a/src/main/java/io/getstream/client/FlatFeed.java b/src/main/java/io/getstream/client/FlatFeed.java deleted file mode 100644 index b0df451f..00000000 --- a/src/main/java/io/getstream/client/FlatFeed.java +++ /dev/null @@ -1,732 +0,0 @@ -package io.getstream.client; - -import static io.getstream.core.utils.Serialization.deserializeContainer; - -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.models.Activity; -import io.getstream.core.models.EnrichedActivity; -import io.getstream.core.models.FeedID; -import io.getstream.core.options.*; -import io.getstream.core.utils.DefaultOptions; - -import java.io.IOException; -import java.util.List; - -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public final class FlatFeed extends Feed { - FlatFeed(Client client, FeedID id) { - super(client, id); - } - - public CompletableFuture> getActivities() throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - null); - } - - public CompletableFuture> getActivities(Limit limit) throws StreamException { - return getActivities(limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getActivities(String ranking) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - ranking); - } - - public CompletableFuture> getActivities(Filter filter) throws StreamException { - return getActivities(DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, null); - } - - public CompletableFuture> getActivities(Offset offset) throws StreamException { - return getActivities(DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getActivities(Limit limit, String ranking) - throws StreamException { - return getActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, ranking); - } - - public CompletableFuture> getActivities(Limit limit, Filter filter) - throws StreamException { - return getActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, null); - } - - public CompletableFuture> getActivities(Limit limit, Offset offset) - throws StreamException { - return getActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getActivities(Filter filter, String ranking) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, ranking); - } - - public CompletableFuture> getActivities(Offset offset, String ranking) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, ranking); - } - - public CompletableFuture> getActivities(Limit limit, Filter filter, String ranking) - throws StreamException { - return getActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, ranking); - } - - public CompletableFuture> getActivities(Limit limit, Offset offset, String ranking) - throws StreamException { - return getActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, ranking); - } - - CompletableFuture> getActivities( - Limit limit, Offset offset, Filter filter, String ranking) throws StreamException { - final RequestOption[] options = - ranking == null - ? new RequestOption[] {limit, offset, filter, DefaultOptions.DEFAULT_MARKER} - : new RequestOption[] { - limit, offset, filter, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking) - }; - return getClient() - .getActivities(getID(), options) - .thenApply( - response -> { - try { - return deserializeContainer(response, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - CompletableFuture> getActivities( - Limit limit, Offset offset, Filter filter, String ranking, RankingVars rankingVars) throws StreamException { - - final RequestOption[] options = - ranking == null - ? new RequestOption[] {limit, offset, filter, DefaultOptions.DEFAULT_MARKER} - : new RequestOption[] { - limit, offset, filter, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking), rankingVars - }; - return getClient() - .getActivities(getID(), options) - .thenApply( - response -> { - try { - return deserializeContainer(response, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getActivities(RequestOption... options) - throws StreamException { - // If no options provided, use defaults - if (options == null || options.length == 0) { - options = new RequestOption[] { - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER - }; - } - - return getClient() - .getActivities(getID(), options) - .thenApply( - response -> { - try { - return deserializeContainer(response, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getCustomActivities(Class type) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - null); - } - - public CompletableFuture> getCustomActivities(Class type, Limit limit) - throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getCustomActivities(Class type, String ranking) - throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - ranking); - } - - public CompletableFuture> getCustomActivities(Class type, Filter filter) - throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, null); - } - - public CompletableFuture> getCustomActivities(Class type, Offset offset) - throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, String ranking) throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, ranking); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getCustomActivities(type, limit, DefaultOptions.DEFAULT_OFFSET, filter, null); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getCustomActivities(type, limit, offset, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getCustomActivities( - Class type, Offset offset, String ranking) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, ranking); - } - - public CompletableFuture> getCustomActivities( - Class type, Filter filter, String ranking) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, ranking); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset, String ranking) throws StreamException { - return getCustomActivities(type, limit, offset, DefaultOptions.DEFAULT_FILTER, ranking); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Filter filter, String ranking) throws StreamException { - return getCustomActivities(type, limit, DefaultOptions.DEFAULT_OFFSET, filter, ranking); - } - - CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset, Filter filter, String ranking) - throws StreamException { - final RequestOption[] options = - ranking == null - ? new RequestOption[] {limit, offset, filter, DefaultOptions.DEFAULT_MARKER} - : new RequestOption[] { - limit, offset, filter, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking) - }; - return getClient() - .getActivities(getID(), options) - .thenApply( - response -> { - try { - return deserializeContainer(response, type); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getEnrichedActivities() throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities(Limit limit) - throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities(EnrichmentFlags flags) - throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - flags, - null); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedActivities(String ranking) - throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, String ranking) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - flags, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedActivities(Filter filter) - throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities(Limit limit, Filter filter) - throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, flags, null); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, flags, null); - } - - public CompletableFuture> getEnrichedActivities(Offset offset) - throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities(Limit limit, Offset offset) - throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, String ranking) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, String ranking) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, flags, ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, flags, ranking); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, String ranking) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, String ranking) throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, Filter filter, EnrichmentFlags flags, String ranking) - throws StreamException { - final RequestOption[] options = - ranking == null - ? new RequestOption[] {limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER} - : new RequestOption[] { - limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking) - }; - return getClient() - .getEnrichedActivities(getID(), options) - .thenApply( - response -> { - try { - return deserializeContainer(response, EnrichedActivity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getEnrichedActivities(RequestOption... options) - throws StreamException { - // If no options provided, use defaults - if (options == null || options.length == 0) { - options = new RequestOption[] { - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - DefaultOptions.DEFAULT_MARKER - }; - } - - return getClient() - .getEnrichedActivities(getID(), options) - .thenApply( - response -> { - try { - return deserializeContainer(response, EnrichedActivity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getEnrichedCustomActivities(Class type) - throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities(Class type, Limit limit) - throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - flags, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedCustomActivities(Class type, String ranking) - throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - flags, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedCustomActivities(Class type, Filter filter) - throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, flags, null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, flags, null); - } - - public CompletableFuture> getEnrichedCustomActivities(Class type, Offset offset) - throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, EnrichmentFlags flags, String ranking) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, flags, ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, EnrichmentFlags flags, String ranking) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, flags, ranking); - } - - CompletableFuture> getEnrichedCustomActivities( - Class type, - Limit limit, - Offset offset, - Filter filter, - EnrichmentFlags flags, - String ranking) - throws StreamException { - final RequestOption[] options = - ranking == null - ? new RequestOption[] {limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER} - : new RequestOption[] { - limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking) - }; - return getClient() - .getActivities(getID(), options) - .thenApply( - response -> { - try { - return deserializeContainer(response, type); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } -} diff --git a/src/main/java/io/getstream/client/ImageStorageClient.java b/src/main/java/io/getstream/client/ImageStorageClient.java deleted file mode 100644 index 08849b91..00000000 --- a/src/main/java/io/getstream/client/ImageStorageClient.java +++ /dev/null @@ -1,48 +0,0 @@ -package io.getstream.client; - -import static io.getstream.core.utils.Auth.buildFilesToken; - -import io.getstream.core.StreamImages; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.options.Crop; -import io.getstream.core.options.Resize; -import io.getstream.core.utils.Auth.TokenAction; -import java.io.File; -import java.net.URL; -import java8.util.concurrent.CompletableFuture; - -public final class ImageStorageClient { - private final String secret; - private final StreamImages images; - - ImageStorageClient(String secret, StreamImages images) { - this.secret = secret; - this.images = images; - } - - public CompletableFuture upload(String fileName, byte[] content) throws StreamException { - final Token token = buildFilesToken(secret, TokenAction.WRITE); - return images.upload(token, fileName, content); - } - - public CompletableFuture upload(File content) throws StreamException { - final Token token = buildFilesToken(secret, TokenAction.WRITE); - return images.upload(token, content); - } - - public CompletableFuture delete(URL url) throws StreamException { - final Token token = buildFilesToken(secret, TokenAction.DELETE); - return images.delete(token, url); - } - - public CompletableFuture process(URL url, Crop crop) throws StreamException { - final Token token = buildFilesToken(secret, TokenAction.READ); - return images.process(token, url, crop); - } - - public CompletableFuture process(URL url, Resize resize) throws StreamException { - final Token token = buildFilesToken(secret, TokenAction.READ); - return images.process(token, url, resize); - } -} diff --git a/src/main/java/io/getstream/client/ModerationClient.java b/src/main/java/io/getstream/client/ModerationClient.java deleted file mode 100644 index e6beb12f..00000000 --- a/src/main/java/io/getstream/client/ModerationClient.java +++ /dev/null @@ -1,52 +0,0 @@ -package io.getstream.client; - -import static io.getstream.core.utils.Auth.buildModerationToken; -import static io.getstream.core.utils.Auth.buildReactionsToken; -import static io.getstream.core.utils.Routes.*; -import static io.getstream.core.utils.Serialization.*; - -import io.getstream.core.Moderation; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Response; -import io.getstream.core.http.Token; -import io.getstream.core.utils.Auth; -import java.util.Map; -import java8.util.concurrent.CompletableFuture; - -public class ModerationClient { - private final String secret; - private final Moderation mod; - - ModerationClient(String secret, Moderation mod) { - this.secret = secret; - this.mod = mod; - } - - public CompletableFuture flagUser( - String flaggedUserId,String reportingUser, String reason, Map custom) throws StreamException { - return flag("stream:user", flaggedUserId, reportingUser, reason, custom); - } - - public CompletableFuture flagActivity( - String entityId, String reportingUser, String reason, Map custom) - throws StreamException { - return flag("stream:feeds:v2:activity", entityId, reportingUser, reason, custom); - } - - public CompletableFuture flagReaction( - String entityId, String reportingUser, String reason, Map custom) - throws StreamException { - return flag("stream:feeds:v2:reaction", entityId, reportingUser, reason, custom); - } - - private CompletableFuture flag( - String entityType, - String entityId, - String reportingUser, - String reason, - Map custom) - throws StreamException { - final Token token = buildModerationToken(secret, Auth.TokenAction.WRITE); - return mod.flag(token, entityType, entityId, reportingUser, reason, custom); - } -} diff --git a/src/main/java/io/getstream/client/NotificationFeed.java b/src/main/java/io/getstream/client/NotificationFeed.java deleted file mode 100644 index 5acbc3cb..00000000 --- a/src/main/java/io/getstream/client/NotificationFeed.java +++ /dev/null @@ -1,705 +0,0 @@ -package io.getstream.client; - -import static io.getstream.core.utils.Serialization.*; - -import com.fasterxml.jackson.core.type.TypeReference; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.models.*; -import io.getstream.core.options.*; -import io.getstream.core.utils.DefaultOptions; -import java.io.IOException; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public final class NotificationFeed extends Feed { - NotificationFeed(Client client, FeedID id) { - super(client, id); - } - - public CompletableFuture> getActivities() - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities(Limit limit) - throws StreamException { - return getActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities(Offset offset) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities(Filter filter) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities( - ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker); - } - - public CompletableFuture> getActivities( - Limit limit, Offset offset) throws StreamException { - return getActivities( - limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities( - Limit limit, Filter filter) throws StreamException { - return getActivities( - limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities( - Limit limit, ActivityMarker marker) throws StreamException { - return getActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture> getActivities( - Filter filter, ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture> getActivities( - Offset offset, ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture> getActivities( - Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture> getActivities( - Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - CompletableFuture> getActivities( - Limit limit, Offset offset, Filter filter, ActivityMarker marker) throws StreamException { - return getClient() - .getActivities(getID(), limit, offset, filter, marker) - .thenApply( - response -> { - try { - return deserialize( - response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getCustomActivities(Class type) - throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit) throws StreamException { - return getCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, Offset offset) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, Filter filter) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture> getCustomActivities( - Class type, Filter filter, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture> getCustomActivities( - Class type, Offset offset, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getCustomActivities(type, limit, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getCustomActivities(type, limit, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset, Filter filter, ActivityMarker marker) - throws StreamException { - return getClient() - .getActivities(getID(), limit, offset, filter, marker) - .thenApply( - response -> { - try { - return deserialize(response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getEnrichedActivities() - throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset) throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedActivities( - ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - flags); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getClient() - .getEnrichedActivities(getID(), limit, offset, filter, marker, flags) - .thenApply( - response -> { - try { - return deserialize( - response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - CompletableFuture> getEnrichedCustomActivities( - Class type, - Limit limit, - Offset offset, - Filter filter, - ActivityMarker marker, - EnrichmentFlags flags) - throws StreamException { - return getClient() - .getEnrichedActivities(getID(), limit, offset, filter, marker, flags) - .thenApply( - response -> { - try { - return deserialize(response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } -} diff --git a/src/main/java/io/getstream/client/PersonalizationClient.java b/src/main/java/io/getstream/client/PersonalizationClient.java deleted file mode 100644 index 536a4b5b..00000000 --- a/src/main/java/io/getstream/client/PersonalizationClient.java +++ /dev/null @@ -1,83 +0,0 @@ -package io.getstream.client; - -import static io.getstream.core.utils.Auth.buildPersonalizationToken; - -import com.google.common.collect.ImmutableMap; -import io.getstream.core.StreamPersonalization; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.utils.Auth.TokenAction; -import java.util.Map; -import java8.util.concurrent.CompletableFuture; - -public final class PersonalizationClient { - private final String secret; - private final StreamPersonalization personalization; - - PersonalizationClient(String secret, StreamPersonalization personalization) { - this.secret = secret; - this.personalization = personalization; - } - - public CompletableFuture> get(String resource) throws StreamException { - return get(null, resource); - } - - public CompletableFuture> get(String resource, Map params) - throws StreamException { - return get(null, resource, params); - } - - public CompletableFuture> get(String userID, String resource) - throws StreamException { - return get(userID, resource, ImmutableMap.of()); - } - - public CompletableFuture> get( - String userID, String resource, Map params) throws StreamException { - final Token token = buildPersonalizationToken(secret, userID, TokenAction.READ); - return personalization.get(token, userID, resource, params); - } - - public CompletableFuture post(String resource, Map payload) - throws StreamException { - return post(null, resource, payload); - } - - public CompletableFuture post( - String resource, Map params, Map payload) - throws StreamException { - return post(null, resource, params, payload); - } - - public CompletableFuture post(String userID, String resource, Map payload) - throws StreamException { - return post(userID, resource, ImmutableMap.of(), payload); - } - - public CompletableFuture post( - String userID, String resource, Map params, Map payload) - throws StreamException { - final Token token = buildPersonalizationToken(secret, userID, TokenAction.WRITE); - return personalization.post(token, userID, resource, params, payload); - } - - public CompletableFuture delete(String resource) throws StreamException { - return delete(null, resource); - } - - public CompletableFuture delete(String resource, Map params) - throws StreamException { - return delete(null, resource, params); - } - - public CompletableFuture delete(String userID, String resource) throws StreamException { - return delete(userID, resource, ImmutableMap.of()); - } - - public CompletableFuture delete(String userID, String resource, Map params) - throws StreamException { - final Token token = buildPersonalizationToken(secret, userID, TokenAction.DELETE); - return personalization.delete(token, userID, resource, params); - } -} diff --git a/src/main/java/io/getstream/client/QueryAuditLogsFilters.java b/src/main/java/io/getstream/client/QueryAuditLogsFilters.java deleted file mode 100644 index 991ba18f..00000000 --- a/src/main/java/io/getstream/client/QueryAuditLogsFilters.java +++ /dev/null @@ -1,202 +0,0 @@ -package io.getstream.client; - -import io.getstream.core.exceptions.StreamException; - -/** - * Filters for querying audit logs. - * Either entityType+entityID pair OR userID is required by the API. - * - * Common entity types in Stream include: - * - "activity" - for feed activities - * - "reaction" - for activity reactions - * - "user" - for Stream users - * - "feed" - for feed configurations - */ -public class QueryAuditLogsFilters { - private String entityType; - private String entityID; - private String userID; - - /** - * Private constructor, use builder instead. - */ - private QueryAuditLogsFilters() { - } - - /** - * Creates a new builder for QueryAuditLogsFilters. - * - * @return a new QueryAuditLogsFilters.Builder - */ - public static Builder builder() { - return new Builder(); - } - - /** - * Creates a new filter for user ID queries. - * - * @param userID The ID of the user - * @return a new QueryAuditLogsFilters with the user ID set - */ - public static QueryAuditLogsFilters forUser(String userID) { - return builder().withUserID(userID).build(); - } - - /** - * Creates a new filter for entity type and ID queries. - * - * @param entityType The type of entity (e.g., "activity", "reaction", "user", "feed") - * @param entityID The ID of the entity - * @return a new QueryAuditLogsFilters with the entity type and ID set - */ - public static QueryAuditLogsFilters forEntity(String entityType, String entityID) { - return builder().withEntityType(entityType).withEntityID(entityID).build(); - } - - /** - * Convenience method to create a filter for activity entities. - * - * @param activityID The ID of the activity - * @return a new QueryAuditLogsFilters for the activity - */ - public static QueryAuditLogsFilters forActivity(String activityID) { - return forEntity("activity", activityID); - } - - /** - * Convenience method to create a filter for reaction entities. - * - * @param reactionID The ID of the reaction - * @return a new QueryAuditLogsFilters for the reaction - */ - public static QueryAuditLogsFilters forReaction(String reactionID) { - return forEntity("reaction", reactionID); - } - - public String getEntityType() { - return entityType; - } - - public String getEntityID() { - return entityID; - } - - public String getUserID() { - return userID; - } - - /** - * Set the entity type for existing filter instance. - * - * @param entityType The type of entity (e.g., "activity", "reaction") - * @return this instance for method chaining - */ - public QueryAuditLogsFilters setEntityType(String entityType) { - this.entityType = entityType; - return this; - } - - /** - * Set the entity ID for existing filter instance. - * - * @param entityID The ID of the entity - * @return this instance for method chaining - */ - public QueryAuditLogsFilters setEntityID(String entityID) { - this.entityID = entityID; - return this; - } - - /** - * Set the user ID for existing filter instance. - * - * @param userID The ID of the user - * @return this instance for method chaining - */ - public QueryAuditLogsFilters setUserID(String userID) { - this.userID = userID; - return this; - } - - /** - * Validates that the filters contain the required fields. - * Either (entityType AND entityID) OR userID must be set. - * - * @throws StreamException if the required fields are not set - */ - public void validate() throws StreamException { - boolean hasEntityFields = entityType != null && !entityType.isEmpty() && - entityID != null && !entityID.isEmpty(); - boolean hasUserID = userID != null && !userID.isEmpty(); - - if (!hasEntityFields && !hasUserID) { - throw new StreamException("Either entityType+entityID or userID is required for audit logs queries"); - } - } - - /** - * Checks if the filter is valid according to API requirements. - * - * @return true if either (entityType AND entityID) OR userID is set - */ - public boolean isValid() { - boolean hasEntityFields = entityType != null && !entityType.isEmpty() && - entityID != null && !entityID.isEmpty(); - boolean hasUserID = userID != null && !userID.isEmpty(); - - return hasEntityFields || hasUserID; - } - - /** - * Builder class for QueryAuditLogsFilters. - */ - public static class Builder { - private final QueryAuditLogsFilters filters; - - private Builder() { - filters = new QueryAuditLogsFilters(); - } - - /** - * Set the entity type. - * - * @param entityType The type of entity (e.g., "activity", "reaction") - * @return this builder for method chaining - */ - public Builder withEntityType(String entityType) { - filters.entityType = entityType; - return this; - } - - /** - * Set the entity ID. - * - * @param entityID The ID of the entity - * @return this builder for method chaining - */ - public Builder withEntityID(String entityID) { - filters.entityID = entityID; - return this; - } - - /** - * Set the user ID. - * - * @param userID The ID of the user - * @return this builder for method chaining - */ - public Builder withUserID(String userID) { - filters.userID = userID; - return this; - } - - /** - * Builds the QueryAuditLogsFilters instance. - * - * @return a new QueryAuditLogsFilters instance - */ - public QueryAuditLogsFilters build() { - return filters; - } - } -} \ No newline at end of file diff --git a/src/main/java/io/getstream/client/QueryAuditLogsPager.java b/src/main/java/io/getstream/client/QueryAuditLogsPager.java deleted file mode 100644 index 8b78da59..00000000 --- a/src/main/java/io/getstream/client/QueryAuditLogsPager.java +++ /dev/null @@ -1,44 +0,0 @@ -package io.getstream.client; - -public class QueryAuditLogsPager { - private String next; - private String prev; - private int limit; - - public QueryAuditLogsPager() { - } - - public QueryAuditLogsPager(int limit) { - this.limit = limit; - } - - public QueryAuditLogsPager(String next, String prev, int limit) { - this.next = next; - this.prev = prev; - this.limit = limit; - } - - public String getNext() { - return next; - } - - public void setNext(String next) { - this.next = next; - } - - public String getPrev() { - return prev; - } - - public void setPrev(String prev) { - this.prev = prev; - } - - public int getLimit() { - return limit; - } - - public void setLimit(int limit) { - this.limit = limit; - } -} \ No newline at end of file diff --git a/src/main/java/io/getstream/client/QueryAuditLogsResponse.java b/src/main/java/io/getstream/client/QueryAuditLogsResponse.java deleted file mode 100644 index 1739ba3a..00000000 --- a/src/main/java/io/getstream/client/QueryAuditLogsResponse.java +++ /dev/null @@ -1,86 +0,0 @@ -package io.getstream.client; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.base.MoreObjects; -import io.getstream.core.models.AuditLog; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class QueryAuditLogsResponse { - @JsonProperty("audit_logs") - private List auditLogs; - - private String next; - private String prev; - private String duration; - - // Default constructor - public QueryAuditLogsResponse() { - this.auditLogs = new ArrayList<>(); - } - - // Constructor with parameters - @JsonCreator - public QueryAuditLogsResponse( - @JsonProperty("audit_logs") List auditLogs, - @JsonProperty("next") String next, - @JsonProperty("prev") String prev, - @JsonProperty("duration") String duration) { - // Initialize mandatory fields with safe defaults if they're null - this.auditLogs = auditLogs != null ? auditLogs : new ArrayList<>(); - this.next = next; - this.prev = prev; - this.duration = duration != null ? duration : ""; - } - - public List getAuditLogs() { - return auditLogs; - } - - public String getNext() { - return next; - } - - public String getPrev() { - return prev; - } - - public String getDuration() { - return duration; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QueryAuditLogsResponse that = (QueryAuditLogsResponse) o; - return Objects.equals(auditLogs, that.auditLogs) && - Objects.equals(next, that.next) && - Objects.equals(prev, that.prev) && - Objects.equals(duration, that.duration); - } - - @Override - public int hashCode() { - return Objects.hash(auditLogs, next, prev, duration); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("auditLogs", this.auditLogs) - .add("next", this.next) - .add("prev", this.prev) - .add("duration", this.duration) - .toString(); - } -} \ No newline at end of file diff --git a/src/main/java/io/getstream/client/ReactionsClient.java b/src/main/java/io/getstream/client/ReactionsClient.java deleted file mode 100644 index 179284fc..00000000 --- a/src/main/java/io/getstream/client/ReactionsClient.java +++ /dev/null @@ -1,274 +0,0 @@ -package io.getstream.client; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Auth.buildReactionsToken; - -import com.google.common.collect.Iterables; -import io.getstream.core.LookupKind; -import io.getstream.core.StreamReactions; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.models.FeedID; -import io.getstream.core.models.Paginated; -import io.getstream.core.models.Reaction; -import io.getstream.core.models.ReactionBatch; -import io.getstream.core.options.Filter; -import io.getstream.core.options.Limit; -import io.getstream.core.options.RequestOption; -import io.getstream.core.utils.Auth.TokenAction; -import io.getstream.core.utils.DefaultOptions; -import java.util.List; -import java.util.Map; -import java8.util.concurrent.CompletableFuture; - -public final class ReactionsClient { - private final String secret; - private final StreamReactions reactions; - - ReactionsClient(String secret, StreamReactions reactions) { - this.secret = secret; - this.reactions = reactions; - } - - public CompletableFuture get(String id) throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.READ); - return reactions.get(token, id); - } - - public CompletableFuture getBatch(List ids) throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.READ); - return reactions.getBatchReactions(token, ids, false); - } - - public CompletableFuture getBatch(List ids, Boolean includeDeleted) throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.READ); - return reactions.getBatchReactions(token, ids, includeDeleted); - } - - public CompletableFuture> filter(LookupKind lookup, String id) - throws StreamException { - return filter(lookup, id, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_LIMIT, ""); - } - - public CompletableFuture> filter( - LookupKind lookup, String id, Filter filter, Limit limit, String kind, Boolean withOwnChildren, String filterUserID) - throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.READ); - return reactions.filter(token, lookup, id, filter, limit, kind, withOwnChildren, filterUserID); - } - - public CompletableFuture> filter(LookupKind lookup, String id, Limit limit) - throws StreamException { - return filter(lookup, id, DefaultOptions.DEFAULT_FILTER, limit, ""); - } - - public CompletableFuture> filter(LookupKind lookup, String id, Filter filter) - throws StreamException { - return filter(lookup, id, filter, DefaultOptions.DEFAULT_LIMIT, ""); - } - - public CompletableFuture> filter(LookupKind lookup, String id, String kind) - throws StreamException { - return filter(lookup, id, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_LIMIT, kind); - } - - public CompletableFuture> filter( - LookupKind lookup, String id, Filter filter, Limit limit) throws StreamException { - return filter(lookup, id, filter, limit, ""); - } - - public CompletableFuture> filter( - LookupKind lookup, String id, Limit limit, String kind) throws StreamException { - return filter(lookup, id, DefaultOptions.DEFAULT_FILTER, limit, kind); - } - - public CompletableFuture> filter( - LookupKind lookup, String id, Filter filter, Limit limit, String kind) - throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.READ); - return reactions.filter(token, lookup, id, filter, limit, kind); - } - - public CompletableFuture> filter( - LookupKind lookup, String id, Filter filter, Limit limit, String kind, Boolean withOwnChildren) - throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.READ); - return reactions.filter(token, lookup, id, filter, limit, kind, withOwnChildren, ""); - } - - public CompletableFuture> paginatedFilter(LookupKind lookup, String id) - throws StreamException { - return paginatedFilter( - lookup, id, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_LIMIT, "", false); - } - - public CompletableFuture> paginatedFilter( - LookupKind lookup, String id, Limit limit) throws StreamException { - return paginatedFilter(lookup, id, DefaultOptions.DEFAULT_FILTER, limit, "", false); - } - - public CompletableFuture> paginatedFilter( - LookupKind lookup, String id, Filter filter) throws StreamException { - return paginatedFilter(lookup, id, filter, DefaultOptions.DEFAULT_LIMIT, "", false); - } - - public CompletableFuture> paginatedFilter( - LookupKind lookup, String id, String kind) throws StreamException { - return paginatedFilter( - lookup, id, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_LIMIT, kind, false); - } - - public CompletableFuture> paginatedFilter( - LookupKind lookup, String id, Filter filter, Limit limit) throws StreamException { - return paginatedFilter(lookup, id, filter, limit, "", false); - } - - public CompletableFuture> paginatedFilter( - LookupKind lookup, String id, Limit limit, String kind) throws StreamException { - return paginatedFilter(lookup, id, DefaultOptions.DEFAULT_FILTER, limit, kind, false); - } - - public CompletableFuture> paginatedFilter( - LookupKind lookup, String id, Filter filter, Limit limit, String kind, Boolean withOwnChildren) - throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.READ); - return reactions.paginatedFilter(token, lookup, id, filter, limit, kind, withOwnChildren); - } - - public CompletableFuture> paginatedFilter(String next) - throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.READ); - return reactions.paginatedFilter(token, next); - } - - public CompletableFuture add( - String userID, String kind, String activityID, Iterable targetFeeds) - throws StreamException { - return add(userID, kind, activityID, Iterables.toArray(targetFeeds, FeedID.class)); - } - - public CompletableFuture add( - String userID, String kind, String activityID, FeedID... targetFeeds) throws StreamException { - checkNotNull(kind, "Reaction kind can't be null"); - checkArgument(!kind.isEmpty(), "Reaction kind can't be empty"); - checkNotNull(activityID, "Reaction activity id can't be null"); - checkArgument(!activityID.isEmpty(), "Reaction activity id can't be empty"); - - return add(userID, Reaction.builder().activityID(activityID).kind(kind).build(), targetFeeds); - } - - public CompletableFuture add( - String userID, Reaction reaction, Iterable targetFeeds) throws StreamException { - return add(userID, reaction, Iterables.toArray(targetFeeds, FeedID.class)); - } - - public CompletableFuture add(String userID, Reaction reaction, FeedID... targetFeeds) - throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.WRITE); - return reactions.add(token, userID, reaction, targetFeeds); - } - - public CompletableFuture add( - String userID, Reaction reaction, FeedID[] targetFeeds, RequestOption... options) - throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.WRITE); - return reactions.add(token, userID, reaction, targetFeeds, null, options); - } - - public CompletableFuture add( - String userID, Reaction reaction, FeedID[] targetFeeds, - Map targetFeedsExtraData, RequestOption... options) throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.WRITE); - return reactions.add(token, userID, reaction, targetFeeds, targetFeedsExtraData, options); - } - - public CompletableFuture addChild( - String userID, String kind, String parentID, Iterable targetFeeds) - throws StreamException { - Reaction child = Reaction.builder().kind(kind).parent(parentID).build(); - return add(userID, child, targetFeeds); - } - - public CompletableFuture addChild( - String userID, String kind, String parentID, FeedID... targetFeeds) throws StreamException { - Reaction child = Reaction.builder().kind(kind).parent(parentID).build(); - return add(userID, child, targetFeeds); - } - - public CompletableFuture addChild( - String userID, String kind, String parentID, FeedID[] targetFeeds, Map targetFeedsExtraData) throws StreamException { - Reaction child = Reaction.builder().kind(kind).parent(parentID).build(); - return add(userID, child, targetFeeds, targetFeedsExtraData); - } - - public CompletableFuture addChild( - String userID, String parentID, Reaction reaction, Iterable targetFeeds) - throws StreamException { - Reaction child = Reaction.builder().fromReaction(reaction).parent(parentID).build(); - return add(userID, child, targetFeeds); - } - - public CompletableFuture addChild( - String userID, String parentID, Reaction reaction, FeedID... targetFeeds) - throws StreamException { - Reaction child = Reaction.builder().fromReaction(reaction).parent(parentID).build(); - return add(userID, child, targetFeeds); - } - - public CompletableFuture addChild( - String userID, String parentID, Reaction reaction, FeedID[] targetFeeds, Map targetFeedsExtraData) - throws StreamException { - Reaction child = Reaction.builder().fromReaction(reaction).parent(parentID).build(); - return add(userID, child, targetFeeds, targetFeedsExtraData); - } - - public CompletableFuture update(String id, Iterable targetFeeds) - throws StreamException { - return update(id, Iterables.toArray(targetFeeds, FeedID.class)); - } - - public CompletableFuture update(String id, FeedID... targetFeeds) throws StreamException { - checkNotNull(id, "Reaction id can't be null"); - checkArgument(!id.isEmpty(), "Reaction id can't be empty"); - - return update(Reaction.builder().id(id).build(), targetFeeds); - } - - public CompletableFuture update(Reaction reaction, Iterable targetFeeds) - throws StreamException { - return update(reaction, Iterables.toArray(targetFeeds, FeedID.class)); - } - - public CompletableFuture update(Reaction reaction, FeedID... targetFeeds) - throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.WRITE); - return reactions.update(token, reaction, targetFeeds); - } - - public CompletableFuture update( - Reaction reaction, FeedID[] targetFeeds, RequestOption... options) throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.WRITE); - return reactions.update(token, reaction, targetFeeds, options); - } - - public CompletableFuture delete(String id) throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.DELETE); - return reactions.delete(token, id, false); - } - - public CompletableFuture delete(String id, Boolean soft) throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.DELETE); - return reactions.delete(token, id, soft); - } - - public CompletableFuture softDelete(String id) throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.DELETE); - return reactions.delete(token, id, true); - } - - public CompletableFuture restore(String id) throws StreamException { - final Token token = buildReactionsToken(secret, TokenAction.WRITE); - return reactions.restore(token, id); - } -} diff --git a/src/main/java/io/getstream/client/User.java b/src/main/java/io/getstream/client/User.java deleted file mode 100644 index 76b399dc..00000000 --- a/src/main/java/io/getstream/client/User.java +++ /dev/null @@ -1,117 +0,0 @@ -package io.getstream.client; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.deserialize; -import static io.getstream.core.utils.Serialization.deserializeError; - -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.models.Data; -import io.getstream.core.models.ProfileData; -import java.io.IOException; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public final class User { - private final Client client; - private final String id; - - public User(Client client, String id) { - checkNotNull(client, "Client can't be null"); - checkNotNull(id, "User ID can't be null"); - checkArgument(!id.isEmpty(), "User ID can't be empty"); - - this.client = client; - this.id = id; - } - - public String getID() { - return id; - } - - public CompletableFuture get() throws StreamException { - return client - .getUser(id) - .thenApply( - response -> { - try { - return deserialize(response, Data.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture delete() throws StreamException { - return client - .deleteUser(id) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture getOrCreate() throws StreamException { - return getOrCreate(new Data()); - } - - public CompletableFuture getOrCreate(Data data) throws StreamException { - return client - .getOrCreateUser(id, data) - .thenApply( - response -> { - try { - return deserialize(response, Data.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture create() throws StreamException { - return create(new Data()); - } - - public CompletableFuture create(Data data) throws StreamException { - return client - .createUser(id, data) - .thenApply( - response -> { - try { - return deserialize(response, Data.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture update(Data data) throws StreamException { - return client - .updateUser(id, data) - .thenApply( - response -> { - try { - return deserialize(response, Data.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture profile() throws StreamException { - return client - .userProfile(id) - .thenApply( - response -> { - try { - return deserialize(response, ProfileData.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } -} diff --git a/src/main/java/io/getstream/cloud/CloudAggregatedFeed.java b/src/main/java/io/getstream/cloud/CloudAggregatedFeed.java deleted file mode 100644 index 7c4f8030..00000000 --- a/src/main/java/io/getstream/cloud/CloudAggregatedFeed.java +++ /dev/null @@ -1,711 +0,0 @@ -package io.getstream.cloud; - -import static io.getstream.core.utils.Serialization.deserializeContainer; - -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Response; -import io.getstream.core.models.Activity; -import io.getstream.core.models.EnrichedActivity; -import io.getstream.core.models.FeedID; -import io.getstream.core.models.Group; -import io.getstream.core.options.*; -import io.getstream.core.utils.DefaultOptions; -import java.io.IOException; -import java.util.List; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public class CloudAggregatedFeed extends CloudFeed { - CloudAggregatedFeed(CloudClient client, FeedID id) { - super(client, id); - } - - CloudAggregatedFeed(CloudClient client, FeedID id, FeedSubscriber subscriber) { - super(client, id, subscriber); - } - - public CompletableFuture>> getActivities() - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities(Limit limit) - throws StreamException { - return getActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities(Offset offset) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities(Filter filter) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities( - ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker); - } - - public CompletableFuture>> getActivities( - Limit limit, Offset offset) throws StreamException { - return getActivities( - limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities( - Limit limit, Filter filter) throws StreamException { - return getActivities( - limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getActivities( - Limit limit, ActivityMarker marker) throws StreamException { - return getActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture>> getActivities( - Filter filter, ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture>> getActivities( - Offset offset, ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture>> getActivities( - Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture>> getActivities( - Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - CompletableFuture>> getActivities( - Limit limit, Offset offset, Filter filter, ActivityMarker marker) throws StreamException { - return getClient() - .getActivities(getID(), limit, offset, filter, marker) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, Group.class, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture>> getCustomActivities( - Class type) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit) throws StreamException { - return getCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, Offset offset) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, Filter filter) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture>> getCustomActivities( - Class type, Filter filter, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture>> getCustomActivities( - Class type, Offset offset, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getCustomActivities(type, limit, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture>> getCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getCustomActivities(type, limit, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - CompletableFuture>> getCustomActivities( - Class type, Limit limit, Offset offset, Filter filter, ActivityMarker marker) - throws StreamException { - return getClient() - .getActivities(getID(), limit, offset, filter, marker) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, Group.class, type); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture>> - getEnrichedActivities() throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedActivities( - Offset offset) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Filter filter) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Offset offset) throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Filter filter) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedActivities( - Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedActivities( - Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Filter filter, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Offset offset, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture>> getEnrichedActivities( - Limit limit, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - CompletableFuture>> getEnrichedActivities( - Limit limit, Offset offset, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getClient() - .getEnrichedActivities(getID(), limit, offset, filter, marker, flags) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, Group.class, EnrichedActivity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Offset offset) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Filter filter) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture>> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - CompletableFuture>> getEnrichedCustomActivities( - Class type, - Limit limit, - Offset offset, - Filter filter, - ActivityMarker marker, - EnrichmentFlags flags) - throws StreamException { - return getClient() - .getEnrichedActivities(getID(), limit, offset, filter, marker, flags) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, Group.class, type); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } -} diff --git a/src/main/java/io/getstream/cloud/CloudAnalyticsClient.java b/src/main/java/io/getstream/cloud/CloudAnalyticsClient.java deleted file mode 100644 index 30392bd6..00000000 --- a/src/main/java/io/getstream/cloud/CloudAnalyticsClient.java +++ /dev/null @@ -1,32 +0,0 @@ -package io.getstream.cloud; - -import com.google.common.collect.Iterables; -import io.getstream.core.StreamAnalytics; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.models.Engagement; -import io.getstream.core.models.Impression; -import java8.util.concurrent.CompletableFuture; - -public final class CloudAnalyticsClient { - private final Token token; - private final StreamAnalytics analytics; - - CloudAnalyticsClient(Token token, StreamAnalytics analytics) { - this.token = token; - this.analytics = analytics; - } - - public CompletableFuture trackEngagement(Iterable events) - throws StreamException { - return trackEngagement(Iterables.toArray(events, Engagement.class)); - } - - public CompletableFuture trackEngagement(Engagement... events) throws StreamException { - return analytics.trackEngagement(token, events); - } - - public CompletableFuture trackImpression(Impression event) throws StreamException { - return analytics.trackImpression(token, event); - } -} diff --git a/src/main/java/io/getstream/cloud/CloudClient.java b/src/main/java/io/getstream/cloud/CloudClient.java deleted file mode 100644 index 328cb8a4..00000000 --- a/src/main/java/io/getstream/cloud/CloudClient.java +++ /dev/null @@ -1,407 +0,0 @@ -package io.getstream.cloud; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -import io.getstream.core.Region; -import io.getstream.core.Stream; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.faye.DefaultMessageTransformer; -import io.getstream.core.faye.Message; -import io.getstream.core.faye.client.FayeClient; -import io.getstream.core.faye.subscription.ChannelSubscription; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.OKHTTPClientAdapter; -import io.getstream.core.http.Response; -import io.getstream.core.http.Token; -import io.getstream.core.models.Activity; -import io.getstream.core.models.Data; -import io.getstream.core.models.FeedID; -import io.getstream.core.models.OGData; -import io.getstream.core.models.RealtimeMessage; -import io.getstream.core.options.RequestOption; -import io.getstream.core.utils.Serialization; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; -import java8.util.concurrent.CompletableFuture; - -public final class CloudClient { - private final String apiKey; - private final Token token; - private final String appID; - private final String userID; - private final Stream stream; - private final FayeClient faye; - - private CloudClient( - String key, - Token token, - String userID, - String appID, - URL baseURL, - HTTPClient httpClient, - URL fayeURL) { - this.apiKey = key; - this.token = token; - this.appID = appID; - this.userID = userID; - this.stream = new Stream(key, baseURL, httpClient); - this.faye = new FayeClient(fayeURL); - this.faye.setMessageTransformer(new FayeMessageTransformer()); - } - - public static Builder builder(String apiKey, String token, String userID) { - return new Builder(apiKey, new Token(token), userID); - } - - public static Builder builder(String apiKey, Token token, String userID) { - return new Builder(apiKey, token, userID); - } - - public static Builder builder(String apiKey, Token token, String userID, String appID) { - return new Builder(apiKey, token, userID, appID); - } - - public static final class Builder { - private static final String DEFAULT_HOST = "stream-io-api.com"; - private static final String DEFAULT_FAYE_URL = "https://faye-us-east.stream-io-api.com/faye"; - - private final String apiKey; - private final Token token; - private final String userID; - private final String appID; - private HTTPClient httpClient; - - private String scheme = "https"; - private String region = Region.US_EAST.toString(); - private String host = DEFAULT_HOST; - private int port = 443; - private String fayeURL = DEFAULT_FAYE_URL; - - public Builder(String apiKey, Token token, String userID) { - checkNotNull(apiKey, "API key can't be null"); - checkNotNull(token, "Token can't be null"); - checkNotNull(userID, "User ID can't be null"); - checkArgument(!apiKey.isEmpty(), "API key can't be empty"); - checkArgument(!userID.isEmpty(), "User ID can't be empty"); - this.apiKey = apiKey; - this.token = token; - this.userID = userID; - this.appID = null; - } - - public Builder(String apiKey, Token token, String userID, String appID) { - checkNotNull(apiKey, "API key can't be null"); - checkNotNull(token, "Token can't be null"); - checkNotNull(userID, "User ID can't be null"); - checkArgument(!apiKey.isEmpty(), "API key can't be empty"); - checkArgument(!userID.isEmpty(), "User ID can't be empty"); - this.apiKey = apiKey; - this.token = token; - this.userID = userID; - this.appID = appID; - } - - public Builder httpClient(HTTPClient httpClient) { - checkNotNull(httpClient, "HTTP client can't be null"); - this.httpClient = httpClient; - return this; - } - - public Builder scheme(String scheme) { - checkNotNull(scheme, "Scheme can't be null"); - checkArgument(!scheme.isEmpty(), "Scheme can't be empty"); - this.scheme = scheme; - return this; - } - - public Builder host(String host) { - checkNotNull(host, "Host can't be null"); - checkArgument(!host.isEmpty(), "Host can't be empty"); - this.host = host; - return this; - } - - public Builder port(int port) { - checkArgument(port > 0, "Port has to be a non-zero positive number"); - this.port = port; - return this; - } - - public Builder region(Region region) { - checkNotNull(region, "Region can't be null"); - this.region = region.toString(); - return this; - } - - public Builder region(String region) { - checkNotNull(region, "Region can't be null"); - checkArgument(!region.isEmpty(), "Region can't be empty"); - this.region = region; - return this; - } - - public Builder fayeURL(String fayeURL) { - checkNotNull(fayeURL, "FayeUrl can't be null"); - checkArgument(!fayeURL.isEmpty(), "FayeUrl can't be empty"); - this.fayeURL = fayeURL; - return this; - } - - private String buildHost() { - final StringBuilder sb = new StringBuilder(); - if (host.equals(DEFAULT_HOST)) { - sb.append(region).append("."); - } - sb.append(host); - return sb.toString(); - } - - public CloudClient build() throws MalformedURLException { - if (httpClient == null) { - httpClient = new OKHTTPClientAdapter(); - } - - return new CloudClient( - apiKey, - token, - userID, - appID, - new URL(scheme, buildHost(), port, ""), - httpClient, - new URL(DEFAULT_FAYE_URL)); - } - } - - private static class FeedSubscription { - private String token; - private String userId; - private ChannelSubscription channelSubscription; - - private FeedSubscription(String token, String userId) { - this.token = token; - this.userId = userId; - } - - private FeedSubscription(String token, String userId, ChannelSubscription subscription) { - this.token = token; - this.userId = userId; - this.channelSubscription = subscription; - } - } - - private final Map feedSubscriptions = new HashMap<>(); - - private class FayeMessageTransformer extends DefaultMessageTransformer { - @Override - public Message transformRequest(Message message) { - final String subscription = message.getSubscription(); - if (feedSubscriptions.containsKey(subscription)) { - final FeedSubscription feedSubscription = feedSubscriptions.get(subscription); - final Map ext = new HashMap<>(); - ext.put("user_id", feedSubscription.userId); - ext.put("api_key", apiKey); - ext.put("signature", feedSubscription.token); - message.setExt(ext); - } - return message; - } - } - - public T getHTTPClientImplementation() { - return stream.getHTTPClientImplementation(); - } - - public CompletableFuture openGraph(URL url) throws StreamException { - return stream.openGraph(token, url); - } - - private CompletableFuture feedSubscriber( - FeedID feedId, RealtimeMessageCallback messageCallback) { - final CompletableFuture subscriberCompletion = new CompletableFuture<>(); - try { - checkNotNull(appID, "Missing app id, which is needed in order to subscribe feed"); - final String claim = feedId.getClaim(); - final String notificationChannel = "site" + "-" + appID + "-" + "feed" + "-" + claim; - final FeedSubscription subscription = - new FeedSubscription(token.toString(), notificationChannel); - feedSubscriptions.put("/" + notificationChannel, subscription); - - final ChannelSubscription channelSubscription = - faye.subscribe( - "/" + notificationChannel, - data -> { - try { - final byte[] payload = Serialization.toJSON(data); - final RealtimeMessage message = - Serialization.fromJSON(new String(payload), RealtimeMessage.class); - messageCallback.onMessage(message); - } catch (Exception e) { - e.printStackTrace(); - } - }, - () -> feedSubscriptions.remove("/" + notificationChannel)) - .get(); - - subscription.channelSubscription = channelSubscription; - feedSubscriptions.put("/" + notificationChannel, subscription); - subscriberCompletion.complete(channelSubscription); - } catch (Exception e) { - subscriberCompletion.completeExceptionally(e); - } - return subscriberCompletion; - } - - // TODO: add personalized feed versions - public CloudFlatFeed flatFeed(String slug) { - return flatFeed(slug, userID); - } - - public CloudFlatFeed flatFeed(String slug, CloudUser user) { - return flatFeed(slug, user.getID()); - } - - public CloudFlatFeed flatFeed(String slug, String userID) { - return flatFeed(new FeedID(slug, userID)); - } - - public CloudFlatFeed flatFeed(FeedID id) { - return new CloudFlatFeed(this, id, this::feedSubscriber); - } - - public CloudAggregatedFeed aggregatedFeed(String slug) { - return aggregatedFeed(slug, userID); - } - - public CloudAggregatedFeed aggregatedFeed(String slug, CloudUser user) { - return aggregatedFeed(slug, user.getID()); - } - - public CloudAggregatedFeed aggregatedFeed(String slug, String userID) { - return aggregatedFeed(new FeedID(slug, userID)); - } - - public CloudAggregatedFeed aggregatedFeed(FeedID id) { - return new CloudAggregatedFeed(this, id, this::feedSubscriber); - } - - public CloudNotificationFeed notificationFeed(String slug) { - return notificationFeed(slug, userID); - } - - public CloudNotificationFeed notificationFeed(String slug, CloudUser user) { - return notificationFeed(slug, user.getID()); - } - - public CloudNotificationFeed notificationFeed(String slug, String userID) { - return notificationFeed(new FeedID(slug, userID)); - } - - public CloudNotificationFeed notificationFeed(FeedID id) { - return new CloudNotificationFeed(this, id, this::feedSubscriber); - } - - public CloudUser user(String userID) { - return new CloudUser(this, userID); - } - - public CloudAnalyticsClient analytics() { - return new CloudAnalyticsClient(token, stream.analytics()); - } - - public CloudCollectionsClient collections() { - return new CloudCollectionsClient(token, userID, stream.collections()); - } - - public CloudReactionsClient reactions() { - return new CloudReactionsClient(token, userID, stream.reactions()); - } - - public CloudFileStorageClient files() { - return new CloudFileStorageClient(token, stream.files()); - } - - public CloudImageStorageClient images() { - return new CloudImageStorageClient(token, stream.images()); - } - - CompletableFuture getActivities(FeedID feed, RequestOption... options) - throws StreamException { - return stream.getActivities(token, feed, options); - } - - CompletableFuture getEnrichedActivities(FeedID feed, RequestOption... options) - throws StreamException { - return stream.getEnrichedActivities(token, feed, options); - } - - CompletableFuture addActivity(FeedID feed, Activity activity, RequestOption... options) - throws StreamException { - return stream.addActivity(token, feed, activity, options); - } - - CompletableFuture addActivities(FeedID feed, Activity... activities) - throws StreamException { - return addActivities(feed, activities, new RequestOption[0]); - } - - CompletableFuture addActivities( - FeedID feed, Activity[] activities, RequestOption... options) throws StreamException { - return stream.addActivities(token, feed, activities, options); - } - - CompletableFuture removeActivityByID(FeedID feed, String id) throws StreamException { - return stream.removeActivityByID(token, feed, id); - } - - CompletableFuture removeActivityByForeignID(FeedID feed, String foreignID) - throws StreamException { - return stream.removeActivityByForeignID(token, feed, foreignID); - } - - CompletableFuture follow(FeedID source, FeedID target, int activityCopyLimit) - throws StreamException { - return stream.follow(token, token, source, target, activityCopyLimit); - } - - CompletableFuture getFollowers(FeedID feed, RequestOption... options) - throws StreamException { - return stream.getFollowers(token, feed, options); - } - - CompletableFuture getFollowed(FeedID feed, RequestOption... options) - throws StreamException { - return stream.getFollowed(token, feed, options); - } - - CompletableFuture unfollow(FeedID source, FeedID target, RequestOption... options) - throws StreamException { - return stream.unfollow(token, source, target, options); - } - - CompletableFuture getUser(String id) throws StreamException { - return stream.getUser(token, id, false); - } - - CompletableFuture deleteUser(String id) throws StreamException { - return stream.deleteUser(token, id); - } - - CompletableFuture getOrCreateUser(String id, Data data) throws StreamException { - return stream.createUser(token, id, data, true); - } - - CompletableFuture createUser(String id, Data data) throws StreamException { - return stream.createUser(token, id, data, false); - } - - CompletableFuture updateUser(String id, Data data) throws StreamException { - return stream.updateUser(token, id, data); - } - - CompletableFuture userProfile(String id) throws StreamException { - return stream.getUser(token, id, true); - } -} diff --git a/src/main/java/io/getstream/cloud/CloudCollectionsClient.java b/src/main/java/io/getstream/cloud/CloudCollectionsClient.java deleted file mode 100644 index 969220d0..00000000 --- a/src/main/java/io/getstream/cloud/CloudCollectionsClient.java +++ /dev/null @@ -1,75 +0,0 @@ -package io.getstream.cloud; - -import static io.getstream.core.utils.Serialization.convert; - -import io.getstream.core.StreamCollections; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.models.CollectionData; -import java8.util.concurrent.CompletableFuture; - -public final class CloudCollectionsClient { - private final Token token; - private final String userID; - private final StreamCollections collections; - - CloudCollectionsClient(Token token, String userID, StreamCollections collections) { - this.token = token; - this.userID = userID; - this.collections = collections; - } - - public CompletableFuture addCustom(String collection, T item) throws StreamException { - return addCustom(userID, collection, item); - } - - public CompletableFuture addCustom(String userID, String collection, T item) - throws StreamException { - return add(userID, collection, convert(item, CollectionData.class)) - .thenApply(data -> convert(data, (Class) item.getClass())); - } - - public CompletableFuture add(String collection, CollectionData item) - throws StreamException { - return add(userID, collection, item); - } - - public CompletableFuture add( - String userID, String collection, CollectionData item) throws StreamException { - return collections.add(token, userID, collection, item); - } - - public CompletableFuture updateCustom(String collection, T item) throws StreamException { - return updateCustom(userID, collection, item); - } - - public CompletableFuture updateCustom(String userID, String collection, T item) - throws StreamException { - return update(userID, collection, convert(item, CollectionData.class)) - .thenApply(data -> convert(data, (Class) item.getClass())); - } - - public CompletableFuture update(String collection, CollectionData item) - throws StreamException { - return update(userID, collection, item); - } - - public CompletableFuture update( - String userID, String collection, CollectionData item) throws StreamException { - return collections.update(token, userID, collection, item); - } - - public CompletableFuture getCustom(Class type, String collection, String id) - throws StreamException { - return get(collection, id).thenApply(data -> convert(data, type)); - } - - public CompletableFuture get(String collection, String id) - throws StreamException { - return collections.get(token, collection, id); - } - - public CompletableFuture delete(String collection, String id) throws StreamException { - return collections.delete(token, collection, id); - } -} diff --git a/src/main/java/io/getstream/cloud/CloudFeed.java b/src/main/java/io/getstream/cloud/CloudFeed.java deleted file mode 100644 index 04506392..00000000 --- a/src/main/java/io/getstream/cloud/CloudFeed.java +++ /dev/null @@ -1,358 +0,0 @@ -package io.getstream.cloud; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.*; - -import com.google.common.collect.Iterables; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.faye.subscription.ChannelSubscription; -import io.getstream.core.http.Response; -import io.getstream.core.models.Activity; -import io.getstream.core.models.FeedID; -import io.getstream.core.models.FollowRelation; -import io.getstream.core.options.CustomQueryParameter; -import io.getstream.core.options.Limit; -import io.getstream.core.options.Offset; -import io.getstream.core.options.RequestOption; -import io.getstream.core.utils.DefaultOptions; -import io.getstream.core.utils.Streams; -import java.io.IOException; -import java.lang.reflect.ParameterizedType; -import java.util.List; -import java8.util.J8Arrays; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public class CloudFeed { - private final CloudClient client; - private final FeedID id; - private final FeedSubscriber subscriber; - - CloudFeed(CloudClient client, FeedID id) { - checkNotNull(client, "Can't create feed w/o a client"); - checkNotNull(id, "Can't create feed w/o an ID"); - - this.client = client; - this.id = id; - this.subscriber = null; - } - - CloudFeed(CloudClient client, FeedID id, FeedSubscriber subscriber) { - checkNotNull(client, "Can't create feed w/o a client"); - checkNotNull(id, "Can't create feed w/o an ID"); - - this.client = client; - this.id = id; - this.subscriber = subscriber; - } - - protected final CloudClient getClient() { - return client; - } - - public final CompletableFuture subscribe( - RealtimeMessageCallback messageCallback) { - checkNotNull(subscriber, "A subscriber must be provided in order to start listening to a feed"); - return subscriber.subscribe(id, messageCallback); - } - - public final FeedID getID() { - return id; - } - - public final String getSlug() { - return id.getSlug(); - } - - public final String getUserID() { - return id.getUserID(); - } - - public final CompletableFuture addActivity(Activity activity, RequestOption... options) - throws StreamException { - return getClient() - .addActivity(id, activity, options) - .thenApply( - response -> { - try { - return deserialize(response, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture addCustomActivity(T activity, RequestOption... options) - throws StreamException { - return getClient() - .addActivity(id, Activity.builder().fromCustomActivity(activity).build(), options) - .thenApply( - response -> { - try { - return deserialize(response, (Class) activity.getClass()); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture> addActivities(Iterable activities) - throws StreamException { - return addActivities(Iterables.toArray(activities, Activity.class), new RequestOption[0]); - } - - public final CompletableFuture> addCustomActivities(Iterable activities) - throws StreamException { - final Activity[] custom = - Streams.stream(activities) - .map(activity -> Activity.builder().fromCustomActivity(activity).build()) - .toArray(Activity[]::new); - return getClient() - .addActivities(id, custom, new RequestOption[0]) - .thenApply( - (Response response) -> { - try { - Class element = - (Class) - ((ParameterizedType) getClass().getGenericSuperclass()) - .getActualTypeArguments()[0]; - return deserializeContainer(response, "activities", element); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture> addActivities(Activity... activities) - throws StreamException { - return addActivities(activities, new RequestOption[0]); - } - - public final CompletableFuture> addActivities( - Activity[] activities, RequestOption... options) throws StreamException { - return getClient() - .addActivities(id, activities, options) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, "activities", Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture> addCustomActivities(T... activities) - throws StreamException { - final Activity[] custom = - J8Arrays.stream(activities) - .map(activity -> Activity.builder().fromCustomActivity(activity).build()) - .toArray(Activity[]::new); - return getClient() - .addActivities(id, custom, new RequestOption[0]) - .thenApply( - (Response response) -> { - try { - Class element = (Class) activities.getClass().getComponentType(); - return deserializeContainer(response, "activities", element); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture removeActivityByID(String id) throws StreamException { - return client - .removeActivityByID(this.id, id) - .thenApply( - (Response response) -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture removeActivityByForeignID(String foreignID) - throws StreamException { - return client - .removeActivityByForeignID(id, foreignID) - .thenApply( - (Response response) -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture follow(CloudFlatFeed feed) throws StreamException { - return follow(feed, DefaultOptions.DEFAULT_ACTIVITY_COPY_LIMIT); - } - - public final CompletableFuture follow(CloudFlatFeed feed, int activityCopyLimit) - throws StreamException { - checkArgument( - activityCopyLimit <= DefaultOptions.MAX_ACTIVITY_COPY_LIMIT, - String.format( - "Activity copy limit should be less then %d", DefaultOptions.MAX_ACTIVITY_COPY_LIMIT)); - - return client - .follow(id, feed.getID(), activityCopyLimit) - .thenApply( - (Response response) -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture> getFollowers(Iterable feedIDs) - throws StreamException { - return getFollowers( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowers(FeedID... feedIDs) - throws StreamException { - return getFollowers(DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, feedIDs); - } - - public final CompletableFuture> getFollowers( - Limit limit, Iterable feedIDs) throws StreamException { - return getFollowers( - limit, DefaultOptions.DEFAULT_OFFSET, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowers(Limit limit, FeedID... feedIDs) - throws StreamException { - return getFollowers(limit, DefaultOptions.DEFAULT_OFFSET, feedIDs); - } - - public final CompletableFuture> getFollowers( - Offset offset, Iterable feedIDs) throws StreamException { - return getFollowers( - DefaultOptions.DEFAULT_LIMIT, offset, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowers( - Offset offset, FeedID... feedIDs) throws StreamException { - return getFollowers(DefaultOptions.DEFAULT_LIMIT, offset, feedIDs); - } - - public final CompletableFuture> getFollowers( - Limit limit, Offset offset, Iterable feedIDs) throws StreamException { - return getFollowers(limit, offset, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowers( - Limit limit, Offset offset, FeedID... feeds) throws StreamException { - checkNotNull(feeds, "No feed ids to filter on"); - - final String[] feedIDs = J8Arrays.stream(feeds).map(id -> id.toString()).toArray(String[]::new); - final RequestOption[] options = - feedIDs.length == 0 - ? new RequestOption[] {limit, offset} - : new RequestOption[] { - limit, offset, new CustomQueryParameter("filter", String.join(",", feedIDs)) - }; - return client - .getFollowers(id, options) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, FollowRelation.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture> getFollowed(Iterable feedIDs) - throws StreamException { - return getFollowed( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowed(FeedID... feedIDs) - throws StreamException { - return getFollowed(DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, feedIDs); - } - - public final CompletableFuture> getFollowed( - Limit limit, Iterable feedIDs) throws StreamException { - return getFollowed( - limit, DefaultOptions.DEFAULT_OFFSET, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowed(Limit limit, FeedID... feedIDs) - throws StreamException { - return getFollowed(limit, DefaultOptions.DEFAULT_OFFSET, feedIDs); - } - - public final CompletableFuture> getFollowed( - Offset offset, Iterable feedIDs) throws StreamException { - return getFollowed( - DefaultOptions.DEFAULT_LIMIT, offset, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowed(Offset offset, FeedID... feedIDs) - throws StreamException { - return getFollowed(DefaultOptions.DEFAULT_LIMIT, offset, feedIDs); - } - - public final CompletableFuture> getFollowed( - Limit limit, Offset offset, Iterable feedIDs) throws StreamException { - return getFollowed(limit, offset, Iterables.toArray(feedIDs, FeedID.class)); - } - - public final CompletableFuture> getFollowed( - Limit limit, Offset offset, FeedID... feeds) throws StreamException { - checkNotNull(feeds, "No feed ids to filter on"); - - final String[] feedIDs = J8Arrays.stream(feeds).map(id -> id.toString()).toArray(String[]::new); - final RequestOption[] options = - feedIDs.length == 0 - ? new RequestOption[] {limit, offset} - : new RequestOption[] { - limit, offset, new CustomQueryParameter("filter", String.join(",", feedIDs)) - }; - return client - .getFollowed(id, options) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, FollowRelation.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public final CompletableFuture unfollow(CloudFlatFeed feed) throws StreamException { - return unfollow(feed, io.getstream.core.KeepHistory.NO); - } - - public final CompletableFuture unfollow( - CloudFlatFeed feed, io.getstream.core.KeepHistory keepHistory) throws StreamException { - return client - .unfollow(id, feed.getID(), new io.getstream.core.options.KeepHistory(keepHistory)) - .thenApply( - (Response response) -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } -} diff --git a/src/main/java/io/getstream/cloud/CloudFileStorageClient.java b/src/main/java/io/getstream/cloud/CloudFileStorageClient.java deleted file mode 100644 index b3a82f16..00000000 --- a/src/main/java/io/getstream/cloud/CloudFileStorageClient.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.getstream.cloud; - -import io.getstream.core.StreamFiles; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import java.io.File; -import java.net.URL; -import java8.util.concurrent.CompletableFuture; - -public final class CloudFileStorageClient { - private final Token token; - private final StreamFiles files; - - CloudFileStorageClient(Token token, StreamFiles files) { - this.token = token; - this.files = files; - } - - public CompletableFuture upload(String fileName, byte[] content) throws StreamException { - return files.upload(token, fileName, content); - } - - public CompletableFuture upload(File content) throws StreamException { - return files.upload(token, content); - } - - public CompletableFuture delete(URL url) throws StreamException { - return files.delete(token, url); - } -} diff --git a/src/main/java/io/getstream/cloud/CloudFlatFeed.java b/src/main/java/io/getstream/cloud/CloudFlatFeed.java deleted file mode 100644 index 9f7625f2..00000000 --- a/src/main/java/io/getstream/cloud/CloudFlatFeed.java +++ /dev/null @@ -1,690 +0,0 @@ -package io.getstream.cloud; - -import static io.getstream.core.utils.Serialization.deserializeContainer; - -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Response; -import io.getstream.core.models.Activity; -import io.getstream.core.models.EnrichedActivity; -import io.getstream.core.models.FeedID; -import io.getstream.core.options.*; -import io.getstream.core.utils.DefaultOptions; -import java.io.IOException; -import java.util.List; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public final class CloudFlatFeed extends CloudFeed { - CloudFlatFeed(CloudClient client, FeedID id) { - super(client, id); - } - - CloudFlatFeed(CloudClient client, FeedID id, FeedSubscriber subscriber) { - super(client, id, subscriber); - } - - public CompletableFuture> getActivities() throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - null); - } - - public CompletableFuture> getActivities(Limit limit) throws StreamException { - return getActivities(limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getActivities(String ranking) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - ranking); - } - - public CompletableFuture> getActivities(Filter filter) throws StreamException { - return getActivities(DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, null); - } - - public CompletableFuture> getActivities(Offset offset) throws StreamException { - return getActivities(DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getActivities(Limit limit, String ranking) - throws StreamException { - return getActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, ranking); - } - - public CompletableFuture> getActivities(Limit limit, Filter filter) - throws StreamException { - return getActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, null); - } - - public CompletableFuture> getActivities(Limit limit, Offset offset) - throws StreamException { - return getActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getActivities(Filter filter, String ranking) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, ranking); - } - - public CompletableFuture> getActivities(Offset offset, String ranking) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, ranking); - } - - public CompletableFuture> getActivities(Limit limit, Filter filter, String ranking) - throws StreamException { - return getActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, ranking); - } - - public CompletableFuture> getActivities(Limit limit, Offset offset, String ranking) - throws StreamException { - return getActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, ranking); - } - - CompletableFuture> getActivities( - Limit limit, Offset offset, Filter filter, String ranking) throws StreamException { - final RequestOption[] options = - ranking == null - ? new RequestOption[] {limit, offset, filter, DefaultOptions.DEFAULT_MARKER} - : new RequestOption[] { - limit, offset, filter, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking) - }; - return getClient() - .getActivities(getID(), options) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getCustomActivities(Class type) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - null); - } - - public CompletableFuture> getCustomActivities(Class type, Limit limit) - throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getCustomActivities(Class type, String ranking) - throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - ranking); - } - - public CompletableFuture> getCustomActivities(Class type, Filter filter) - throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, null); - } - - public CompletableFuture> getCustomActivities(Class type, Offset offset) - throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, String ranking) throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, ranking); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getCustomActivities(type, limit, DefaultOptions.DEFAULT_OFFSET, filter, null); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getCustomActivities(type, limit, offset, DefaultOptions.DEFAULT_FILTER, null); - } - - public CompletableFuture> getCustomActivities( - Class type, Offset offset, String ranking) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, ranking); - } - - public CompletableFuture> getCustomActivities( - Class type, Filter filter, String ranking) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, ranking); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset, String ranking) throws StreamException { - return getCustomActivities(type, limit, offset, DefaultOptions.DEFAULT_FILTER, ranking); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Filter filter, String ranking) throws StreamException { - return getCustomActivities(type, limit, DefaultOptions.DEFAULT_OFFSET, filter, ranking); - } - - CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset, Filter filter, String ranking) - throws StreamException { - final RequestOption[] options = - ranking == null - ? new RequestOption[] {limit, offset, filter, DefaultOptions.DEFAULT_MARKER} - : new RequestOption[] { - limit, offset, filter, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking) - }; - return getClient() - .getActivities(getID(), options) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, type); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getEnrichedActivities() throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities(Limit limit) - throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities(EnrichmentFlags flags) - throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - flags, - null); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedActivities(String ranking) - throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, String ranking) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - flags, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedActivities(Filter filter) - throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities(Limit limit, Filter filter) - throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, flags, null); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, flags, null); - } - - public CompletableFuture> getEnrichedActivities(Offset offset) - throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities(Limit limit, Offset offset) - throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, String ranking) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, String ranking) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, flags, ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, flags, ranking); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, String ranking) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, String ranking) throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, Filter filter, EnrichmentFlags flags, String ranking) - throws StreamException { - final RequestOption[] options = - ranking == null - ? new RequestOption[] {limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER} - : new RequestOption[] { - limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking) - }; - return getClient() - .getEnrichedActivities(getID(), options) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, EnrichedActivity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getEnrichedActivities(RequestOption... options) - throws StreamException { - // If no options provided, use defaults - if (options == null || options.length == 0) { - options = new RequestOption[] { - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - DefaultOptions.DEFAULT_MARKER - }; - } - - return getClient() - .getEnrichedActivities(getID(), options) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, EnrichedActivity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getEnrichedCustomActivities(Class type) - throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities(Class type, Limit limit) - throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - flags, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedCustomActivities(Class type, String ranking) - throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - flags, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedCustomActivities(Class type, Filter filter) - throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, flags, null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, flags, null); - } - - public CompletableFuture> getEnrichedCustomActivities(Class type, Offset offset) - throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, flags, null); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, EnrichmentFlags flags, String ranking) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, flags, ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS, - ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, EnrichmentFlags flags, String ranking) throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, flags, ranking); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, EnrichmentFlags flags, String ranking) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, flags, ranking); - } - - CompletableFuture> getEnrichedCustomActivities( - Class type, - Limit limit, - Offset offset, - Filter filter, - EnrichmentFlags flags, - String ranking) - throws StreamException { - final RequestOption[] options = - ranking == null - ? new RequestOption[] {limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER} - : new RequestOption[] { - limit, offset, filter, flags, DefaultOptions.DEFAULT_MARKER, new Ranking(ranking) - }; - return getClient() - .getActivities(getID(), options) - .thenApply( - (Response response) -> { - try { - return deserializeContainer(response, type); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } -} diff --git a/src/main/java/io/getstream/cloud/CloudImageStorageClient.java b/src/main/java/io/getstream/cloud/CloudImageStorageClient.java deleted file mode 100644 index c9b15aa6..00000000 --- a/src/main/java/io/getstream/cloud/CloudImageStorageClient.java +++ /dev/null @@ -1,40 +0,0 @@ -package io.getstream.cloud; - -import io.getstream.core.StreamImages; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.options.Crop; -import io.getstream.core.options.Resize; -import java.io.File; -import java.net.URL; -import java8.util.concurrent.CompletableFuture; - -public final class CloudImageStorageClient { - private final Token token; - private final StreamImages images; - - CloudImageStorageClient(Token token, StreamImages images) { - this.token = token; - this.images = images; - } - - public CompletableFuture upload(String fileName, byte[] content) throws StreamException { - return images.upload(token, fileName, content); - } - - public CompletableFuture upload(File content) throws StreamException { - return images.upload(token, content); - } - - public CompletableFuture delete(URL url) throws StreamException { - return images.delete(token, url); - } - - public CompletableFuture process(URL url, Crop crop) throws StreamException { - return images.process(token, url, crop); - } - - public CompletableFuture process(URL url, Resize resize) throws StreamException { - return images.process(token, url, resize); - } -} diff --git a/src/main/java/io/getstream/cloud/CloudNotificationFeed.java b/src/main/java/io/getstream/cloud/CloudNotificationFeed.java deleted file mode 100644 index f6e17a16..00000000 --- a/src/main/java/io/getstream/cloud/CloudNotificationFeed.java +++ /dev/null @@ -1,710 +0,0 @@ -package io.getstream.cloud; - -import static io.getstream.core.utils.Serialization.*; - -import com.fasterxml.jackson.core.type.TypeReference; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Response; -import io.getstream.core.models.*; -import io.getstream.core.options.*; -import io.getstream.core.utils.DefaultOptions; -import java.io.IOException; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public final class CloudNotificationFeed extends CloudFeed { - CloudNotificationFeed(CloudClient client, FeedID id) { - super(client, id); - } - - CloudNotificationFeed(CloudClient client, FeedID id, FeedSubscriber subscriber) { - super(client, id, subscriber); - } - - public CompletableFuture> getActivities() - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities(Limit limit) - throws StreamException { - return getActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities(Offset offset) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities(Filter filter) - throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities( - ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker); - } - - public CompletableFuture> getActivities( - Limit limit, Offset offset) throws StreamException { - return getActivities( - limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities( - Limit limit, Filter filter) throws StreamException { - return getActivities( - limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getActivities( - Limit limit, ActivityMarker marker) throws StreamException { - return getActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture> getActivities( - Filter filter, ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture> getActivities( - Offset offset, ActivityMarker marker) throws StreamException { - return getActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture> getActivities( - Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture> getActivities( - Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - CompletableFuture> getActivities( - Limit limit, Offset offset, Filter filter, ActivityMarker marker) throws StreamException { - return getClient() - .getActivities(getID(), limit, offset, filter, marker) - .thenApply( - (Response response) -> { - try { - return deserialize( - response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getCustomActivities(Class type) - throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit) throws StreamException { - return getCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, Offset offset) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, Filter filter) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture> getCustomActivities( - Class type, Filter filter, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture> getCustomActivities( - Class type, Offset offset, ActivityMarker marker) throws StreamException { - return getCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getCustomActivities(type, limit, DefaultOptions.DEFAULT_OFFSET, filter, marker); - } - - public CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getCustomActivities(type, limit, offset, DefaultOptions.DEFAULT_FILTER, marker); - } - - CompletableFuture> getCustomActivities( - Class type, Limit limit, Offset offset, Filter filter, ActivityMarker marker) - throws StreamException { - return getClient() - .getActivities(getID(), limit, offset, filter, marker) - .thenApply( - (Response response) -> { - try { - return deserialize(response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getEnrichedActivities() - throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset) throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedActivities( - ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - flags); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedActivities( - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedActivities( - Filter filter, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture> getEnrichedActivities( - Offset offset, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedActivities( - DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedActivities(limit, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedActivities(limit, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - CompletableFuture> getEnrichedActivities( - Limit limit, Offset offset, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getClient() - .getEnrichedActivities(getID(), limit, offset, filter, marker, flags) - .thenApply( - (Response response) -> { - try { - return deserialize( - response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - DefaultOptions.DEFAULT_MARKER, - flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, ActivityMarker marker, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - DefaultOptions.DEFAULT_FILTER, - marker, - flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - DefaultOptions.DEFAULT_LIMIT, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, EnrichmentFlags flags) throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, DefaultOptions.DEFAULT_MARKER, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - DefaultOptions.DEFAULT_OFFSET, - filter, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker) throws StreamException { - return getEnrichedCustomActivities( - type, - limit, - offset, - DefaultOptions.DEFAULT_FILTER, - marker, - DefaultOptions.DEFAULT_ENRICHMENT_FLAGS); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, DefaultOptions.DEFAULT_LIMIT, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Filter filter, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, DefaultOptions.DEFAULT_OFFSET, filter, marker, flags); - } - - public CompletableFuture> getEnrichedCustomActivities( - Class type, Limit limit, Offset offset, ActivityMarker marker, EnrichmentFlags flags) - throws StreamException { - return getEnrichedCustomActivities( - type, limit, offset, DefaultOptions.DEFAULT_FILTER, marker, flags); - } - - CompletableFuture> getEnrichedCustomActivities( - Class type, - Limit limit, - Offset offset, - Filter filter, - ActivityMarker marker, - EnrichmentFlags flags) - throws StreamException { - return getClient() - .getEnrichedActivities(getID(), limit, offset, filter, marker, flags) - .thenApply( - (Response response) -> { - try { - return deserialize(response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } -} diff --git a/src/main/java/io/getstream/cloud/CloudReactionsClient.java b/src/main/java/io/getstream/cloud/CloudReactionsClient.java deleted file mode 100644 index 099c5187..00000000 --- a/src/main/java/io/getstream/cloud/CloudReactionsClient.java +++ /dev/null @@ -1,307 +0,0 @@ -package io.getstream.cloud; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -import com.google.common.collect.Iterables; -import io.getstream.core.LookupKind; -import io.getstream.core.StreamReactions; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.Token; -import io.getstream.core.models.FeedID; -import io.getstream.core.models.Reaction; -import io.getstream.core.options.Filter; -import io.getstream.core.options.Limit; -import io.getstream.core.options.RequestOption; -import io.getstream.core.utils.DefaultOptions; -import java.util.List; -import java.util.Map; -import java8.util.concurrent.CompletableFuture; - -public final class CloudReactionsClient { - private final Token token; - private final String userID; - private final StreamReactions reactions; - - CloudReactionsClient(Token token, String userID, StreamReactions reactions) { - this.token = token; - this.userID = userID; - this.reactions = reactions; - } - - public CompletableFuture get(String id) throws StreamException { - return reactions.get(token, id); - } - - public CompletableFuture> filter(LookupKind lookup, String id) - throws StreamException { - Params params = new Params(lookup, id); - return filter(params); - } - - public CompletableFuture> filter(LookupKind lookup, String id, Limit limit) - throws StreamException { - Params params = new Params(lookup, id).withLimit(limit); - return filter(params); - } - - public CompletableFuture> filter(LookupKind lookup, String id, Filter filter) - throws StreamException { - Params params = new Params(lookup, id).withFilter(filter); - return filter(params); - } - - public CompletableFuture> filter(LookupKind lookup, String id, String kind) - throws StreamException { - Params params = new Params(lookup, id).withKind(kind); - return filter(params); - } - - public CompletableFuture> filter( - LookupKind lookup, String id, Filter filter, Limit limit) throws StreamException { - Params params = new Params(lookup, id).withFilter(filter).withLimit(limit); - return filter(params); - } - - public CompletableFuture> filter( - LookupKind lookup, String id, Limit limit, String kind) throws StreamException { - Params params = new Params(lookup, id).withLimit(limit).withKind(kind); - return filter(params); - } - - public CompletableFuture> filter( - LookupKind lookup, String id, Filter filter, Limit limit, String kind) - throws StreamException { - Params params = - new Params(lookup, id).withLimit(limit).withKind(kind).withFilter(filter).withLimit(limit); - return filter(params); - } - - public CompletableFuture> filter( - LookupKind lookup, - String id, - Filter filter, - Limit limit, - String kind, - Boolean includeOwnChildren) - throws StreamException { - Params params = - new Params(lookup, id) - .withLimit(limit) - .withKind(kind) - .withFilter(filter) - .withLimit(limit) - .includeOwnChildren(includeOwnChildren); - return filter(params); - } - - private CompletableFuture> filter(Params params) throws StreamException { - return reactions.filter( - token, - params.getLookupKind(), - params.getId(), - params.getFilter(), - params.getLimit(), - params.getKind(), - params.getWithOwnChildren(), ""); - } - - public CompletableFuture add( - String kind, String activityID, Iterable targetFeeds) throws StreamException { - return add(userID, kind, activityID, targetFeeds); - } - - public CompletableFuture add(String kind, String activityID, FeedID... targetFeeds) - throws StreamException { - return add(userID, activityID, targetFeeds); - } - - public CompletableFuture add(Reaction reaction, Iterable targetFeeds) - throws StreamException { - return add(userID, reaction, targetFeeds); - } - - public CompletableFuture add(Reaction reaction, FeedID... targetFeeds) - throws StreamException { - return add(userID, reaction, targetFeeds); - } - - public CompletableFuture add( - String userID, String kind, String activityID, Iterable targetFeeds) - throws StreamException { - return add(userID, kind, activityID, Iterables.toArray(targetFeeds, FeedID.class)); - } - - public CompletableFuture add( - String userID, String kind, String activityID, FeedID... targetFeeds) throws StreamException { - checkNotNull(kind, "Reaction kind can't be null"); - checkArgument(!kind.isEmpty(), "Reaction kind can't be empty"); - checkNotNull(activityID, "Reaction activity id can't be null"); - checkArgument(!activityID.isEmpty(), "Reaction activity id can't be empty"); - - return add(userID, Reaction.builder().activityID(activityID).kind(kind).build(), targetFeeds); - } - - public CompletableFuture add( - String userID, Reaction reaction, Iterable targetFeeds) throws StreamException { - return add(userID, reaction, Iterables.toArray(targetFeeds, FeedID.class)); - } - - public CompletableFuture add(String userID, Reaction reaction, FeedID... targetFeeds) - throws StreamException { - return reactions.add(token, userID, reaction, targetFeeds); - } - - public CompletableFuture add( - String userID, Reaction reaction, FeedID[] targetFeeds, RequestOption... options) - throws StreamException { - return reactions.add(token, userID, reaction, targetFeeds, null, options); - } - - public CompletableFuture add( - String userID, Reaction reaction, FeedID[] targetFeeds, - Map targetFeedsExtraData, RequestOption... options) throws StreamException { - return reactions.add(token, userID, reaction, targetFeeds, targetFeedsExtraData, options); - } - - public CompletableFuture addChild( - String userID, String kind, String parentID, Iterable targetFeeds) - throws StreamException { - Reaction child = Reaction.builder().kind(kind).parent(parentID).build(); - return add(userID, child, targetFeeds); - } - - public CompletableFuture addChild( - String userID, String kind, String parentID, FeedID... targetFeeds) throws StreamException { - Reaction child = Reaction.builder().kind(kind).parent(parentID).build(); - return add(userID, child, targetFeeds); - } - - public CompletableFuture addChild( - String userID, String kind, String parentID, FeedID[] targetFeeds, Map targetFeedsExtraData) throws StreamException { - Reaction child = Reaction.builder().kind(kind).parent(parentID).build(); - return add(userID, child, targetFeeds, targetFeedsExtraData); - } - - public CompletableFuture addChild( - String userID, String parentID, Reaction reaction, Iterable targetFeeds) - throws StreamException { - Reaction child = Reaction.builder().fromReaction(reaction).parent(parentID).build(); - return add(userID, child, targetFeeds); - } - - public CompletableFuture addChild( - String userID, String parentID, Reaction reaction, FeedID... targetFeeds) - throws StreamException { - Reaction child = Reaction.builder().fromReaction(reaction).parent(parentID).build(); - return add(userID, child, targetFeeds); - } - - public CompletableFuture addChild( - String userID, String parentID, Reaction reaction, FeedID[] targetFeeds, Map targetFeedsExtraData) - throws StreamException { - Reaction child = Reaction.builder().fromReaction(reaction).parent(parentID).build(); - return add(userID, child, targetFeeds, targetFeedsExtraData); - } - - public CompletableFuture update(String id, Iterable targetFeeds) - throws StreamException { - return update(id, Iterables.toArray(targetFeeds, FeedID.class)); - } - - public CompletableFuture update(String id, FeedID... targetFeeds) throws StreamException { - checkNotNull(id, "Reaction id can't be null"); - checkArgument(!id.isEmpty(), "Reaction id can't be empty"); - - return update(Reaction.builder().id(id).build(), targetFeeds); - } - - public CompletableFuture update(Reaction reaction, Iterable targetFeeds) - throws StreamException { - return update(reaction, Iterables.toArray(targetFeeds, FeedID.class)); - } - - public CompletableFuture update(Reaction reaction, FeedID... targetFeeds) - throws StreamException { - return reactions.update(token, reaction, targetFeeds); - } - - public CompletableFuture update( - Reaction reaction, FeedID[] targetFeeds, RequestOption... options) throws StreamException { - return reactions.update(token, reaction, targetFeeds, options); - } - - public CompletableFuture delete(String id) throws StreamException { - return reactions.delete(token, id, false); - } - - public CompletableFuture delete(String id, Boolean soft) throws StreamException { - return reactions.delete(token, id, soft); - } - - public CompletableFuture softDelete(String id) throws StreamException { - return reactions.delete(token, id, true); - } - - public CompletableFuture restore(String id) throws StreamException { - return reactions.restore(token, id); - } - - public class Params { - private LookupKind lookupKind; - private String id; - private Filter filter; - private Limit limit; - private String kind; - private Boolean withOwnChildren; - - public Params(LookupKind lookupKind, String id) { - this.id = id; - this.lookupKind = lookupKind; - } - - public Params withLimit(Limit limit) { - this.limit = limit; - return this; - } - - public Params withFilter(Filter filter) { - this.filter = filter; - return this; - } - - public Params withKind(String kind) { - this.kind = kind; - return this; - } - - public Params includeOwnChildren(Boolean includeOwnChildren) { - this.withOwnChildren = includeOwnChildren; - return this; - } - - public LookupKind getLookupKind() { - return lookupKind; - } - - public String getId() { - return id; - } - - public Filter getFilter() { - return (filter != null) ? filter : DefaultOptions.DEFAULT_FILTER; - } - - public Limit getLimit() { - return (limit != null) ? limit : DefaultOptions.DEFAULT_LIMIT; - } - - public String getKind() { - return (kind != null) ? kind : ""; - } - - public Boolean getWithOwnChildren() { - return (withOwnChildren != null) ? withOwnChildren : false; - } - } -} diff --git a/src/main/java/io/getstream/cloud/CloudUser.java b/src/main/java/io/getstream/cloud/CloudUser.java deleted file mode 100644 index 1f27a5b3..00000000 --- a/src/main/java/io/getstream/cloud/CloudUser.java +++ /dev/null @@ -1,117 +0,0 @@ -package io.getstream.cloud; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.deserialize; -import static io.getstream.core.utils.Serialization.deserializeError; - -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.models.Data; -import io.getstream.core.models.ProfileData; -import java.io.IOException; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public final class CloudUser { - private final CloudClient client; - private final String id; - - public CloudUser(CloudClient client, String id) { - checkNotNull(client, "Client can't be null"); - checkNotNull(id, "User ID can't be null"); - checkArgument(!id.isEmpty(), "User ID can't be empty"); - - this.client = client; - this.id = id; - } - - public String getID() { - return id; - } - - public CompletableFuture get() throws StreamException { - return client - .getUser(id) - .thenApply( - response -> { - try { - return deserialize(response, Data.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture delete() throws StreamException { - return client - .deleteUser(id) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture getOrCreate() throws StreamException { - return getOrCreate(new Data()); - } - - public CompletableFuture getOrCreate(Data data) throws StreamException { - return client - .getOrCreateUser(id, data) - .thenApply( - response -> { - try { - return deserialize(response, Data.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture create(Data data) throws StreamException { - return client - .createUser(id, data) - .thenApply( - response -> { - try { - return deserialize(response, Data.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture create() throws StreamException { - return create(new Data()); - } - - public CompletableFuture update(Data data) throws StreamException { - return client - .updateUser(id, data) - .thenApply( - response -> { - try { - return deserialize(response, Data.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } - - public CompletableFuture profile() throws StreamException { - return client - .userProfile(id) - .thenApply( - response -> { - try { - return deserialize(response, ProfileData.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } -} diff --git a/src/main/java/io/getstream/cloud/FeedSubscriber.java b/src/main/java/io/getstream/cloud/FeedSubscriber.java deleted file mode 100644 index 38872777..00000000 --- a/src/main/java/io/getstream/cloud/FeedSubscriber.java +++ /dev/null @@ -1,10 +0,0 @@ -package io.getstream.cloud; - -import io.getstream.core.faye.subscription.ChannelSubscription; -import io.getstream.core.models.FeedID; -import java8.util.concurrent.CompletableFuture; - -public interface FeedSubscriber { - CompletableFuture subscribe( - FeedID feedID, RealtimeMessageCallback messageCallback); -} diff --git a/src/main/java/io/getstream/cloud/RealtimeMessageCallback.java b/src/main/java/io/getstream/cloud/RealtimeMessageCallback.java deleted file mode 100644 index cce28932..00000000 --- a/src/main/java/io/getstream/cloud/RealtimeMessageCallback.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.getstream.cloud; - -import io.getstream.core.models.RealtimeMessage; - -public interface RealtimeMessageCallback { - void onMessage(RealtimeMessage message); -} diff --git a/src/main/java/io/getstream/core/KeepHistory.java b/src/main/java/io/getstream/core/KeepHistory.java deleted file mode 100644 index 5cec59b4..00000000 --- a/src/main/java/io/getstream/core/KeepHistory.java +++ /dev/null @@ -1,16 +0,0 @@ -package io.getstream.core; - -public enum KeepHistory { - YES(true), - NO(false); - - private final boolean flag; - - KeepHistory(boolean flag) { - this.flag = flag; - } - - public boolean getFlag() { - return flag; - } -} diff --git a/src/main/java/io/getstream/core/LookupKind.java b/src/main/java/io/getstream/core/LookupKind.java deleted file mode 100644 index 9f4e8bdb..00000000 --- a/src/main/java/io/getstream/core/LookupKind.java +++ /dev/null @@ -1,18 +0,0 @@ -package io.getstream.core; - -public enum LookupKind { - ACTIVITY("activity_id"), - ACTIVITY_WITH_DATA("activity_id"), - REACTION("reaction_id"), - USER("user_id"); - - private final String kind; - - LookupKind(String kind) { - this.kind = kind; - } - - public String getKind() { - return kind; - } -} diff --git a/src/main/java/io/getstream/core/Moderation.java b/src/main/java/io/getstream/core/Moderation.java deleted file mode 100644 index a3187088..00000000 --- a/src/main/java/io/getstream/core/Moderation.java +++ /dev/null @@ -1,55 +0,0 @@ -package io.getstream.core; - -import static io.getstream.core.utils.Request.buildPost; -import static io.getstream.core.utils.Routes.*; -import static io.getstream.core.utils.Serialization.*; - -import com.fasterxml.jackson.core.JsonProcessingException; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.Response; -import io.getstream.core.http.Token; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.Map; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public class Moderation { - private final String key; - private final URL baseURL; - private final HTTPClient httpClient; - - public Moderation(String key, URL baseURL, HTTPClient httpClient) { - this.key = key; - this.baseURL = baseURL; - this.httpClient = httpClient; - } - - public CompletableFuture flag( - Token token, - String entityType, - String entityId, - String reportingUser, - String Reason, - Map Custom) - throws StreamException { - try { - final byte[] payload = - toJSON( - new Object() { - public final String user_id = reportingUser; - public final String entity_type = entityType; - public final String entity_id = entityId; - public final String reason = Reason; - public final Map custom = Custom; - }); - - final URL url = buildModerationFlagURL(baseURL); - return httpClient.execute(buildPost(url, key, token, payload)); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new CompletionException(e); - } - } -} diff --git a/src/main/java/io/getstream/core/Region.java b/src/main/java/io/getstream/core/Region.java deleted file mode 100644 index e12884fc..00000000 --- a/src/main/java/io/getstream/core/Region.java +++ /dev/null @@ -1,25 +0,0 @@ -package io.getstream.core; - -public enum Region { - US_EAST("us-east-api"), - TOKYO("tokyo-api"), - DUBLIN("dublin-api"), - SINGAPORE("singapore-api"), - OHIO("ohio-api"), - JAKARTA("jakarta-api"), - MUMBAI("mumbai-api"), - OREGON("oregon-api"), - SYDNEY("sydney-api"), - CANADA("ca-central-1"); - - private final String region; - - Region(String region) { - this.region = region; - } - - @Override - public String toString() { - return region; - } -} diff --git a/src/main/java/io/getstream/core/Stream.java b/src/main/java/io/getstream/core/Stream.java deleted file mode 100644 index 895f5254..00000000 --- a/src/main/java/io/getstream/core/Stream.java +++ /dev/null @@ -1,605 +0,0 @@ -package io.getstream.core; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Request.*; -import static io.getstream.core.utils.Routes.*; -import static io.getstream.core.utils.Serialization.*; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.OptBoolean; -import com.fasterxml.jackson.core.JsonProcessingException; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.Response; -import io.getstream.core.http.Token; -import io.getstream.core.models.*; -import io.getstream.core.options.CustomQueryParameter; -import io.getstream.core.options.RequestOption; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java8.util.J8Arrays; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public final class Stream { - private final String key; - private final URL baseURL; - private final HTTPClient httpClient; - - public Stream(String key, URL baseURL, HTTPClient httpClient) { - this.key = key; - this.baseURL = baseURL; - this.httpClient = httpClient; - } - - public StreamBatch batch() { - return new StreamBatch(key, baseURL, httpClient); - } - - public StreamCollections collections() { - return new StreamCollections(key, baseURL, httpClient); - } - - public StreamPersonalization personalization() { - return new StreamPersonalization(key, baseURL, httpClient); - } - - public StreamAnalytics analytics() { - return new StreamAnalytics(key, baseURL, httpClient); - } - - public StreamReactions reactions() { - return new StreamReactions(key, baseURL, httpClient); - } - - public Moderation moderation() { - return new Moderation(key, baseURL, httpClient); - } - - public StreamFiles files() { - return new StreamFiles(key, baseURL, httpClient); - } - - public StreamImages images() { - return new StreamImages(key, baseURL, httpClient); - } - - public CompletableFuture> updateActivitiesByID( - Token token, ActivityUpdate[] updates, RequestOption... options) throws StreamException { - checkNotNull(updates, "No updates"); - checkArgument(updates.length > 0, "No updates"); - for (ActivityUpdate update : updates) { - checkNotNull(update.getID(), "No activity to update"); - checkNotNull(update.getSet(), "No activity properties to set"); - checkNotNull(update.getUnset(), "No activity properties to unset"); - } - - try { - final byte[] payload = - toJSON( - new Object() { - public final ActivityUpdate[] changes = updates; - }); - final URL url = buildActivityUpdateURL(baseURL); - return httpClient - .execute(buildPost(url, key, token, payload, options)) - .thenApply( - response -> { - try { - return deserializeContainer(response, "activities", Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture updateActivityByID( - Token token, String id, Map set, String[] unset, RequestOption... options) - throws StreamException { - checkNotNull(id, "No activity to update"); - checkNotNull(set, "No activity properties to set"); - checkNotNull(unset, "No activity properties to unset"); - - try { - // XXX: renaming variables so we can unambiguously name payload fields 'id', 'set', 'unset' - String activityID = id; - Map propertiesToSet = set; - String[] propertiesToUnset = unset; - final byte[] payload = - toJSON( - new Object() { - public final String id = activityID; - public final Map set = propertiesToSet; - public final String[] unset = propertiesToUnset; - }); - final URL url = buildActivityUpdateURL(baseURL); - return httpClient - .execute(buildPost(url, key, token, payload, options)) - .thenApply( - response -> { - try { - return deserialize(response, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture> updateActivitiesByForeignID( - Token token, ActivityUpdate[] updates, RequestOption... options) throws StreamException { - checkNotNull(updates, "No updates"); - checkArgument(updates.length > 0, "No updates"); - for (ActivityUpdate update : updates) { - checkNotNull(update.getForeignID(), "No activity to update"); - checkNotNull(update.getTime(), "Missing timestamp"); - checkNotNull(update.getSet(), "No activity properties to set"); - checkNotNull(update.getUnset(), "No activity properties to unset"); - } - - try { - final byte[] payload = - toJSON( - new Object() { - public final ActivityUpdate[] changes = updates; - }); - final URL url = buildActivityUpdateURL(baseURL); - return httpClient - .execute(buildPost(url, key, token, payload, options)) - .thenApply( - response -> { - try { - return deserializeContainer(response, "activities", Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture updateActivityByForeignID( - Token token, - String foreignID, - Date timestamp, - Map set, - String[] unset, - RequestOption... options) - throws StreamException { - checkNotNull(foreignID, "No activity to update"); - checkNotNull(timestamp, "Missing timestamp"); - checkNotNull(set, "No activity properties to set"); - checkNotNull(unset, "No activity properties to unset"); - - try { - // XXX: renaming variables so we can unambiguously name payload fields 'set', 'unset' - Map propertiesToSet = set; - String[] propertiesToUnset = unset; - final byte[] payload = - toJSON( - new Object() { - public final String foreign_id = foreignID; - - @JsonFormat( - shape = JsonFormat.Shape.STRING, - pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS", - lenient = OptBoolean.FALSE, - timezone = "UTC") - public final Date time = timestamp; - - public final Map set = propertiesToSet; - public final String[] unset = propertiesToUnset; - }); - final URL url = buildActivityUpdateURL(baseURL); - return httpClient - .execute(buildPost(url, key, token, payload, options)) - .thenApply( - response -> { - try { - return deserialize(response, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture openGraph(Token token, URL targetURL) throws StreamException { - checkNotNull(targetURL, "Missing url"); - - try { - final URL url = buildOpenGraphURL(baseURL); - return httpClient - .execute( - buildGet( - url, key, token, new CustomQueryParameter("url", targetURL.toExternalForm()))) - .thenApply( - response -> { - try { - return deserialize(response, OGData.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public T getHTTPClientImplementation() { - return httpClient.getImplementation(); - } - - public CompletableFuture getActivities( - Token token, FeedID feed, RequestOption... options) throws StreamException { - checkNotNull(options, "Missing request options"); - - try { - final URL url = buildFeedURL(baseURL, feed, "/"); - return httpClient.execute(buildGet(url, key, token, options)); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture getEnrichedActivities( - Token token, FeedID feed, RequestOption... options) throws StreamException { - checkNotNull(options, "Missing request options"); - - try { - final URL url = buildEnrichedFeedURL(baseURL, feed, "/"); - return httpClient.execute(buildGet(url, key, token, options)); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture addActivity( - Token token, FeedID feed, Activity activity, RequestOption... options) throws StreamException { - checkNotNull(activity, "No activity to add"); - - try { - final byte[] payload = toJSON(activity); - final URL url = buildFeedURL(baseURL, feed, "/"); - return httpClient.execute(buildPost(url, key, token, payload, options)); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture addActivities( - Token token, FeedID feed, Activity... activityObjects) throws StreamException { - return addActivities(token, feed, activityObjects, new RequestOption[0]); - } - - public CompletableFuture addActivities( - Token token, FeedID feed, Activity[] activityObjects, RequestOption... options) - throws StreamException { - checkNotNull(activityObjects, "No activities to add"); - - try { - final byte[] payload = - toJSON( - new Object() { - public final Activity[] activities = activityObjects; - }); - final URL url = buildFeedURL(baseURL, feed, "/"); - return httpClient.execute(buildPost(url, key, token, payload, options)); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture removeActivityByID(Token token, FeedID feed, String id) - throws StreamException { - checkNotNull(id, "No activity id to remove"); - - try { - final URL url = buildFeedURL(baseURL, feed, '/' + id + '/'); - return httpClient.execute(buildDelete(url, key, token)); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture removeActivityByForeignID( - Token token, FeedID feed, String foreignID) throws StreamException { - checkNotNull(foreignID, "No activity id to remove"); - - try { - final URL url = buildFeedURL(baseURL, feed, '/' + foreignID + '/'); - return httpClient.execute( - buildDelete(url, key, token, new CustomQueryParameter("foreign_id", "1"))); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture follow( - Token token, Token targetToken, FeedID sourceFeed, FeedID targetFeed, int activityCopyLimit) - throws StreamException { - checkNotNull(targetFeed, "No feed to follow"); - checkArgument(sourceFeed != targetFeed, "Feed can't follow itself"); - checkArgument(activityCopyLimit >= 0, "Activity copy limit should be a non-negative number"); - - try { - final byte[] payload = - toJSON( - new Object() { - public String target = targetFeed.toString(); - public int activity_copy_limit = activityCopyLimit; - public String target_token = targetToken.toString(); - }); - final URL url = buildFeedURL(baseURL, sourceFeed, "/following/"); - return httpClient.execute(buildPost(url, key, token, payload)); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture getFollowers( - Token token, FeedID feed, RequestOption... options) throws StreamException { - checkNotNull(options, "Missing request options"); - - try { - final URL url = buildFeedURL(baseURL, feed, "/followers/"); - return httpClient.execute(buildGet(url, key, token, options)); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture getFollowed(Token token, FeedID feed, RequestOption... options) - throws StreamException { - checkNotNull(options, "Missing request options"); - - try { - final URL url = buildFeedURL(baseURL, feed, "/following/"); - return httpClient.execute(buildGet(url, key, token, options)); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture unfollow( - Token token, FeedID source, FeedID target, RequestOption... options) throws StreamException { - checkNotNull(options, "Missing request options"); - checkNotNull(target, "No target feed to unfollow"); - - try { - final URL url = buildFeedURL(baseURL, source, "/following/" + target + '/'); - return httpClient.execute(buildDelete(url, key, token, options)); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture getFollowStats( - Token token, - FeedID feed, - String[] followerSlugs, - String[] followingSlugs, - RequestOption... options) - throws StreamException { - try { - final URL url = followStatsPath(baseURL); - final List params = new ArrayList<>(4); - final String feedId = String.join(":", feed.getSlug(), feed.getUserID()); - params.add(new CustomQueryParameter("followers", feedId)); - params.add(new CustomQueryParameter("following", feedId)); - - if (followerSlugs != null && followerSlugs.length > 0) { - params.add(new CustomQueryParameter("followers_slugs", String.join(",", followerSlugs))); - } - if (followingSlugs != null && followingSlugs.length > 0) { - params.add(new CustomQueryParameter("following_slugs", String.join(",", followingSlugs))); - } - - return httpClient.execute( - buildGet(url, key, token, params.toArray(new CustomQueryParameter[0]))); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture updateActivityToTargets( - Token token, FeedID feed, Activity activity, FeedID[] add, FeedID[] remove, FeedID[] replace) - throws StreamException { - checkNotNull(activity, "No activity to update"); - checkNotNull(activity.getForeignID(), "Activity is required to have foreign ID attribute"); - checkNotNull(activity.getTime(), "Activity is required to have time attribute"); - checkNotNull(add, "No targets to add"); - checkNotNull(remove, "No targets to remove"); - checkNotNull(replace, "No targets to set"); - boolean modification = replace.length == 0 && (add.length > 0 || remove.length > 0); - boolean replacement = replace.length > 0 && add.length == 0 && remove.length == 0; - checkArgument( - modification || replacement, - "Can't replace and modify activity to targets at the same time"); - - final String[] addedTargets = - J8Arrays.stream(add).map(id -> id.toString()).toArray(String[]::new); - final String[] removedTargets = - J8Arrays.stream(remove).map(id -> id.toString()).toArray(String[]::new); - final String[] newTargets = - J8Arrays.stream(replace).map(id -> id.toString()).toArray(String[]::new); - - try { - final byte[] payload = - toJSON( - new Object() { - public String foreign_id = activity.getForeignID(); - - @JsonFormat( - shape = JsonFormat.Shape.STRING, - pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS", - lenient = OptBoolean.FALSE, - timezone = "UTC") - public Date time = activity.getTime(); - - public String[] added_targets = addedTargets; - public String[] removed_targets = removedTargets; - public String[] new_targets = newTargets; - }); - final URL url = buildToTargetUpdateURL(baseURL, feed); - return httpClient.execute(buildPost(url, key, token, payload)); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture getUser(Token token, String id, boolean withFollowCounts) - throws StreamException { - checkNotNull(id, "Missing user ID"); - checkArgument(!id.isEmpty(), "Missing user ID"); - - try { - final URL url = buildUsersURL(baseURL, id + '/'); - return httpClient.execute( - buildGet( - url, - key, - token, - new CustomQueryParameter("with_follow_counts", Boolean.toString(withFollowCounts)))); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture deleteUser(Token token, String id) throws StreamException { - checkNotNull(id, "Missing user ID"); - checkArgument(!id.isEmpty(), "Missing user ID"); - - try { - final URL url = buildUsersURL(baseURL, id + '/'); - return httpClient.execute(buildDelete(url, key, token)); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture createUser( - Token token, String userID, Data userData, boolean getOrCreate) throws StreamException { - checkNotNull(userID, "Missing user ID"); - checkNotNull(userData, "Missing user data"); - checkArgument(!userID.isEmpty(), "Missing user ID"); - - try { - final byte[] payload = - toJSON( - new Object() { - public String id = userID; - public Map data = userData.getData(); - }); - final URL url = buildUsersURL(baseURL); - return httpClient.execute( - buildPost( - url, - key, - token, - payload, - new CustomQueryParameter("get_or_create", Boolean.toString(getOrCreate)))); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture updateUser(Token token, String userID, Data userData) - throws StreamException { - checkNotNull(userID, "Missing user ID"); - checkNotNull(userData, "Missing user data"); - checkArgument(!userID.isEmpty(), "Missing user ID"); - - try { - final byte[] payload = - toJSON( - new Object() { - public Map data = userData.getData(); - }); - final URL url = buildUsersURL(baseURL, userID + '/'); - return httpClient.execute(buildPut(url, key, token, payload)); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture deleteActivities(Token token, BatchDeleteActivitiesRequest request) throws StreamException { - try { - final URL url = deleteActivitiesURL(baseURL); - final byte[] payload = toJSON(request); - io.getstream.core.http.Request httpRequest = buildPost(url, key, token, payload); - return httpClient.execute(httpRequest).thenApply(response -> null); - } catch (Exception e) { - throw new StreamException(e); - } - } - - public CompletableFuture deleteReactions(Token token, BatchDeleteReactionsRequest request) throws StreamException { - try { - - final URL url = deleteReactionsURL(baseURL); - final byte[] payload = toJSON(request); - io.getstream.core.http.Request httpRequest = buildPost(url, key, token, payload); - - return httpClient.execute(httpRequest).thenApply(response -> null); - } catch (Exception e) { - throw new StreamException(e); - } - } - - public CompletableFuture exportUserActivities(Token token, String userId) throws StreamException { - if (userId == null || userId.isEmpty()) { - throw new IllegalArgumentException("User ID can't be null or empty"); - } - - try { - final URL url = buildExportIDsURL(baseURL, userId); - io.getstream.core.http.Request request = buildGet(url, key, token); - return httpClient - .execute(request) - .thenApply( - response -> { - try { - return deserialize(response, ExportIDsResponse.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture queryAuditLogs(Token token, RequestOption... options) throws StreamException { - try { - final URL url = buildAuditLogsURL(baseURL); - return httpClient - .execute(buildGet(url, key, token, options)) - .thenApply( - response -> { - try { - return deserialize(response, io.getstream.client.QueryAuditLogsResponse.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } -} diff --git a/src/main/java/io/getstream/core/StreamAnalytics.java b/src/main/java/io/getstream/core/StreamAnalytics.java deleted file mode 100644 index 8e0e22dd..00000000 --- a/src/main/java/io/getstream/core/StreamAnalytics.java +++ /dev/null @@ -1,103 +0,0 @@ -package io.getstream.core; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Request.buildPost; -import static io.getstream.core.utils.Routes.buildAnalyticsURL; -import static io.getstream.core.utils.Serialization.deserializeError; -import static io.getstream.core.utils.Serialization.toJSON; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.google.common.base.Charsets; -import com.google.common.collect.ObjectArrays; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.Token; -import io.getstream.core.models.Engagement; -import io.getstream.core.models.Impression; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public final class StreamAnalytics { - private final String key; - private final URL baseURL; - private final HTTPClient httpClient; - - StreamAnalytics(String key, URL baseURL, HTTPClient httpClient) { - this.key = key; - this.baseURL = baseURL; - this.httpClient = httpClient; - } - - public CompletableFuture trackEngagement(Token token, Engagement... events) - throws StreamException { - checkNotNull(events, "No events to track"); - checkArgument(events.length > 0, "No events to track"); - - try { - final byte[] payload = - toJSON( - new Object() { - public final Engagement[] content_list = events; - }); - final URL url = buildAnalyticsURL(baseURL, "engagement/"); - return httpClient - .execute(buildPost(url, key, token, payload)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture trackImpression(Token token, Impression event) - throws StreamException { - checkNotNull(event, "No events to track"); - - try { - final byte[] payload = toJSON(event); - final URL url = buildAnalyticsURL(baseURL, "impression/"); - return httpClient - .execute(buildPost(url, key, token, payload)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public URL createRedirectURL( - Token token, URL url, Impression[] impressions, Engagement[] engagements) - throws StreamException { - try { - final byte[] events = toJSON(ObjectArrays.concat(impressions, engagements, Object.class)); - return HTTPClient.requestBuilder() - .url(buildAnalyticsURL(baseURL, "redirect/")) - .addQueryParameter("api_key", key) - .addQueryParameter("url", url.toExternalForm()) - .addQueryParameter("events", new String(events, Charsets.UTF_8)) - .addQueryParameter("auth_type", "jwt") - .addQueryParameter("authorization", token.toString()) - .build() - .getURL(); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } -} diff --git a/src/main/java/io/getstream/core/StreamBatch.java b/src/main/java/io/getstream/core/StreamBatch.java deleted file mode 100644 index e171b572..00000000 --- a/src/main/java/io/getstream/core/StreamBatch.java +++ /dev/null @@ -1,288 +0,0 @@ -package io.getstream.core; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Request.buildGet; -import static io.getstream.core.utils.Request.buildPost; -import static io.getstream.core.utils.Routes.*; -import static io.getstream.core.utils.Serialization.*; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.google.common.base.Joiner; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.Token; -import io.getstream.core.models.*; -import io.getstream.core.options.CustomQueryParameter; -import io.getstream.core.options.EnrichmentFlags; -import io.getstream.core.options.RequestOption; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java.text.SimpleDateFormat; -import java.util.List; -import java.util.TimeZone; -import java8.util.J8Arrays; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public final class StreamBatch { - private final String key; - private final URL baseURL; - private final HTTPClient httpClient; - - public StreamBatch(String key, URL baseURL, HTTPClient httpClient) { - this.key = key; - this.baseURL = baseURL; - this.httpClient = httpClient; - } - - public CompletableFuture addToMany(Token token, Activity activity, FeedID... feeds) - throws StreamException { - checkNotNull(activity, "Missing activity"); - checkNotNull(feeds, "No feeds to add to"); - checkArgument(feeds.length > 0, "No feeds to add to"); - - // XXX: renaming the variable so we can unambiguously name payload field 'activity' - Activity data = activity; - String[] feedIDs = J8Arrays.stream(feeds).map(feed -> feed.toString()).toArray(String[]::new); - try { - final byte[] payload = - toJSON( - new Object() { - public final Activity activity = data; - public final String[] feeds = feedIDs; - }); - final URL url = buildAddToManyURL(baseURL); - return httpClient - .execute(buildPost(url, key, token, payload)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture followMany( - Token token, int activityCopyLimit, FollowRelation... follows) throws StreamException { - checkArgument(activityCopyLimit >= 0, "Activity copy limit must be non negative"); - checkNotNull(follows, "No feeds to follow"); - checkArgument(follows.length > 0, "No feeds to follow"); - - try { - final byte[] payload = toJSON(follows); - final URL url = buildFollowManyURL(baseURL); - return httpClient - .execute( - buildPost( - url, - key, - token, - payload, - new CustomQueryParameter( - "activity_copy_limit", Integer.toString(activityCopyLimit)))) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture unfollowMany(Token token, UnfollowOperation... unfollows) - throws StreamException { - checkNotNull(unfollows, "No feeds to unfollow"); - checkArgument(unfollows.length > 0, "No feeds to unfollow"); - - try { - final byte[] payload = toJSON(unfollows); - final URL url = buildUnfollowManyURL(baseURL); - return httpClient - .execute(buildPost(url, key, token, payload)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture> getActivitiesByID(Token token, String... activityIDs) - throws StreamException { - checkNotNull(activityIDs, "No activities to get"); - checkArgument(activityIDs.length > 0, "No activities to get"); - - try { - final URL url = buildActivitiesURL(baseURL); - return httpClient - .execute( - buildGet( - url, - key, - token, - new CustomQueryParameter("ids", Joiner.on(",").join(activityIDs)))) - .thenApply( - response -> { - try { - return deserializeContainer(response, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture> getEnrichedActivitiesByID( - Token token, EnrichmentFlags flags, String... activityIDs) throws StreamException { - checkNotNull(activityIDs, "No activities to get"); - checkArgument(activityIDs.length > 0, "No activities to get"); - - try { - final URL url = buildEnrichedActivitiesURL(baseURL); - return httpClient - .execute( - buildGet( - url, - key, - token, - flags, - new CustomQueryParameter("ids", Joiner.on(",").join(activityIDs)))) - .thenApply( - response -> { - try { - return deserializeContainer(response, EnrichedActivity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture> getActivitiesByForeignID( - Token token, ForeignIDTimePair... activityIDTimePairs) throws StreamException { - checkNotNull(activityIDTimePairs, "No activities to get"); - checkArgument(activityIDTimePairs.length > 0, "No activities to get"); - - SimpleDateFormat timestampFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); - timestampFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - timestampFormat.setLenient(false); - - String[] foreignIDs = - J8Arrays.stream(activityIDTimePairs) - .map(pair -> pair.getForeignID()) - .toArray(String[]::new); - String[] timestamps = - J8Arrays.stream(activityIDTimePairs) - .map(pair -> timestampFormat.format(pair.getTime())) - .toArray(String[]::new); - try { - final URL url = buildActivitiesURL(baseURL); - final RequestOption[] options = - new RequestOption[] { - new CustomQueryParameter("foreign_ids", Joiner.on(",").join(foreignIDs)), - new CustomQueryParameter("timestamps", Joiner.on(",").join(timestamps)) - }; - return httpClient - .execute(buildGet(url, key, token, options)) - .thenApply( - response -> { - try { - return deserializeContainer(response, Activity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture> getEnrichedActivitiesByForeignID( - Token token, ForeignIDTimePair... activityIDTimePairs) throws StreamException { - checkNotNull(activityIDTimePairs, "No activities to get"); - checkArgument(activityIDTimePairs.length > 0, "No activities to get"); - - SimpleDateFormat timestampFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); - timestampFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - timestampFormat.setLenient(false); - - String[] foreignIDs = - J8Arrays.stream(activityIDTimePairs) - .map(pair -> pair.getForeignID()) - .toArray(String[]::new); - String[] timestamps = - J8Arrays.stream(activityIDTimePairs) - .map(pair -> timestampFormat.format(pair.getTime())) - .toArray(String[]::new); - try { - final URL url = buildEnrichedActivitiesURL(baseURL); - final RequestOption[] options = - new RequestOption[] { - new CustomQueryParameter("foreign_ids", Joiner.on(",").join(foreignIDs)), - new CustomQueryParameter("timestamps", Joiner.on(",").join(timestamps)) - }; - return httpClient - .execute(buildGet(url, key, token, options)) - .thenApply( - response -> { - try { - return deserializeContainer(response, EnrichedActivity.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture updateActivities(Token token, Activity... activities) - throws StreamException { - checkNotNull(activities, "No activities to update"); - checkArgument(activities.length > 0, "No activities to update"); - - try { - // XXX: renaming the variable so we can unambiguously name payload field 'activities' - Activity[] data = activities; - final byte[] payload = - toJSON( - new Object() { - public final Activity[] activities = data; - }); - final URL url = buildActivitiesURL(baseURL); - return httpClient - .execute(buildPost(url, key, token, payload)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } -} diff --git a/src/main/java/io/getstream/core/StreamCollections.java b/src/main/java/io/getstream/core/StreamCollections.java deleted file mode 100644 index c00e982f..00000000 --- a/src/main/java/io/getstream/core/StreamCollections.java +++ /dev/null @@ -1,238 +0,0 @@ -package io.getstream.core; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Request.*; -import static io.getstream.core.utils.Routes.buildBatchCollectionsURL; -import static io.getstream.core.utils.Routes.buildCollectionsURL; -import static io.getstream.core.utils.Serialization.*; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.google.common.base.Joiner; -import com.google.common.collect.ImmutableMap; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.Token; -import io.getstream.core.models.CollectionData; -import io.getstream.core.options.CustomQueryParameter; -import io.getstream.core.options.RequestOption; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.List; -import java.util.Map; -import java8.util.J8Arrays; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; -import java8.util.stream.Collectors; - -public final class StreamCollections { - private final String key; - private final URL baseURL; - private final HTTPClient httpClient; - - StreamCollections(String key, URL baseURL, HTTPClient httpClient) { - this.key = key; - this.baseURL = baseURL; - this.httpClient = httpClient; - } - - public CompletableFuture add( - Token token, String userID, String collection, CollectionData item) throws StreamException { - checkNotNull(collection, "Collection name can't be null"); - checkArgument(!collection.isEmpty(), "Collection name can't be empty"); - checkNotNull(item, "Collection data can't be null"); - - try { - ImmutableMap.Builder builder = - new ImmutableMap.Builder().put("data", item.getData()); - if (userID != null) { - builder.put("user_id", userID); - } - if (item.getID() != null) { - builder.put("id", item.getID()); - } - final byte[] payload = toJSON(builder.build()); - final URL url = buildCollectionsURL(baseURL, collection + '/'); - return httpClient - .execute(buildPost(url, key, token, payload)) - .thenApply( - response -> { - try { - return deserialize(response, CollectionData.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture update( - Token token, String userID, String collection, CollectionData item) throws StreamException { - checkNotNull(collection, "Collection name can't be null"); - checkArgument(!collection.isEmpty(), "Collection name can't be empty"); - checkNotNull(item, "Collection data can't be null"); - - try { - ImmutableMap.Builder builder = - new ImmutableMap.Builder().put("data", item.getData()); - if (userID != null) { - builder.put("user_id", userID); - } - final byte[] payload = toJSON(builder.build()); - final URL url = buildCollectionsURL(baseURL, collection + '/' + item.getID() + '/'); - return httpClient - .execute(buildPut(url, key, token, payload)) - .thenApply( - response -> { - try { - return deserialize(response, CollectionData.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture upsert(Token token, String collection, CollectionData... items) - throws StreamException { - checkNotNull(collection, "Collection name can't be null"); - checkArgument(!collection.isEmpty(), "Collection name can't be empty"); - checkArgument(items.length > 0, "Collection data can't be empty"); - - try { - final byte[] payload = - toJSON( - new Object() { - public final Map data = - ImmutableMap.of(collection, items); - }); - final URL url = buildBatchCollectionsURL(baseURL); - return httpClient - .execute(buildPost(url, key, token, payload)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture get(Token token, String collection, String id) - throws StreamException { - checkNotNull(collection, "Collection name can't be null"); - checkArgument(!collection.isEmpty(), "Collection name can't be empty"); - checkNotNull(id, "Collection id can't be null"); - checkArgument(!id.isEmpty(), "Collection id can't be empty"); - - try { - final URL url = buildCollectionsURL(baseURL, collection + '/' + id + '/'); - return httpClient - .execute(buildGet(url, key, token)) - .thenApply( - response -> { - try { - return deserialize(response, CollectionData.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture> select( - Token token, String collection, String... ids) throws StreamException { - checkNotNull(collection, "Collection name can't be null"); - checkArgument(!collection.isEmpty(), "Collection name can't be empty"); - checkArgument(ids.length > 0, "Collection ids can't be empty"); - - List foreignIDs = - J8Arrays.stream(ids) - .map(id -> String.format("%s:%s", collection, id)) - .collect(Collectors.toList()); - try { - final URL url = buildBatchCollectionsURL(baseURL); - return httpClient - .execute( - buildGet( - url, - key, - token, - new CustomQueryParameter("foreign_ids", Joiner.on(",").join(foreignIDs)))) - .thenApply( - response -> { - try { - return deserializeContainer(response, "response.data", CollectionData.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture delete(Token token, String collection, String id) - throws StreamException { - checkNotNull(collection, "Collection name can't be null"); - checkArgument(!collection.isEmpty(), "Collection name can't be empty"); - checkNotNull(id, "Collection id can't be null"); - checkArgument(!id.isEmpty(), "Collection id can't be empty"); - - try { - final URL url = buildCollectionsURL(baseURL, collection + '/' + id + '/'); - return httpClient - .execute(buildDelete(url, key, token)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture deleteMany(Token token, String collection, String... ids) - throws StreamException { - checkNotNull(collection, "Collection name can't be null"); - checkArgument(!collection.isEmpty(), "Collection name can't be empty"); - checkArgument(ids.length > 0, "Collection ids can't be empty"); - - try { - final URL url = buildBatchCollectionsURL(baseURL); - final RequestOption[] options = - new RequestOption[] { - new CustomQueryParameter("collection_name", collection), - new CustomQueryParameter("ids", Joiner.on(",").join(ids)) - }; - return httpClient - .execute(buildDelete(url, key, token, options)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } -} diff --git a/src/main/java/io/getstream/core/StreamFiles.java b/src/main/java/io/getstream/core/StreamFiles.java deleted file mode 100644 index 0da2318c..00000000 --- a/src/main/java/io/getstream/core/StreamFiles.java +++ /dev/null @@ -1,98 +0,0 @@ -package io.getstream.core; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Request.buildDelete; -import static io.getstream.core.utils.Request.buildMultiPartPost; -import static io.getstream.core.utils.Routes.buildFilesURL; -import static io.getstream.core.utils.Serialization.deserialize; -import static io.getstream.core.utils.Serialization.deserializeError; - -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.Token; -import io.getstream.core.options.CustomQueryParameter; -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public class StreamFiles { - private final String key; - private final URL baseURL; - private final HTTPClient httpClient; - - StreamFiles(String key, URL baseURL, HTTPClient httpClient) { - this.key = key; - this.baseURL = baseURL; - this.httpClient = httpClient; - } - - public CompletableFuture upload(Token token, String fileName, byte[] content) - throws StreamException { - checkNotNull(content, "No data to upload"); - checkArgument(content.length > 0, "No data to upload"); - - try { - final URL url = buildFilesURL(baseURL); - return httpClient - .execute(buildMultiPartPost(url, key, token, fileName, content)) - .thenApply( - response -> { - try { - return deserialize(response, "file", URL.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture upload(Token token, File content) throws StreamException { - checkNotNull(content, "No file to upload"); - checkArgument(content.exists(), "No file to upload"); - - try { - final URL url = buildFilesURL(baseURL); - return httpClient - .execute(buildMultiPartPost(url, key, token, content)) - .thenApply( - response -> { - try { - return deserialize(response, "file", URL.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture delete(Token token, URL targetURL) throws StreamException { - checkNotNull(targetURL, "No file to delete"); - - try { - final URL url = buildFilesURL(baseURL); - return httpClient - .execute( - buildDelete( - url, key, token, new CustomQueryParameter("url", targetURL.toExternalForm()))) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } -} diff --git a/src/main/java/io/getstream/core/StreamImages.java b/src/main/java/io/getstream/core/StreamImages.java deleted file mode 100644 index 0fbb2e88..00000000 --- a/src/main/java/io/getstream/core/StreamImages.java +++ /dev/null @@ -1,125 +0,0 @@ -package io.getstream.core; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Request.*; -import static io.getstream.core.utils.Routes.buildImagesURL; -import static io.getstream.core.utils.Serialization.deserialize; -import static io.getstream.core.utils.Serialization.deserializeError; - -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.Token; -import io.getstream.core.options.CustomQueryParameter; -import io.getstream.core.options.RequestOption; -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public class StreamImages { - private final String key; - private final URL baseURL; - private final HTTPClient httpClient; - - StreamImages(String key, URL baseURL, HTTPClient httpClient) { - this.key = key; - this.baseURL = baseURL; - this.httpClient = httpClient; - } - - public CompletableFuture upload(Token token, String fileName, byte[] content) - throws StreamException { - checkNotNull(content, "No data to upload"); - checkArgument(content.length > 0, "No data to upload"); - - try { - final URL url = buildImagesURL(baseURL); - return httpClient - .execute(buildMultiPartPost(url, key, token, fileName, content)) - .thenApply( - response -> { - try { - return deserialize(response, "file", URL.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture upload(Token token, File content) throws StreamException { - checkNotNull(content, "No file to upload"); - checkArgument(content.exists(), "No file to upload"); - - try { - final URL url = buildImagesURL(baseURL); - return httpClient - .execute(buildMultiPartPost(url, key, token, content)) - .thenApply( - response -> { - try { - return deserialize(response, "file", URL.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture delete(Token token, URL targetURL) throws StreamException { - checkNotNull(targetURL, "No image to delete"); - - try { - final URL url = buildImagesURL(baseURL); - return httpClient - .execute( - buildDelete( - url, key, token, new CustomQueryParameter("url", targetURL.toExternalForm()))) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture process(Token token, URL targetURL, RequestOption option) - throws StreamException { - checkNotNull(targetURL, "No image to process"); - - try { - final URL url = buildImagesURL(baseURL); - return httpClient - .execute( - buildGet( - url, - key, - token, - option, - new CustomQueryParameter("url", targetURL.toExternalForm()))) - .thenApply( - response -> { - try { - return deserialize(response, "file", URL.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } -} diff --git a/src/main/java/io/getstream/core/StreamPersonalization.java b/src/main/java/io/getstream/core/StreamPersonalization.java deleted file mode 100644 index b3f24663..00000000 --- a/src/main/java/io/getstream/core/StreamPersonalization.java +++ /dev/null @@ -1,129 +0,0 @@ -package io.getstream.core; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Request.*; -import static io.getstream.core.utils.Routes.buildPersonalizationURL; -import static io.getstream.core.utils.Serialization.*; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.Token; -import io.getstream.core.options.CustomQueryParameter; -import io.getstream.core.options.RequestOption; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.Map; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; -import java8.util.stream.StreamSupport; - -public final class StreamPersonalization { - private final String key; - private final URL baseURL; - private final HTTPClient httpClient; - - StreamPersonalization(String key, URL baseURL, HTTPClient httpClient) { - this.key = key; - this.baseURL = baseURL; - this.httpClient = httpClient; - } - - public CompletableFuture> get( - Token token, String userID, String resource, Map params) - throws StreamException { - checkNotNull(resource, "Resource can't be empty"); - checkArgument(!resource.isEmpty(), "Resource can't be empty"); - checkNotNull(params, "Missing params"); - - try { - final URL url = buildPersonalizationURL(baseURL, resource + '/'); - final RequestOption[] options = - StreamSupport.stream(params.entrySet()) - .map(entry -> new CustomQueryParameter(entry.getKey(), entry.getValue().toString())) - .toArray(RequestOption[]::new); - return httpClient - .execute(buildGet(url, key, token, options)) - .thenApply( - response -> { - try { - return deserialize(response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture post( - Token token, - String userID, - String resource, - Map params, - Map payload) - throws StreamException { - checkNotNull(resource, "Resource can't be empty"); - checkArgument(!resource.isEmpty(), "Resource can't be empty"); - checkNotNull(params, "Missing params"); - checkNotNull(params, "Missing payload"); - - try { - final byte[] jsonPayload = - toJSON( - new Object() { - public final Map data = payload; - }); - final URL url = buildPersonalizationURL(baseURL, resource + '/'); - final RequestOption[] options = - StreamSupport.stream(params.entrySet()) - .map(entry -> new CustomQueryParameter(entry.getKey(), entry.getValue().toString())) - .toArray(RequestOption[]::new); - return httpClient - .execute(buildPost(url, key, token, jsonPayload, options)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture delete( - Token token, String userID, String resource, Map params) - throws StreamException { - checkNotNull(resource, "Resource can't be empty"); - checkArgument(!resource.isEmpty(), "Resource can't be empty"); - checkNotNull(params, "Missing params"); - - try { - final URL url = buildPersonalizationURL(baseURL, resource + '/'); - final RequestOption[] options = - params.entrySet().stream() - .map(entry -> new CustomQueryParameter(entry.getKey(), entry.getValue().toString())) - .toArray(RequestOption[]::new); - return httpClient - .execute(buildDelete(url, key, token, options)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } -} diff --git a/src/main/java/io/getstream/core/StreamReactions.java b/src/main/java/io/getstream/core/StreamReactions.java deleted file mode 100644 index cb9c7357..00000000 --- a/src/main/java/io/getstream/core/StreamReactions.java +++ /dev/null @@ -1,393 +0,0 @@ -package io.getstream.core; - -import static com.google.common.base.MoreObjects.firstNonNull; -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Request.*; -import static io.getstream.core.utils.Routes.buildReactionsURL; -import static io.getstream.core.utils.Routes.buildGetReactionsBatchURL; -import static io.getstream.core.utils.Serialization.*; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.google.common.collect.ImmutableMap; -import io.getstream.core.exceptions.StreamException; -import io.getstream.core.http.HTTPClient; -import io.getstream.core.http.Request; -import io.getstream.core.http.Token; -import io.getstream.core.models.FeedID; -import io.getstream.core.models.Paginated; -import io.getstream.core.models.Reaction; -import io.getstream.core.models.ReactionBatch; -import io.getstream.core.options.CustomQueryParameter; -import io.getstream.core.options.Filter; -import io.getstream.core.options.Limit; -import io.getstream.core.options.RequestOption; -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.List; -import java.util.Map; -import java8.util.J8Arrays; -import java8.util.concurrent.CompletableFuture; -import java8.util.concurrent.CompletionException; - -public final class StreamReactions { - private final String key; - private final URL baseURL; - private final HTTPClient httpClient; - - StreamReactions(String key, URL baseURL, HTTPClient httpClient) { - this.key = key; - this.baseURL = baseURL; - this.httpClient = httpClient; - } - - public CompletableFuture get(Token token, String id) throws StreamException { - checkNotNull(id, "Reaction id can't be null"); - checkArgument(!id.isEmpty(), "Reaction id can't be empty"); - - try { - final URL url = buildReactionsURL(baseURL, id + '/'); - return httpClient - .execute(buildGet(url, key, token)) - .thenApply( - response -> { - try { - return deserialize(response, Reaction.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture getPaginated(Token token, String id) throws StreamException { - checkNotNull(id, "Reaction id can't be null"); - checkArgument(!id.isEmpty(), "Reaction id can't be empty"); - - try { - final URL url = buildReactionsURL(baseURL, id + '/'); - return httpClient - .execute(buildGet(url, key, token)) - .thenApply( - response -> { - try { - return deserialize(response, Paginated.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture> filter( - Token token, LookupKind lookup, String id, Filter filter, Limit limit, String kind) - throws StreamException { - return filter(token, lookup, id, filter, limit, kind, null, ""); - } - - public CompletableFuture> filter( - Token token, - LookupKind lookup, - String id, - Filter filter, - Limit limit, - String kind, - Boolean withOwnChildren, - String filterUserId) - throws StreamException { - checkNotNull(lookup, "Lookup kind can't be null"); - checkNotNull(id, "Reaction ID can't be null"); - checkArgument(!id.isEmpty(), "Reaction ID can't be empty"); - checkNotNull(filter, "Filter can't be null"); - checkNotNull(kind, "Kind can't be null"); - - try { - final URL url = buildReactionsURL(baseURL, lookup.getKind() + '/' + id + '/' + kind); - RequestOption withActivityData = - new CustomQueryParameter( - "with_activity_data", Boolean.toString(lookup == LookupKind.ACTIVITY_WITH_DATA)); - RequestOption ownChildren = - new CustomQueryParameter( - "withOwnChildren", Boolean.toString(withOwnChildren != null && withOwnChildren)); - RequestOption filterByUser = - new CustomQueryParameter( - "filter_user_id", filterUserId); - - return httpClient - .execute(buildGet(url, key, token, filter, limit, withActivityData, ownChildren, filterByUser)) - .thenApply( - response -> { - try { - return deserializeContainer(response, Reaction.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture> paginatedFilter( - Token token, LookupKind lookup, String id, Filter filter, Limit limit, String kind) - throws StreamException { - return paginatedFilter(token, lookup, id, filter, limit, kind, null); - } - - public CompletableFuture> paginatedFilter( - Token token, - LookupKind lookup, - String id, - Filter filter, - Limit limit, - String kind, - Boolean withOwnChildren) - throws StreamException { - checkNotNull(lookup, "Lookup kind can't be null"); - checkNotNull(id, "Reaction ID can't be null"); - checkArgument(!id.isEmpty(), "Reaction ID can't be empty"); - checkNotNull(filter, "Filter can't be null"); - checkNotNull(kind, "Kind can't be null"); - - try { - final URL url = buildReactionsURL(baseURL, lookup.getKind() + '/' + id + '/' + kind); - RequestOption withActivityData = - new CustomQueryParameter( - "with_activity_data", Boolean.toString(lookup == LookupKind.ACTIVITY_WITH_DATA)); - RequestOption ownChildren = - new CustomQueryParameter( - "withOwnChildren", Boolean.toString(withOwnChildren != null && withOwnChildren)); - - return httpClient - .execute(buildGet(url, key, token, filter, limit, withActivityData, ownChildren)) - .thenApply( - response -> { - try { - return deserialize(response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture> paginatedFilter(Token token, String next) - throws StreamException { - checkNotNull(next, "next can't be null"); - checkArgument(!next.trim().isEmpty(), "next can't be empty"); - - try { - final URL url = new URL(baseURL, next); - return httpClient - .execute(buildGet(url, key, token)) - .thenApply( - response -> { - try { - return deserialize(response, new TypeReference>() {}); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture add( - Token token, String userID, Reaction reaction, FeedID... targetFeeds) throws StreamException { - return add(token, userID, reaction, targetFeeds, null); - } - - public CompletableFuture add( - Token token, String userID, Reaction reaction, FeedID[] targetFeeds, Map targetFeedsExtraData, RequestOption... options) throws StreamException { - checkNotNull(reaction, "Reaction can't be null"); - checkArgument( - reaction.getActivityID() != null || reaction.getParent() != null, - "Reaction has to either have and activity ID or parent"); - checkArgument( - reaction.getActivityID() == null || reaction.getParent() == null, - "Reaction can't have both activity ID and parent"); - if (reaction.getActivityID() != null) { - checkArgument(!reaction.getActivityID().isEmpty(), "Reaction activity ID can't be empty"); - } - if (reaction.getParent() != null) { - checkArgument(!reaction.getParent().isEmpty(), "Reaction parent can't be empty"); - } - checkNotNull(reaction.getKind(), "Reaction kind can't be null"); - checkArgument(!reaction.getKind().isEmpty(), "Reaction kind can't be empty"); - - String[] targetFeedIDs = - J8Arrays.stream(targetFeeds).map(feed -> feed.toString()).toArray(String[]::new); - - try { - ImmutableMap.Builder payloadBuilder = ImmutableMap.builder(); - payloadBuilder.put("kind", reaction.getKind()); - payloadBuilder.put("target_feeds", targetFeedIDs); - if (targetFeedsExtraData != null) { - payloadBuilder.put("target_feeds_extra_data", targetFeedsExtraData); - } - if (reaction.getActivityID() != null) { - payloadBuilder.put("activity_id", reaction.getActivityID()); - } - if (userID != null || reaction.getUserID() != null) { - payloadBuilder.put("user_id", firstNonNull(userID, reaction.getUserID())); - } - if (reaction.getParent() != null) { - payloadBuilder.put("parent", reaction.getParent()); - } - if (reaction.getId() != null) { - payloadBuilder.put("id", reaction.getId()); - } - if (reaction.getExtra() != null) { - payloadBuilder.put("data", reaction.getExtra()); - } - if (reaction.getModerationTemplate() != null) { - payloadBuilder.put("moderation_template", reaction.getModerationTemplate()); - } - final byte[] payload = toJSON(payloadBuilder.build()); - final URL url = buildReactionsURL(baseURL); - return httpClient - .execute(buildPost(url, key, token, payload, options)) - .thenApply( - response -> { - try { - return deserialize(response, Reaction.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture update(Token token, Reaction reaction, FeedID... targetFeeds) - throws StreamException { - return update(token, reaction, targetFeeds, new RequestOption[0]); - } - - public CompletableFuture update( - Token token, Reaction reaction, FeedID[] targetFeeds, RequestOption... options) - throws StreamException { - checkNotNull(reaction, "Reaction can't be null"); - checkNotNull(reaction.getId(), "Reaction id can't be null"); - checkArgument(!reaction.getId().isEmpty(), "Reaction id can't be empty"); - - String[] targetFeedIDs = - J8Arrays.stream(targetFeeds).map(feed -> feed.toString()).toArray(String[]::new); - - try { - ImmutableMap.Builder payloadBuilder = ImmutableMap.builder(); - payloadBuilder.put("data", reaction.getExtra()); - payloadBuilder.put("target_feeds", targetFeedIDs); - - if (reaction.getModerationTemplate() != null) { - payloadBuilder.put("moderation_template", reaction.getModerationTemplate()); - } - - final byte[] payload = toJSON(payloadBuilder.build()); - final URL url = buildReactionsURL(baseURL, reaction.getId() + '/'); - return httpClient - .execute(buildPut(url, key, token, payload, options)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (JsonProcessingException | MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture delete(Token token, String id, Boolean soft) - throws StreamException { - checkNotNull(id, "Reaction id can't be null"); - checkArgument(!id.isEmpty(), "Reaction id can't be empty"); - - try { - final URL url = buildReactionsURL(baseURL, id + '/'); - - final Request deleteRequest = - soft - ? buildDelete(url, key, token, new CustomQueryParameter("soft", "true")) - : buildDelete(url, key, token); - - return httpClient - .execute(deleteRequest) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture restore(Token token, String id) throws StreamException { - checkNotNull(id, "Reaction id can't be null"); - checkArgument(!id.isEmpty(), "Reaction id can't be empty"); - - try { - final URL url = buildReactionsURL(baseURL, id + "/restore/"); - byte[] payload = new byte[0]; - return httpClient - .execute(buildPut(url, key, token, payload)) - .thenApply( - response -> { - try { - return deserializeError(response); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } - - public CompletableFuture getBatchReactions(Token token, List ids, Boolean includeDeleted) throws StreamException { - checkNotNull(ids, "Reaction IDs can't be null"); - checkArgument(!ids.isEmpty(), "Reaction IDs can't be empty"); - - try { - final URL url = buildGetReactionsBatchURL(baseURL); - RequestOption optionIds = - new CustomQueryParameter( - "ids", String.join(",", ids) - ); - RequestOption includeDeletedOption = - new CustomQueryParameter( - "include_deleted", includeDeleted.toString() - ); - - return httpClient - .execute(buildGet(url, key, token, optionIds, includeDeletedOption)) - .thenApply( - response -> { - try { - return deserialize(response, ReactionBatch.class); - } catch (StreamException | IOException e) { - throw new CompletionException(e); - } - }); - } catch (MalformedURLException | URISyntaxException e) { - throw new StreamException(e); - } - } -} diff --git a/src/main/java/io/getstream/core/exceptions/StreamAPIException.java b/src/main/java/io/getstream/core/exceptions/StreamAPIException.java deleted file mode 100644 index a1ecb66c..00000000 --- a/src/main/java/io/getstream/core/exceptions/StreamAPIException.java +++ /dev/null @@ -1,61 +0,0 @@ -package io.getstream.core.exceptions; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -public final class StreamAPIException extends StreamException { - private final int errorCode; - private final int statusCode; - private final String errorName; - - @JsonCreator - public StreamAPIException( - @JsonProperty("detail") String message, - @JsonProperty("code") int errorCode, - @JsonProperty("status_code") int statusCode, - @JsonProperty("exception") String errorName) { - super(formatMessage(message, errorName, errorCode, statusCode)); - - this.errorCode = errorCode; - this.statusCode = statusCode; - this.errorName = errorName; - } - - private static String formatMessage( - String message, String errorName, int errorCode, int statusCode) { - StringBuilder result = new StringBuilder(); - if (errorName != null && !errorName.isEmpty()) { - result.append(errorName); - } - if (message != null && !message.isEmpty()) { - if (result.length() > 0) { - result.append(": "); - } - - result.append(message); - } - if (result.length() > 0) { - result.append(" "); - } - result.append("(code = "); - result.append(errorCode); - result.append(" status = "); - result.append(statusCode); - result.append(')'); - return result.toString(); - } - - public int getErrorCode() { - return errorCode; - } - - public int getStatusCode() { - return statusCode; - } - - public String getErrorName() { - return errorName; - } -} diff --git a/src/main/java/io/getstream/core/exceptions/StreamException.java b/src/main/java/io/getstream/core/exceptions/StreamException.java deleted file mode 100644 index 2833aa81..00000000 --- a/src/main/java/io/getstream/core/exceptions/StreamException.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.getstream.core.exceptions; - -public class StreamException extends Exception { - public StreamException() { - super(); - } - - public StreamException(String message) { - super(message); - } - - public StreamException(String message, Throwable cause) { - super(message, cause); - } - - public StreamException(Throwable cause) { - super(cause); - } - - protected StreamException( - String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } -} diff --git a/src/main/java/io/getstream/core/faye/Advice.java b/src/main/java/io/getstream/core/faye/Advice.java deleted file mode 100644 index 5d3a5779..00000000 --- a/src/main/java/io/getstream/core/faye/Advice.java +++ /dev/null @@ -1,68 +0,0 @@ -package io.getstream.core.faye; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.google.common.base.MoreObjects; -import java.util.Objects; - -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Advice { - private final String reconnect; - private final Integer interval; - private final Integer timeout; - - public static final String NONE = "none"; - public static final String HANDSHAKE = "handshake"; - public static final String RETRY = "retry"; - - // for deserialization - public Advice() { - reconnect = null; - interval = null; - timeout = null; - } - - public Advice(String reconnect, Integer interval, Integer timeout) { - this.reconnect = reconnect; - this.interval = interval; - this.timeout = timeout; - } - - public String getReconnect() { - return reconnect; - } - - public Integer getInterval() { - return interval; - } - - public Integer getTimeout() { - return timeout; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Advice that = (Advice) o; - return Objects.equals(reconnect, that.reconnect) - && Objects.equals(interval, that.interval) - && Objects.equals(timeout, that.timeout); - } - - @Override - public int hashCode() { - return Objects.hash(reconnect, interval, timeout); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .omitNullValues() - .add("reconnect", this.reconnect) - .add("interval", this.interval) - .add("timeout", this.timeout) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/faye/Channel.java b/src/main/java/io/getstream/core/faye/Channel.java deleted file mode 100644 index 988ee789..00000000 --- a/src/main/java/io/getstream/core/faye/Channel.java +++ /dev/null @@ -1,119 +0,0 @@ -package io.getstream.core.faye; - -import com.google.common.base.MoreObjects; -import io.getstream.core.faye.emitter.EventEmitter; -import io.getstream.core.faye.emitter.EventListener; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -public class Channel { - - public static final String HANDSHAKE = "/meta/handshake"; - public static final String CONNECT = "/meta/connect"; - public static final String DISCONNECT = "/meta/disconnect"; - public static final String SUBSCRIBE = "/meta/subscribe"; - public static final String UNSUBSCRIBE = "/meta/unsubscribe"; - - private final String name; - - public Channel(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - final EventEmitter eventEmitter = new EventEmitter<>(); - - public void bind(String event, EventListener listener) { - eventEmitter.on(event, listener); - } - - public void unbind(String event, EventListener listener) { - eventEmitter.removeListener(event, listener); - } - - public void trigger(String event, Message message) { - eventEmitter.emit(event, message); - } - - public boolean hasListeners(String event) throws Exception { - return eventEmitter.hasListeners(event); - } - - public static List expand(String name) { - final List channels = new ArrayList<>(Arrays.asList("/**", name)); - final List segments = parse(name); - - if (segments == null) return null; - - List copy = new ArrayList<>(segments); - copy.add(copy.size() - 1, "*"); - channels.add(unparse(copy)); - - for (int i = 1; i < segments.size(); i++) { - copy = segments.subList(0, i); - copy.add("**"); - channels.add(unparse(copy)); - } - - return channels; - } - - public static boolean isValid(String name) { - return Grammar.CHANNEL_NAME.matcher(name).matches() - || Grammar.CHANNEL_PATTERN.matcher(name).matches(); - } - - public static List parse(String name) { - if (!isValid(name)) return null; - final String[] splits = name.split("/"); - return Arrays.asList(splits).subList(1, splits.length); - } - - public static String unparse(List segments) { - final String joinedSegments = String.join("/", segments); - return "/" + joinedSegments; - } - - public static Boolean isMeta(String name) { - final List segments = parse(name); - if (segments == null) return null; - return segments.get(0).equals("meta"); - } - - public static Boolean isService(String name) { - final List segments = parse(name); - if (segments == null) return null; - return segments.get(0).equals("service"); - } - - public static Boolean isSubscribable(String name) { - if (!isValid(name)) return null; - final Boolean isMeta = isMeta(name); - final Boolean isService = isService(name); - if (isMeta == null || isService == null) return null; - return !isMeta && !isService; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Channel that = (Channel) o; - return Objects.equals(name, that.name); - } - - @Override - public int hashCode() { - return Objects.hash(name); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this).omitNullValues().add("name", this.name).toString(); - } -} diff --git a/src/main/java/io/getstream/core/faye/DefaultMessageTransformer.java b/src/main/java/io/getstream/core/faye/DefaultMessageTransformer.java deleted file mode 100644 index bd462377..00000000 --- a/src/main/java/io/getstream/core/faye/DefaultMessageTransformer.java +++ /dev/null @@ -1,13 +0,0 @@ -package io.getstream.core.faye; - -public class DefaultMessageTransformer extends MessageTransformer { - @Override - public Message transformRequest(Message message) { - return message; - } - - @Override - public Message transformResponse(Message message) { - return message; - } -} diff --git a/src/main/java/io/getstream/core/faye/FayeClientError.java b/src/main/java/io/getstream/core/faye/FayeClientError.java deleted file mode 100644 index c8c643d8..00000000 --- a/src/main/java/io/getstream/core/faye/FayeClientError.java +++ /dev/null @@ -1,57 +0,0 @@ -package io.getstream.core.faye; - -import com.google.common.base.MoreObjects; -import java.util.Arrays; -import java.util.List; -import java.util.Objects; - -public class FayeClientError extends Throwable { - private final Integer code; - private final List params; - private final String errorMessage; - - public FayeClientError(Integer code, List params, String errorMessage) { - this.code = code; - this.params = params; - this.errorMessage = errorMessage; - } - - public static FayeClientError parse(String errorMessage) { - if (errorMessage == null) errorMessage = ""; - if (!Grammar.ERROR.matcher(errorMessage).matches()) { - return new FayeClientError(null, null, errorMessage); - } - - final List parts = Arrays.asList(errorMessage.split(":")); - final Integer code = Integer.parseInt(parts.get(0)); - final List params = Arrays.asList(parts.get(1).split(",")); - final String message = parts.get(2); - - return new FayeClientError(code, params, message); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - FayeClientError that = (FayeClientError) o; - return Objects.equals(code, that.code) - && Objects.equals(params, that.params) - && Objects.equals(errorMessage, that.errorMessage); - } - - @Override - public int hashCode() { - return Objects.hash(code, params, errorMessage); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .omitNullValues() - .add("code", this.code) - .add("params", this.params) - .add("errorMessage", this.errorMessage) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/faye/Grammar.java b/src/main/java/io/getstream/core/faye/Grammar.java deleted file mode 100644 index 1c850ca0..00000000 --- a/src/main/java/io/getstream/core/faye/Grammar.java +++ /dev/null @@ -1,18 +0,0 @@ -package io.getstream.core.faye; - -import java.util.regex.Pattern; - -public class Grammar { - static final Pattern CHANNEL_NAME = - Pattern.compile( - "^\\/(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)))+(\\/(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)))+)*$", - Pattern.MULTILINE); - static final Pattern CHANNEL_PATTERN = - Pattern.compile( - "^(\\/(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)))+)*\\/\\*{1,2}$"); - static final Pattern ERROR = - Pattern.compile( - "^([0-9][0-9][0-9]:(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)| |\\/|\\*|\\.))*(,(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)| |\\/|\\*|\\.))*)*:(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)| |\\/|\\*|\\.))*|[0-9][0-9][0-9]::(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)| |\\/|\\*|\\.))*)$"); - static final Pattern VERSION = - Pattern.compile("^([0-9])+(\\.(([a-z]|[A-Z])|[0-9])(((([a-z]|[A-Z])|[0-9])|\\-|\\_))*)*$"); -} diff --git a/src/main/java/io/getstream/core/faye/Message.java b/src/main/java/io/getstream/core/faye/Message.java deleted file mode 100644 index 085df34c..00000000 --- a/src/main/java/io/getstream/core/faye/Message.java +++ /dev/null @@ -1,168 +0,0 @@ -package io.getstream.core.faye; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.google.common.base.MoreObjects; -import java.util.Map; -import java.util.Objects; - -@JsonIgnoreProperties(ignoreUnknown = true) -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Message { - private String id; - private final String channel; - private String clientId; - private String connectionType; - private String version; - private String minimumVersion; - private String[] supportedConnectionTypes; - private Advice advice; - private Boolean successful; - private String subscription; - private Map data; - private Map ext; - private String error; - - // for deserialization - public Message() { - this.channel = null; - } - - public Message(String channel) { - this.channel = channel; - } - - public void setId(String id) { - this.id = id; - } - - public void setClientId(String clientId) { - this.clientId = clientId; - } - - public void setConnectionType(String connectionType) { - this.connectionType = connectionType; - } - - public void setVersion(String version) { - this.version = version; - } - - public void setMinimumVersion(String minimumVersion) { - this.minimumVersion = minimumVersion; - } - - public void setSupportedConnectionTypes(String[] supportedConnectionTypes) { - this.supportedConnectionTypes = supportedConnectionTypes; - } - - public void setAdvice(Advice advice) { - this.advice = advice; - } - - public void setSuccessful(Boolean successful) { - this.successful = successful; - } - - public void setSubscription(String subscription) { - this.subscription = subscription; - } - - public void setData(Map data) { - this.data = data; - } - - public void setExt(Map ext) { - this.ext = ext; - } - - public void setError(String error) { - this.error = error; - } - - public String getId() { - return id; - } - - public String getChannel() { - return channel; - } - - public String getClientId() { - return clientId; - } - - public String getConnectionType() { - return connectionType; - } - - public String getVersion() { - return version; - } - - public String getMinimumVersion() { - return minimumVersion; - } - - public String[] getSupportedConnectionTypes() { - return supportedConnectionTypes; - } - - public Advice getAdvice() { - return advice; - } - - public Boolean isSuccessful() { - return successful; - } - - public String getSubscription() { - return subscription; - } - - public Map getData() { - return data; - } - - public Map getExt() { - return ext; - } - - public String getError() { - return error; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Message that = (Message) o; - return Objects.equals(id, that.id) - && Objects.equals(channel, that.channel) - && Objects.equals(clientId, that.clientId); - } - - @Override - public int hashCode() { - return Objects.hash(id, channel, clientId); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .omitNullValues() - .add("id", this.id) - .add("channel", this.channel) - .add("clientId", this.clientId) - .add("connectionType", this.connectionType) - .add("version", this.version) - .add("minimumVersion", this.minimumVersion) - .add("supportedConnectionTypes", this.supportedConnectionTypes) - .add("advice", this.advice) - .add("successful", this.successful) - .add("data", this.data) - .add("ext", this.ext) - .add("error", this.error) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/faye/MessageTransformer.java b/src/main/java/io/getstream/core/faye/MessageTransformer.java deleted file mode 100644 index c57c17b4..00000000 --- a/src/main/java/io/getstream/core/faye/MessageTransformer.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.getstream.core.faye; - -public abstract class MessageTransformer { - public abstract Message transformRequest(Message message); - - public abstract Message transformResponse(Message message); -} diff --git a/src/main/java/io/getstream/core/faye/client/Callback.java b/src/main/java/io/getstream/core/faye/client/Callback.java deleted file mode 100644 index 51d9fb06..00000000 --- a/src/main/java/io/getstream/core/faye/client/Callback.java +++ /dev/null @@ -1,5 +0,0 @@ -package io.getstream.core.faye.client; - -interface Callback { - void call(); -} diff --git a/src/main/java/io/getstream/core/faye/client/FayeClient.java b/src/main/java/io/getstream/core/faye/client/FayeClient.java deleted file mode 100644 index caf58572..00000000 --- a/src/main/java/io/getstream/core/faye/client/FayeClient.java +++ /dev/null @@ -1,455 +0,0 @@ -package io.getstream.core.faye.client; - -import io.getstream.core.faye.Advice; -import io.getstream.core.faye.Channel; -import io.getstream.core.faye.DefaultMessageTransformer; -import io.getstream.core.faye.FayeClientError; -import io.getstream.core.faye.Message; -import io.getstream.core.faye.MessageTransformer; -import io.getstream.core.faye.subscription.ChannelDataCallback; -import io.getstream.core.faye.subscription.ChannelSubscription; -import io.getstream.core.faye.subscription.SubscriptionCancelledCallback; -import io.getstream.core.utils.Serialization; -import java.io.IOException; -import java.net.URL; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; -import java.util.Timer; -import java.util.TimerTask; -import java.util.concurrent.CompletableFuture; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import okhttp3.WebSocket; -import okhttp3.WebSocketListener; - -public class FayeClient extends WebSocketListener { - - private static final String BAYEUX_VERSION = "1.0"; - private static final int DEFAULT_TIMEOUT = 60; // seconds - private static final int DEFAULT_INTERVAL = 0; // seconds - - private final String baseURL; - private final int timeout; - private final int interval; - - private Advice advice; - - public FayeClient(URL baseURL) { - String url = baseURL.toString(); - if (url.startsWith("https")) { - url = url.replace("https", "wss"); - } else if (url.startsWith("http")) { - url = url.replace("http", "ws"); - } - - this.baseURL = url; - this.timeout = DEFAULT_TIMEOUT; - this.interval = DEFAULT_INTERVAL; - this.advice = new Advice(Advice.RETRY, 1000 * interval, 1000 * timeout); - } - - private String clientId; - private final Map channels = new HashMap<>(); - private final Map responseCallbacks = new HashMap<>(); - - private MessageTransformer messageTransformer = new DefaultMessageTransformer(); - - public void setMessageTransformer(MessageTransformer messageTransformer) { - this.messageTransformer = messageTransformer; - } - - private FayeClientState state = FayeClientState.UNCONNECTED; - - private void setState(FayeClientState state) { - this.state = state; - if (stateChangeListener != null) stateChangeListener.onStateChanged(state); - } - - private StateChangeListener stateChangeListener; - - public void setStateChangeListener(StateChangeListener stateChangeListener) { - this.stateChangeListener = stateChangeListener; - } - - private WebSocket webSocket; - private final OkHttpClient httpClient = new OkHttpClient(); - - private Timer timer = new Timer(); - - private void initWebSocket() { - // Initiating connection with $baseUrl - if (webSocket != null) { - closeWebSocket(); - } - final Request request = new Request.Builder().url(baseURL).build(); - webSocket = httpClient.newWebSocket(request, this); - } - - private void closeWebSocket() { - // Cancelling all timer tasks - if (timer != null) { - timer.cancel(); - timer = null; - } - - // Closing connection for $baseUrl - if (webSocket != null) { - webSocket.close(1000, "Connection closed by client"); - webSocket = null; - } - } - - @Override - public void onMessage(WebSocket webSocket, String text) { - List messages = null; - try { - messages = Serialization.fromJSONList(text, Message.class); - } catch (IOException ignored) { - } - - if (messages == null) return; - - for (Message message : messages) { - receiveMessage(message); - } - } - - @Override - public void onFailure(WebSocket webSocket, Throwable t, Response response) { - // 'Error occurred', error, stacktrace); - closeWebSocket(); - initWebSocket(); - } - - private boolean manuallyClosed = false; - - @Override - public void onClosed(WebSocket webSocket, int code, String reason) { - closeWebSocket(); - - // Checking if we manually closed the connection - if (manuallyClosed) return; - initWebSocket(); - } - - private void scheduleTimerTask(Callback callback, long duration) { - if (timer == null) timer = new Timer(); - timer.schedule( - new TimerTask() { - @Override - public void run() { - callback.call(); - } - }, - duration); - } - - public void handshake() { - handshake(null); - } - - private void handshake(Callback callback) { - if (Objects.equals(advice.getReconnect(), Advice.NONE)) return; - if (state != FayeClientState.UNCONNECTED) return; - - setState(FayeClientState.CONNECTING); - - initWebSocket(); - - // Initiating handshake with $baseUrl - - final String[] connectionTypes = {"websocket"}; - final Message message = new Message(Channel.HANDSHAKE); - message.setVersion(BAYEUX_VERSION); - message.setSupportedConnectionTypes(connectionTypes); - sendMessage( - message, - response -> { - if (response.isSuccessful() != null && response.isSuccessful()) { - setState(FayeClientState.CONNECTED); - clientId = response.getClientId(); - - // Handshake successful: $clientId - final Set keys = channels.keySet(); - subscribeChannels(keys.toArray(new String[0])); - if (callback != null) callback.call(); - } else { - // Handshake unsuccessful - scheduleTimerTask(() -> handshake(callback), 1000); - setState(FayeClientState.UNCONNECTED); - } - }); - } - - private boolean connectRequestInProgress = false; - - public void connect() { - connect(null); - } - - private void connect(Callback callback) { - if (Objects.equals(advice.getReconnect(), Advice.NONE)) return; - if (state == FayeClientState.DISCONNECTED) return; - - if (state == FayeClientState.UNCONNECTED) { - handshake(() -> connect(callback)); - return; - } - - if (callback != null) callback.call(); - if (state != FayeClientState.CONNECTED) return; - - if (connectRequestInProgress) return; - connectRequestInProgress = true; - - // Initiating connection for $clientId - - final Message message = new Message(Channel.CONNECT); - message.setClientId(clientId); - message.setConnectionType("websocket"); - sendMessage(message, response -> cycleConnection()); - } - - public CompletableFuture disconnect() { - final CompletableFuture disconnectionCompleter = new CompletableFuture<>(); - - if (state != FayeClientState.CONNECTED) disconnectionCompleter.complete(null); - setState(FayeClientState.DISCONNECTED); - - // Disconnecting $clientId - - final Message message = new Message(Channel.DISCONNECT); - message.setClientId(clientId); - sendMessage( - message, - response -> { - if (response.isSuccessful() != null && response.isSuccessful()) { - manuallyClosed = true; - closeWebSocket(); - disconnectionCompleter.complete(null); - } else { - final FayeClientError error = FayeClientError.parse(response.getError()); - disconnectionCompleter.completeExceptionally(error); - } - }); - - // Clearing channel listeners for $clientId - channels.clear(); - - return disconnectionCompleter; - } - - private void subscribeChannels(String[] channels) { - for (String channel : channels) { - subscribe(channel, true); - } - } - - public CompletableFuture subscribe( - String channel, ChannelDataCallback callback) { - return subscribe(channel, callback, null, null); - } - - private CompletableFuture subscribe(String channel, Boolean force) { - return subscribe(channel, null, null, force); - } - - public CompletableFuture subscribe( - String channel, ChannelDataCallback callback, SubscriptionCancelledCallback onCancelled) { - return subscribe(channel, callback, onCancelled, null); - } - - private CompletableFuture subscribe( - String channel, - ChannelDataCallback onData, - SubscriptionCancelledCallback onCancelled, - Boolean force) { - // default value - if (force == null) force = false; - - final CompletableFuture subscriptionCompleter = new CompletableFuture<>(); - - final ChannelSubscription channelSubscription = - new ChannelSubscription(this, channel, onData, onCancelled); - final boolean hasSubscribe = channels.containsKey(channel); - - if (hasSubscribe && !force) { - subscribeChannel(channel, channelSubscription); - subscriptionCompleter.complete(channelSubscription); - } else { - Boolean finalForce = force; - connect( - () -> { - // Client $clientId attempting to subscribe to $channel - if (!finalForce) subscribeChannel(channel, channelSubscription); - final Message message = new Message(Channel.SUBSCRIBE); - message.setClientId(clientId); - message.setSubscription(channel); - sendMessage( - message, - response -> { - if (response.isSuccessful() != null && response.isSuccessful()) { - final String subscribedChannel = response.getSubscription(); - // Subscription acknowledged for $channel to $clientId - subscriptionCompleter.complete(channelSubscription); - } else { - unsubscribeChannel(channel, channelSubscription); - final FayeClientError error = FayeClientError.parse(response.getError()); - subscriptionCompleter.completeExceptionally(error); - } - }); - }); - } - - return subscriptionCompleter; - } - - public void unsubscribe(String channel, ChannelSubscription channelSubscription) { - final boolean dead = unsubscribeChannel(channel, channelSubscription); - if (!dead) return; - - connect( - () -> { - // Client $clientId attempting to unsubscribe from $channel - final Message message = new Message(Channel.UNSUBSCRIBE); - message.setClientId(clientId); - message.setSubscription(channel); - sendMessage( - message, - response -> { - if (response.isSuccessful() != null && response.isSuccessful()) { - final String unsubscribedChannel = response.getSubscription(); - // Un-subscription acknowledged for $clientId from $channel - } - }); - }); - } - - public CompletableFuture publish(String channel, Map data) { - final CompletableFuture publishCompleter = new CompletableFuture<>(); - - connect( - () -> { - // Client $clientId queuing published message to $channel: $data - final Message message = new Message(channel); - message.setData(data); - message.setClientId(clientId); - sendMessage( - message, - response -> { - if (response.isSuccessful() != null && response.isSuccessful()) { - publishCompleter.complete(null); - } else { - final FayeClientError error = FayeClientError.parse(response.getError()); - publishCompleter.completeExceptionally(error); - } - }); - }); - - return publishCompleter; - } - - private final String EVENT_MESSAGE = "message"; - - private void subscribeChannel(String name, ChannelSubscription channelSubscription) { - Channel channel; - if (channels.containsKey(name)) { - channel = channels.get(name); - } else { - channel = new Channel(name); - channels.put(name, channel); - } - channel.bind(EVENT_MESSAGE, channelSubscription::call); - } - - private boolean unsubscribeChannel(String name, ChannelSubscription channelSubscription) { - final Channel channel = channels.get(name); - if (channel == null) return false; - channel.unbind(EVENT_MESSAGE, channelSubscription::call); - try { - if (channel.hasListeners(EVENT_MESSAGE)) { - channels.remove(name); - return true; - } - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - - private void distributeChannelMessage(Message message) { - final List expandedChannels = Channel.expand(message.getChannel()); - if (expandedChannels == null) return; - for (String c : expandedChannels) { - final Channel channel = this.channels.get(c); - if (channel != null) channel.trigger(EVENT_MESSAGE, message); - } - } - - private int messageId = 0; - - private String generateMessageId() { - messageId += 1; - if (messageId >= Math.pow(2, 32)) messageId = 0; - return Integer.toString(messageId, 36); - } - - private void sendMessage(Message message) { - sendMessage(message, null); - } - - private void sendMessage(Message message, MessageCallback onResponse) { - final String id = generateMessageId(); - message.setId(id); - message = messageTransformer.transformRequest(message); - // Sending Message: $message - if (onResponse != null) responseCallbacks.put(id, onResponse); - try { - final byte[] payload = Serialization.toJSON(message); - webSocket.send(new String(payload)); - } catch (Exception ignored) { - - } - } - - private void receiveMessage(Message message) { - final String id = message.getId(); - MessageCallback callback = null; - if (message.isSuccessful() != null) { - callback = responseCallbacks.remove(id); - } - message = messageTransformer.transformResponse(message); - // Received message: $message - if (message.getAdvice() != null) handleAdvice(message.getAdvice()); - deliverMessage(message); - if (callback != null) callback.onMessage(message); - } - - private void handleAdvice(Advice advice) { - this.advice = advice; - if (Objects.equals(advice.getReconnect(), Advice.HANDSHAKE) - && state != FayeClientState.DISCONNECTED) { - setState(FayeClientState.UNCONNECTED); - clientId = null; - cycleConnection(); - } - } - - private void deliverMessage(Message message) { - if (message.getChannel() == null || message.getData() == null) return; - // Client $clientId calling listeners for ${message.channel} with ${message.data} - distributeChannelMessage(message); - } - - private void cycleConnection() { - if (connectRequestInProgress) { - connectRequestInProgress = false; - // Closed connection for $clientId - } - scheduleTimerTask(this::connect, advice.getInterval()); - } -} diff --git a/src/main/java/io/getstream/core/faye/client/FayeClientState.java b/src/main/java/io/getstream/core/faye/client/FayeClientState.java deleted file mode 100644 index 05bb98be..00000000 --- a/src/main/java/io/getstream/core/faye/client/FayeClientState.java +++ /dev/null @@ -1,8 +0,0 @@ -package io.getstream.core.faye.client; - -public enum FayeClientState { - UNCONNECTED, - CONNECTING, - CONNECTED, - DISCONNECTED, -} diff --git a/src/main/java/io/getstream/core/faye/client/MessageCallback.java b/src/main/java/io/getstream/core/faye/client/MessageCallback.java deleted file mode 100644 index f6c8714d..00000000 --- a/src/main/java/io/getstream/core/faye/client/MessageCallback.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.getstream.core.faye.client; - -import io.getstream.core.faye.Message; - -interface MessageCallback { - void onMessage(Message message); -} diff --git a/src/main/java/io/getstream/core/faye/client/StateChangeListener.java b/src/main/java/io/getstream/core/faye/client/StateChangeListener.java deleted file mode 100644 index 127e3f3f..00000000 --- a/src/main/java/io/getstream/core/faye/client/StateChangeListener.java +++ /dev/null @@ -1,5 +0,0 @@ -package io.getstream.core.faye.client; - -public interface StateChangeListener { - void onStateChanged(FayeClientState clientState); -} diff --git a/src/main/java/io/getstream/core/faye/emitter/ErrorListener.java b/src/main/java/io/getstream/core/faye/emitter/ErrorListener.java deleted file mode 100644 index f7d74b1e..00000000 --- a/src/main/java/io/getstream/core/faye/emitter/ErrorListener.java +++ /dev/null @@ -1,5 +0,0 @@ -package io.getstream.core.faye.emitter; - -public interface ErrorListener { - void onError(Exception error); -} diff --git a/src/main/java/io/getstream/core/faye/emitter/EventEmitter.java b/src/main/java/io/getstream/core/faye/emitter/EventEmitter.java deleted file mode 100644 index 3ca17328..00000000 --- a/src/main/java/io/getstream/core/faye/emitter/EventEmitter.java +++ /dev/null @@ -1,120 +0,0 @@ -package io.getstream.core.faye.emitter; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -public class EventEmitter { - - private final Map>> events = new HashMap<>(); - - private ErrorListener errorListener; - - public void setErrorListener(ErrorListener errorListener) { - this.errorListener = errorListener; - } - - private boolean mounted = true; - - public boolean isMounted() { - return mounted; - } - - private void assertMounted() { - assert isMounted() - : "Tried to use " - + this.getClass().getSimpleName() - + " after `dispose` was called. Consider checking `isMounted`"; - } - - public void emit(String event, T data) { - assertMounted(); - final LinkedList> listeners = events.get(event); - if (listeners == null) return; - boolean didThrow = false; - final List> removables = new ArrayList<>(); - for (ListenerEntry entry : listeners) { - try { - entry.getListener().onData(data); - Integer limit = entry.getLimit(); - if (limit != null) { - if (limit > 0) { - limit -= 1; - entry.setLimit(limit); - } - if (limit == 0) { - removables.add(entry); - } - } - } catch (Exception e) { - didThrow = true; - if (errorListener != null) { - errorListener.onError(e); - } - } - } - for (ListenerEntry entry : removables) { - listeners.remove(entry); - } - if (didThrow) throw new Error(); - } - - public void on(String event, EventListener listener) { - addListener(event, listener); - } - - public void on(String event, EventListener listener, int limit) { - addListener(event, listener, limit); - } - - public void addListener(String event, EventListener listener) { - _addListener(event, listener, null); - } - - public void addListener(String event, EventListener listener, int limit) { - _addListener(event, listener, limit); - } - - void _addListener(String event, EventListener listener, Integer limit) { - assertMounted(); - final ListenerEntry entry = new ListenerEntry(listener, limit); - LinkedList> listeners = events.get(event); - if (listeners == null) listeners = new LinkedList<>(); - listeners.add(entry); - events.put(event, listeners); - } - - public void off(String event) { - assertMounted(); - events.put(event, new LinkedList<>()); - } - - public void removeListener(String event, EventListener listener) { - assertMounted(); - final LinkedList> listeners = events.get(event); - if (listeners == null) return; - listeners.removeIf(curr -> curr.getListener() == listener); - } - - public void removeAllListeners() { - assertMounted(); - events.clear(); - } - - public boolean hasListeners(String event) throws Exception { - assertMounted(); - final LinkedList> listeners = events.get(event); - if (listeners == null) { - throw new Exception("Event not available"); - } - return !listeners.isEmpty(); - } - - public void dispose() { - assertMounted(); - events.values().forEach(LinkedList::clear); - mounted = false; - } -} diff --git a/src/main/java/io/getstream/core/faye/emitter/EventListener.java b/src/main/java/io/getstream/core/faye/emitter/EventListener.java deleted file mode 100644 index c9763660..00000000 --- a/src/main/java/io/getstream/core/faye/emitter/EventListener.java +++ /dev/null @@ -1,5 +0,0 @@ -package io.getstream.core.faye.emitter; - -public interface EventListener { - void onData(T data); -} diff --git a/src/main/java/io/getstream/core/faye/emitter/ListenerEntry.java b/src/main/java/io/getstream/core/faye/emitter/ListenerEntry.java deleted file mode 100644 index 90d28d6a..00000000 --- a/src/main/java/io/getstream/core/faye/emitter/ListenerEntry.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.getstream.core.faye.emitter; - -class ListenerEntry { - - public ListenerEntry(EventListener listener, Integer limit) { - this.listener = listener; - this.limit = limit; - } - - private Integer limit; - private final EventListener listener; - - public Integer getLimit() { - return limit; - } - - public void setLimit(int limit) { - this.limit = limit; - } - - public EventListener getListener() { - return listener; - } -} diff --git a/src/main/java/io/getstream/core/faye/subscription/ChannelDataCallback.java b/src/main/java/io/getstream/core/faye/subscription/ChannelDataCallback.java deleted file mode 100644 index 80b415d6..00000000 --- a/src/main/java/io/getstream/core/faye/subscription/ChannelDataCallback.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.getstream.core.faye.subscription; - -import java.util.Map; - -public interface ChannelDataCallback { - void onData(Map data); -} diff --git a/src/main/java/io/getstream/core/faye/subscription/ChannelSubscription.java b/src/main/java/io/getstream/core/faye/subscription/ChannelSubscription.java deleted file mode 100644 index a58ec8ba..00000000 --- a/src/main/java/io/getstream/core/faye/subscription/ChannelSubscription.java +++ /dev/null @@ -1,49 +0,0 @@ -package io.getstream.core.faye.subscription; - -import io.getstream.core.faye.Message; -import io.getstream.core.faye.client.FayeClient; - -public class ChannelSubscription { - private final FayeClient client; - private final String channel; - private final ChannelDataCallback channelDataCallback; - private final SubscriptionCancelledCallback onCancelledCallback; - private WithChannelDataCallback withChannel; - - private boolean cancelled = false; - - public ChannelSubscription(FayeClient client, String channel) { - this.client = client; - this.channel = channel; - this.channelDataCallback = null; - this.onCancelledCallback = null; - } - - public ChannelSubscription( - FayeClient client, - String channel, - ChannelDataCallback channelDataCallback, - SubscriptionCancelledCallback onCancelledCallback) { - this.client = client; - this.channel = channel; - this.channelDataCallback = channelDataCallback; - this.onCancelledCallback = onCancelledCallback; - } - - public ChannelSubscription setWithChannel(WithChannelDataCallback withChannel) { - this.withChannel = withChannel; - return this; - } - - public void call(Message message) { - if (channelDataCallback != null) channelDataCallback.onData(message.getData()); - if (withChannel != null) withChannel.onData(message.getChannel(), message.getData()); - } - - public void cancel() { - if (cancelled) return; - client.unsubscribe(channel, this); - if (onCancelledCallback != null) onCancelledCallback.onCancelled(); - cancelled = true; - } -} diff --git a/src/main/java/io/getstream/core/faye/subscription/SubscriptionCancelledCallback.java b/src/main/java/io/getstream/core/faye/subscription/SubscriptionCancelledCallback.java deleted file mode 100644 index c8e60924..00000000 --- a/src/main/java/io/getstream/core/faye/subscription/SubscriptionCancelledCallback.java +++ /dev/null @@ -1,5 +0,0 @@ -package io.getstream.core.faye.subscription; - -public interface SubscriptionCancelledCallback { - void onCancelled(); -} diff --git a/src/main/java/io/getstream/core/faye/subscription/WithChannelDataCallback.java b/src/main/java/io/getstream/core/faye/subscription/WithChannelDataCallback.java deleted file mode 100644 index ec140c15..00000000 --- a/src/main/java/io/getstream/core/faye/subscription/WithChannelDataCallback.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.getstream.core.faye.subscription; - -import java.util.Map; - -public interface WithChannelDataCallback { - void onData(String channel, Map data); -} diff --git a/src/main/java/io/getstream/core/http/HTTPClient.java b/src/main/java/io/getstream/core/http/HTTPClient.java deleted file mode 100644 index b120065c..00000000 --- a/src/main/java/io/getstream/core/http/HTTPClient.java +++ /dev/null @@ -1,13 +0,0 @@ -package io.getstream.core.http; - -import java8.util.concurrent.CompletableFuture; - -public abstract class HTTPClient { - public static Request.Builder requestBuilder() { - return Request.builder(); - } - - public abstract T getImplementation(); - - public abstract CompletableFuture execute(Request request); -} diff --git a/src/main/java/io/getstream/core/http/OKHTTPClientAdapter.java b/src/main/java/io/getstream/core/http/OKHTTPClientAdapter.java deleted file mode 100644 index 4ed770a8..00000000 --- a/src/main/java/io/getstream/core/http/OKHTTPClientAdapter.java +++ /dev/null @@ -1,120 +0,0 @@ -package io.getstream.core.http; - -import static com.google.common.base.Preconditions.checkNotNull; - -import io.getstream.core.utils.Info; -import java.io.IOException; -import java.io.InputStream; -import java.net.URLConnection; -import java8.util.concurrent.CompletableFuture; -import okhttp3.*; - -public final class OKHTTPClientAdapter extends HTTPClient { - private static final String userAgentTemplate = "okhttp3 stream-java2 %s v%s"; - - private final OkHttpClient client; - - public OKHTTPClientAdapter() { - this.client = - new OkHttpClient.Builder().followRedirects(false).followSslRedirects(false).build(); - } - - public OKHTTPClientAdapter(OkHttpClient client) { - checkNotNull(client); - this.client = client; - } - - @Override - public T getImplementation() { - return (T) client; - } - - private okhttp3.RequestBody buildOkHttpRequestBody(io.getstream.core.http.RequestBody body) { - okhttp3.RequestBody okBody = null; - MediaType mediaType; - switch (body.getType()) { - case JSON: - mediaType = MediaType.parse(body.getType().toString()); - okBody = okhttp3.RequestBody.create(mediaType, body.getBytes()); - break; - case MULTI_PART: - String mimeType = URLConnection.guessContentTypeFromName(body.getFileName()); - mediaType = MediaType.parse(mimeType); - MultipartBody.Builder builder = new MultipartBody.Builder().setType(MultipartBody.FORM); - if (body.getBytes() != null) { - builder.addFormDataPart( - "file", body.getFileName(), okhttp3.RequestBody.create(mediaType, body.getBytes())); - } else { - builder.addFormDataPart( - "file", body.getFileName(), okhttp3.RequestBody.create(mediaType, body.getFile())); - } - okBody = builder.build(); - break; - } - return okBody; - } - - private okhttp3.Request buildOkHttpRequest(io.getstream.core.http.Request request) { - String version = Info.getProperties().getProperty(Info.VERSION); - String userAgent = String.format(userAgentTemplate, System.getProperty("os.name"), version); - okhttp3.Request.Builder builder = - new okhttp3.Request.Builder() - .url(request.getURL()) - .addHeader("Stream-Auth-Type", "jwt") - .addHeader("Authorization", request.getToken().toString()) - .addHeader("User-Agent", userAgent) - .addHeader("X-Stream-Client", "stream-java-" + version); - - MediaType mediaType; - switch (request.getMethod()) { - case GET: - builder.get(); - break; - case DELETE: - builder.delete(); - break; - case PUT: - builder.put(buildOkHttpRequestBody(request.getBody())); - break; - case POST: - builder.post(buildOkHttpRequestBody(request.getBody())); - break; - } - return builder.build(); - } - - private io.getstream.core.http.Response buildResponse(okhttp3.Response response) { - final InputStream body = response.body() != null ? response.body().byteStream() : null; - return new io.getstream.core.http.Response(response.code(), body); - } - - @Override - public CompletableFuture execute( - io.getstream.core.http.Request request) { - final CompletableFuture result = new CompletableFuture<>(); - - client - .newCall(buildOkHttpRequest(request)) - .enqueue( - new Callback() { - @Override - public void onFailure(Call call, IOException e) { - result.completeExceptionally(e); - } - - @Override - public void onResponse(Call call, okhttp3.Response response) { - try { - io.getstream.core.http.Response httpResponse = buildResponse(response); - result.complete(httpResponse); - } catch (Exception e) { - result.completeExceptionally(e); - } finally { - response.body().close(); - } - } - }); - - return result; - } -} diff --git a/src/main/java/io/getstream/core/http/Request.java b/src/main/java/io/getstream/core/http/Request.java deleted file mode 100644 index b5b6d40d..00000000 --- a/src/main/java/io/getstream/core/http/Request.java +++ /dev/null @@ -1,158 +0,0 @@ -package io.getstream.core.http; - -import com.google.common.base.MoreObjects; -import java.io.File; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.Objects; - -public final class Request { - private final Token token; - private final URL url; - private final Method method; - private final RequestBody body; - - private Request(Builder builder) throws MalformedURLException { - token = builder.token; - url = builder.uri.toURL(); - method = builder.method; - body = builder.body; - } - - public Token getToken() { - return token; - } - - public URL getURL() { - return url; - } - - public Method getMethod() { - return method; - } - - public RequestBody getBody() { - return body; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Request request = (Request) o; - return Objects.equals(token, request.token) - && Objects.equals(url, request.url) - && method == request.method - && Objects.equals(body, request.body); - } - - @Override - public int hashCode() { - return Objects.hash(token, url, method, body); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("token", this.token) - .add("url", this.url) - .add("method", this.method) - .add("body", this.body) - .toString(); - } - - public static Builder builder() { - return new Builder(); - } - - public enum Method { - GET, - POST, - PUT, - DELETE - } - - public static final class Builder { - private Token token; - private URI uri; - private StringBuilder query; - private Method method; - private RequestBody body; - - public Builder token(Token token) { - this.token = token; - return this; - } - - public Builder url(URL url) throws URISyntaxException { - uri = url.toURI(); - if (uri.getQuery() != null) { - query = new StringBuilder(uri.getQuery()); - } else { - query = new StringBuilder(); - } - return this; - } - - public Builder addQueryParameter(String key, String value) { - if (query.length() > 0) { - query.append('&'); - } - query.append(key); - query.append('='); - query.append(value); - return this; - } - - public Builder get() { - this.method = Method.GET; - this.body = null; - return this; - } - - public Builder post(byte[] body) { - this.method = Method.POST; - this.body = new RequestBody(body, RequestBody.Type.JSON); - return this; - } - - public Builder multiPartPost(String fileName, byte[] body) { - this.method = Method.POST; - this.body = new RequestBody(fileName, body, RequestBody.Type.MULTI_PART); - return this; - } - - public Builder multiPartPost(File body) { - this.method = Method.POST; - this.body = new RequestBody(body, RequestBody.Type.MULTI_PART); - return this; - } - - public Builder put(byte[] body) { - this.method = Method.PUT; - this.body = new RequestBody(body, RequestBody.Type.JSON); - return this; - } - - public Builder delete() { - this.method = Method.DELETE; - this.body = null; - return this; - } - - public Request build() throws MalformedURLException, URISyntaxException { - this.uri = - new URI( - uri.getScheme(), - uri.getUserInfo(), - uri.getHost(), - uri.getPort(), - uri.getPath(), - query.toString(), - null); - return new Request(this); - } - } -} diff --git a/src/main/java/io/getstream/core/http/RequestBody.java b/src/main/java/io/getstream/core/http/RequestBody.java deleted file mode 100644 index 2ea521f5..00000000 --- a/src/main/java/io/getstream/core/http/RequestBody.java +++ /dev/null @@ -1,90 +0,0 @@ -package io.getstream.core.http; - -import com.google.common.base.MoreObjects; -import java.io.File; -import java.util.Arrays; -import java.util.Objects; - -public final class RequestBody { - public enum Type { - JSON("application/json"), - MULTI_PART("multipart/form-data"); - - private final String type; - - Type(String type) { - this.type = type; - } - - @Override - public String toString() { - return type; - } - } - - private final Type type; - private final byte[] bytes; - private final File file; - private final String fileName; - - RequestBody(byte[] bytes, Type type) { - this.type = type; - this.bytes = bytes; - this.file = null; - this.fileName = null; - } - - RequestBody(String fileName, byte[] bytes, Type type) { - this.type = type; - this.bytes = bytes; - this.file = null; - this.fileName = fileName; - } - - RequestBody(File file, Type type) { - this.type = type; - this.bytes = null; - this.file = file; - this.fileName = file.getName(); - } - - public Type getType() { - return type; - } - - public byte[] getBytes() { - return bytes; - } - - public File getFile() { - return file; - } - - public String getFileName() { - return fileName; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - RequestBody that = (RequestBody) o; - return type == that.type && Arrays.equals(bytes, that.bytes) && Objects.equals(file, that.file); - } - - @Override - public int hashCode() { - int result = Objects.hash(type, file); - result = 31 * result + Arrays.hashCode(bytes); - return result; - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(RequestBody.class) - .add("type", type) - .add("bytes", bytes) - .add("file", file) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/http/Response.java b/src/main/java/io/getstream/core/http/Response.java deleted file mode 100644 index 35fbe8bb..00000000 --- a/src/main/java/io/getstream/core/http/Response.java +++ /dev/null @@ -1,47 +0,0 @@ -package io.getstream.core.http; - -import static com.google.common.base.Preconditions.checkArgument; - -import com.google.common.base.MoreObjects; -import java.io.InputStream; -import java.util.Objects; - -public final class Response { - private final int code; - private final InputStream body; - - public Response(int code, InputStream body) { - checkArgument(code >= 100 && code <= 599, "Invalid HTTP status code"); - this.code = code; - this.body = body; - } - - public int getCode() { - return code; - } - - public InputStream getBody() { - return body; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Response response = (Response) o; - return code == response.code && Objects.equals(body, response.body); - } - - @Override - public int hashCode() { - return Objects.hash(code, body); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("code", this.code) - .add("body", this.body) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/http/Token.java b/src/main/java/io/getstream/core/http/Token.java deleted file mode 100644 index 8f8db8e8..00000000 --- a/src/main/java/io/getstream/core/http/Token.java +++ /dev/null @@ -1,35 +0,0 @@ -package io.getstream.core.http; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -import java.util.Objects; - -public final class Token { - private final String token; - - public Token(String token) { - checkNotNull(token, "Token can't be null"); - checkArgument(!token.isEmpty(), "Token can't be null"); - - this.token = token; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Token token1 = (Token) o; - return Objects.equals(token, token1.token); - } - - @Override - public int hashCode() { - return Objects.hash(token); - } - - @Override - public String toString() { - return token; - } -} diff --git a/src/main/java/io/getstream/core/models/APIError.java b/src/main/java/io/getstream/core/models/APIError.java deleted file mode 100644 index c21e2871..00000000 --- a/src/main/java/io/getstream/core/models/APIError.java +++ /dev/null @@ -1,37 +0,0 @@ -package io.getstream.core.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class APIError { - private String Code; - private String Message; - private String Status; - - public String toString() { - return "{Code='" + Code + "', Message=" + Message + "}"; - } - - // Default constructor - public APIError() {} - - // Constructor with parameters - @JsonCreator - public APIError( - @JsonProperty("code") String code, - @JsonProperty("message") String message, - @JsonProperty("status") String status) { - this.Code = code; - this.Message = message; - this.Status = status; - } - - // Getters - public String getCode() { - return Code; - } - - public String getMessage() { - return Message; - } -} diff --git a/src/main/java/io/getstream/core/models/Activity.java b/src/main/java/io/getstream/core/models/Activity.java deleted file mode 100644 index 1a41127b..00000000 --- a/src/main/java/io/getstream/core/models/Activity.java +++ /dev/null @@ -1,299 +0,0 @@ -package io.getstream.core.models; - -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.convert; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.google.common.base.MoreObjects; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import io.getstream.core.models.serialization.DateDeserializer; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -@JsonInclude(Include.NON_NULL) -@JsonDeserialize(builder = Activity.Builder.class) -public class Activity { - - private final String id; - private final String actor; - private final String verb; - private final String object; - private final String foreignID; - private final String target; - // TODO: support Java 8 Date/Time types? - private final Date time; - private final String origin; - private final List to; - private final Double score; - private final Map extra; - private final String moderationTemplate; - private final ModerationResponse moderationResponse; - - private Activity(Builder builder) { - id = builder.id; - actor = builder.actor; - verb = builder.verb; - object = builder.object; - foreignID = builder.foreignID; - target = builder.target; - time = builder.time; - origin = builder.origin; - to = builder.to; - score = builder.score; - extra = builder.extra; - moderationTemplate = builder.moderationTemplate; - moderationResponse = builder.moderationResponse; - } - - public String getID() { - return id; - } - - public String getActor() { - return actor; - } - - public String getVerb() { - return verb; - } - - public String getObject() { - return object; - } - - @JsonProperty("foreign_id") - public String getForeignID() { - return foreignID; - } - - public String getTarget() { - return target; - } - - @JsonFormat( - shape = JsonFormat.Shape.STRING, - pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS", - lenient = OptBoolean.FALSE, - timezone = "UTC") - public Date getTime() { - return time; - } - - public String getOrigin() { - return origin; - } - - public List getTo() { - return to; - } - - public Double getScore() { - return score; - } - - @JsonAnyGetter - public Map getExtra() { - return extra; - } - - @JsonProperty("moderation") - public ModerationResponse getModerationResponse() { - return moderationResponse; - } - - @JsonProperty("moderation_template") - public String getModerationTemplate() { - return moderationTemplate; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Activity activity = (Activity) o; - return Objects.equals(id, activity.id) - && Objects.equals(actor, activity.actor) - && Objects.equals(verb, activity.verb) - && Objects.equals(object, activity.object) - && Objects.equals(foreignID, activity.foreignID) - && Objects.equals(target, activity.target) - && Objects.equals(time, activity.time) - && Objects.equals(origin, activity.origin) - && Objects.equals(to, activity.to) - && Objects.equals(score, activity.score) - && Objects.equals(extra, activity.extra); - } - - @Override - public int hashCode() { - return Objects.hash(id, actor, verb, object, foreignID, target, time, origin, to, score, extra); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("id", this.id) - .add("actor", this.actor) - .add("verb", this.verb) - .add("object", this.object) - .add("foreignID", this.foreignID) - .add("target", this.target) - .add("time", this.time) - .add("origin", this.origin) - .add("to", this.to) - .add("score", this.score) - .add("extra", this.extra) - .toString(); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonPOJOBuilder(withPrefix = "") - public static final class Builder { - private String id; - private String actor; - private String verb; - private String object; - private String foreignID; - private String target; - private Date time; - private String origin; - private List to; - private Double score; - private Map extra; - private String moderationTemplate; - private ModerationResponse moderationResponse; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder moderationTemplate(String moderationTemplate) { - this.moderationTemplate = moderationTemplate; - return this; - } - - public Builder actor(String actor) { - this.actor = actor; - return this; - } - - public Builder verb(String verb) { - this.verb = verb; - return this; - } - - public Builder object(String object) { - this.object = object; - return this; - } - - @JsonProperty("foreign_id") - public Builder foreignID(String foreignID) { - this.foreignID = foreignID; - return this; - } - - @JsonProperty("moderation") - public Builder setModerationResponse(ModerationResponse mod) { - this.moderationResponse = mod; - return this; - } - - public Builder target(String target) { - this.target = target; - return this; - } - - @JsonDeserialize(using = DateDeserializer.class) - public Builder time(Date time) { - this.time = time; - return this; - } - - public Builder origin(String origin) { - this.origin = origin; - return this; - } - - @JsonProperty("to") - public Builder to(List to) { - this.to = to; - return this; - } - - @JsonIgnore - public Builder to(Iterable to) { - this.to = Lists.newArrayList(to); - return this; - } - - @JsonIgnore - public Builder to(FeedID... to) { - this.to = Lists.newArrayList(to); - return this; - } - - public Builder score(double score) { - this.score = score; - return this; - } - - @JsonAnySetter - public Builder extraField(String key, Object value) { - if (extra == null) { - extra = Maps.newHashMap(); - } - extra.put(key, value); - return this; - } - - @JsonIgnore - public Builder extra(Map extra) { - if (!extra.isEmpty()) { - this.extra = extra; - } - return this; - } - - @JsonIgnore - public Builder fromActivity(Activity activity) { - this.id = activity.id; - this.actor = activity.actor; - this.verb = activity.verb; - this.object = activity.object; - this.foreignID = activity.foreignID; - this.target = activity.target; - this.time = activity.time; - this.origin = activity.origin; - this.to = activity.to; - this.score = activity.score; - this.extra = activity.extra; - this.moderationTemplate = activity.moderationTemplate; - this.moderationResponse = activity.moderationResponse; - return this; - } - - @JsonIgnore - public Builder fromCustomActivity(T custom) { - return fromActivity(convert(custom, Activity.class)); - } - - public Activity build() { - checkNotNull(actor, "Activity 'actor' field required"); - checkNotNull(verb, "Activity 'verb' field required"); - checkNotNull(object, "Activity 'object' field required"); - - return new Activity(this); - } - } -} diff --git a/src/main/java/io/getstream/core/models/ActivityUpdate.java b/src/main/java/io/getstream/core/models/ActivityUpdate.java deleted file mode 100644 index a4f90348..00000000 --- a/src/main/java/io/getstream/core/models/ActivityUpdate.java +++ /dev/null @@ -1,117 +0,0 @@ -package io.getstream.core.models; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.OptBoolean; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.Lists; -import java.util.Date; -import java.util.List; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ActivityUpdate { - private final String id; - private final String foreignID; - private final Date time; - private final Map set; - private final List unset; - - ActivityUpdate(Builder builder) { - if (builder.id != null) { - id = builder.id; - foreignID = null; - time = null; - } else { - id = null; - foreignID = builder.foreignID; - time = builder.time; - } - set = builder.set; - unset = builder.unset; - } - - public String getID() { - return id; - } - - @JsonProperty("foreign_id") - public String getForeignID() { - return foreignID; - } - - @JsonFormat( - shape = JsonFormat.Shape.STRING, - pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS", - lenient = OptBoolean.FALSE, - timezone = "UTC") - public Date getTime() { - return time; - } - - public Map getSet() { - return set; - } - - public List getUnset() { - return unset; - } - - public static Builder builder() { - return new Builder(); - } - - public static final class Builder { - private String id; - private String foreignID; - private Date time; - private Map set; - private List unset; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder foreignID(String foreignID) { - this.foreignID = foreignID; - return this; - } - - public Builder time(Date time) { - this.time = time; - return this; - } - - public Builder foreignIDTimePair(ForeignIDTimePair pair) { - foreignID = pair.getForeignID(); - time = pair.getTime(); - return this; - } - - public Builder set(Map set) { - this.set = ImmutableMap.copyOf(set); - return this; - } - - public Builder set(Iterable> set) { - this.set = ImmutableMap.copyOf(set); - return this; - } - - public Builder unset(Iterable unset) { - this.unset = Lists.newArrayList(unset); - return this; - } - - public Builder unset(String... unset) { - this.unset = Lists.newArrayList(unset); - return this; - } - - public ActivityUpdate build() { - return new ActivityUpdate(this); - } - } -} diff --git a/src/main/java/io/getstream/core/models/AuditLog.java b/src/main/java/io/getstream/core/models/AuditLog.java deleted file mode 100644 index 82527981..00000000 --- a/src/main/java/io/getstream/core/models/AuditLog.java +++ /dev/null @@ -1,47 +0,0 @@ -package io.getstream.core.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Date; -import java.util.Map; - -public class AuditLog { - @JsonProperty("entity_type") - private String entityType; - - @JsonProperty("entity_id") - private String entityID; - - private String action; - - @JsonProperty("user_id") - private String userID; - - private Map custom; - - @JsonProperty("created_at") - private Date createdAt; - - public String getEntityType() { - return entityType; - } - - public String getEntityID() { - return entityID; - } - - public String getAction() { - return action; - } - - public String getUserID() { - return userID; - } - - public Map getCustom() { - return custom; - } - - public Date getCreatedAt() { - return createdAt; - } -} \ No newline at end of file diff --git a/src/main/java/io/getstream/core/models/BatchDeleteActivitiesRequest.java b/src/main/java/io/getstream/core/models/BatchDeleteActivitiesRequest.java deleted file mode 100644 index b0e41757..00000000 --- a/src/main/java/io/getstream/core/models/BatchDeleteActivitiesRequest.java +++ /dev/null @@ -1,39 +0,0 @@ -package io.getstream.core.models; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class BatchDeleteActivitiesRequest { - - private final List activities; - - public BatchDeleteActivitiesRequest(List activities) { - this.activities = activities; - } - - public List getActivities() { - return activities; - } - - public static class ActivityToDelete { - private final String id; - private final List removeFromFeeds; - - public ActivityToDelete( - @JsonProperty("id") String id, - @JsonProperty("remove_from_feeds") List removeFromFeeds) { - this.id = id; - this.removeFromFeeds = removeFromFeeds; - } - - public String getId() { - return id; - } - - public List getRemoveFromFeeds() { - return removeFromFeeds; - } - } -} \ No newline at end of file diff --git a/src/main/java/io/getstream/core/models/BatchDeleteReactionsRequest.java b/src/main/java/io/getstream/core/models/BatchDeleteReactionsRequest.java deleted file mode 100644 index d0292f4d..00000000 --- a/src/main/java/io/getstream/core/models/BatchDeleteReactionsRequest.java +++ /dev/null @@ -1,31 +0,0 @@ -package io.getstream.core.models; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -@JsonInclude(JsonInclude.Include.NON_NULL) -public class BatchDeleteReactionsRequest { - - private final List ids; - private final Boolean SoftDelete; - - - public BatchDeleteReactionsRequest(@JsonProperty("ids") List ids) { - this.ids = ids; - SoftDelete = null; - } - public BatchDeleteReactionsRequest(@JsonProperty("ids") List ids, @JsonProperty("soft_delete") Boolean softDelete) { - this.ids = ids; - SoftDelete = softDelete; - } - - public List getIds() { - return ids; - } - - @JsonProperty("soft_delete") - public Boolean getSoftDelete() { - return SoftDelete; - } -} \ No newline at end of file diff --git a/src/main/java/io/getstream/core/models/CollectionData.java b/src/main/java/io/getstream/core/models/CollectionData.java deleted file mode 100644 index da57458b..00000000 --- a/src/main/java/io/getstream/core/models/CollectionData.java +++ /dev/null @@ -1,94 +0,0 @@ -package io.getstream.core.models; - -import static com.google.common.base.MoreObjects.firstNonNull; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.convert; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.core.type.TypeReference; -import com.google.common.base.MoreObjects; -import com.google.common.collect.Maps; -import java.util.Map; -import java.util.Objects; - -public final class CollectionData { - private final String id; - private final String collection; - private final Map data; - - @JsonCreator - public CollectionData( - @JsonProperty("collection") String collection, - @JsonProperty("id") String id, - @JsonProperty("data") Map data) { - this.collection = collection; - this.data = firstNonNull(data, Maps.newHashMap()); - this.id = checkNotNull(id, "ID required"); - } - - public CollectionData() { - this(null, "", null); - } - - public CollectionData(String id) { - this(null, id, null); - } - - public static CollectionData buildFrom(T data) { - return convert(data, CollectionData.class); - } - - public String getID() { - return id; - } - - @JsonIgnore - public String getCollection() { - return collection; - } - - @JsonAnyGetter - public Map getData() { - return data; - } - - @JsonAnySetter - public CollectionData set(String key, T value) { - checkNotNull(key, "Key can't be null"); - - data.put(key, value); - return this; - } - - public CollectionData from(T data) { - checkNotNull(data, "Can't extract data from null"); - - Map map = convert(data, new TypeReference>() {}); - for (Map.Entry entry : map.entrySet()) { - set(entry.getKey(), entry.getValue()); - } - return this; - } - - public T get(String key) { - return (T) data.get(checkNotNull(key, "Key can't be null")); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - CollectionData collectionData = (CollectionData) o; - return Objects.equals(id, collectionData.id) && Objects.equals(data, collectionData.data); - } - - @Override - public int hashCode() { - return Objects.hash(id, data); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this).add("id", this.id).add("data", this.data).toString(); - } -} diff --git a/src/main/java/io/getstream/core/models/Content.java b/src/main/java/io/getstream/core/models/Content.java deleted file mode 100644 index c88249d8..00000000 --- a/src/main/java/io/getstream/core/models/Content.java +++ /dev/null @@ -1,84 +0,0 @@ -package io.getstream.core.models; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.convert; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; -import com.google.common.base.MoreObjects; -import com.google.common.collect.Maps; -import java.util.Map; -import java.util.Objects; - -public final class Content { - private final String foreignID; - private final Map data = Maps.newHashMap(); - - @JsonCreator - public Content(@JsonProperty("foreign_id") String foreignID) { - this.foreignID = checkNotNull(foreignID, "ID required"); - } - - public static Content buildFrom(T data) { - return convert(data, Content.class); - } - - @JsonProperty("foreign_id") - public String getForeignID() { - return foreignID; - } - - @JsonAnyGetter - public Map getData() { - return data; - } - - @JsonAnySetter - public Content set(String key, T value) { - checkArgument(!"foreignID".equals(key), "Key can't be named 'foreignID'"); - checkNotNull(key, "Key can't be null"); - - data.put(key, value); - return this; - } - - public Content from(T data) { - checkNotNull(data, "Can't extract data from null"); - - Map map = convert(data, new TypeReference>() {}); - for (Map.Entry entry : map.entrySet()) { - set(entry.getKey(), entry.getValue()); - } - return this; - } - - public T get(String key) { - return (T) data.get(checkNotNull(key, "Key can't be null")); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Content collectionData = (Content) o; - return Objects.equals(foreignID, collectionData.foreignID) - && Objects.equals(data, collectionData.data); - } - - @Override - public int hashCode() { - return Objects.hash(foreignID, data); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("id", this.foreignID) - .add("data", this.data) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/models/Data.java b/src/main/java/io/getstream/core/models/Data.java deleted file mode 100644 index 65fb5e28..00000000 --- a/src/main/java/io/getstream/core/models/Data.java +++ /dev/null @@ -1,85 +0,0 @@ -package io.getstream.core.models; - -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.convert; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.google.common.base.MoreObjects; -import com.google.common.collect.Maps; -import io.getstream.core.models.serialization.DataDeserializer; -import java.util.Map; -import java.util.Objects; - -@JsonDeserialize(using = DataDeserializer.class) -public final class Data { - private final String id; - private final Map data = Maps.newHashMap(); - - public Data(String id) { - this.id = checkNotNull(id, "ID required"); - } - - public Data() { - this(""); - } - - public static Data buildFrom(T data) { - return convert(data, Data.class); - } - - public String getID() { - return id; - } - - @JsonAnyGetter - public Map getData() { - return data; - } - - public Data set(String key, T value) { - checkNotNull(key, "Key can't be null"); - - data.put(key, value); - return this; - } - - public Data from(T data) { - return from(convert(data, new TypeReference>() {})); - } - - public Data from(Map map) { - checkNotNull(data, "Can't extract data from null"); - if (map == null || map.isEmpty()) { - return this; - } - - for (Map.Entry entry : map.entrySet()) { - set(entry.getKey(), entry.getValue()); - } - return this; - } - - public T get(String key) { - return (T) data.get(checkNotNull(key, "Key can't be null")); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Data data = (Data) o; - return Objects.equals(id, data.id) && Objects.equals(data, data.data); - } - - @Override - public int hashCode() { - return Objects.hash(id, data); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this).add("id", this.id).add("data", this.data).toString(); - } -} diff --git a/src/main/java/io/getstream/core/models/Engagement.java b/src/main/java/io/getstream/core/models/Engagement.java deleted file mode 100644 index 37fa8df7..00000000 --- a/src/main/java/io/getstream/core/models/Engagement.java +++ /dev/null @@ -1,210 +0,0 @@ -package io.getstream.core.models; - -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.convert; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.google.common.base.MoreObjects; -import java.util.Date; -import java.util.List; -import java.util.Objects; - -@JsonInclude(Include.NON_NULL) -@JsonDeserialize(builder = Engagement.Builder.class) -public class Engagement { - private final String feedID; - private final UserData userData; - private final String label; - private final Content content; - private final Integer boost; - private final Integer position; - private final String location; - private final List features; - private final Date trackedAt; - - private Engagement(Builder builder) { - label = builder.label; - content = builder.content; - boost = builder.boost; - position = builder.position; - feedID = builder.feedID; - location = builder.location; - userData = builder.userData; - features = builder.features; - trackedAt = builder.trackedAt; - } - - public static Builder builder() { - return new Builder(); - } - - public String getLabel() { - return label; - } - - public Content getContent() { - return content; - } - - public int getBoost() { - return boost; - } - - public int getPosition() { - return position; - } - - @JsonProperty("feed_id") - public String getFeedID() { - return feedID; - } - - public String getLocation() { - return location; - } - - @JsonProperty("user_data") - public UserData getUserData() { - return userData; - } - - public List getFeatures() { - return features; - } - - @JsonProperty("tracked_at") - public Date getTrackedAt() { - return trackedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Engagement that = (Engagement) o; - return Objects.equals(label, that.label) - && Objects.equals(content, that.content) - && Objects.equals(boost, that.boost) - && Objects.equals(position, that.position) - && Objects.equals(feedID, that.feedID) - && Objects.equals(location, that.location) - && Objects.equals(userData, that.userData) - && Objects.equals(features, that.features) - && Objects.equals(trackedAt, that.trackedAt); - } - - @Override - public int hashCode() { - return Objects.hash( - label, content, boost, position, feedID, location, userData, features, trackedAt); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("label", this.label) - .add("content", this.content) - .add("boost", this.boost) - .add("position", this.position) - .add("feedID", this.feedID) - .add("location", this.location) - .add("userData", this.userData) - .add("features", this.features) - .add("trackedAt", this.trackedAt) - .toString(); - } - - @JsonPOJOBuilder(withPrefix = "") - public static final class Builder { - private String label; - private Content content; - private Integer boost; - private Integer position; - private String feedID; - private String location; - private UserData userData; - private List features; - private Date trackedAt; - - public Builder label(String label) { - this.label = label; - return this; - } - - public Builder content(Content content) { - this.content = content; - return this; - } - - public Builder boost(int boost) { - this.boost = boost; - return this; - } - - public Builder position(int position) { - this.position = position; - return this; - } - - @JsonProperty("feed_id") - public Builder feedID(String feedID) { - this.feedID = feedID; - return this; - } - - public Builder location(String location) { - this.location = location; - return this; - } - - @JsonProperty("user_data") - public Builder userData(UserData userData) { - this.userData = userData; - return this; - } - - public Builder features(List features) { - this.features = features; - return this; - } - - @JsonProperty("tracked_at") - public Builder trackedAt(Date trackedAt) { - this.trackedAt = trackedAt; - return this; - } - - @JsonIgnore - public Builder fromEngagement(Engagement engagement) { - label = engagement.label; - content = engagement.content; - boost = engagement.boost; - position = engagement.position; - feedID = engagement.feedID; - location = engagement.location; - userData = engagement.userData; - features = engagement.features; - trackedAt = engagement.trackedAt; - return this; - } - - @JsonIgnore - public Builder fromCustomEngagement(T custom) { - return fromEngagement(convert(custom, Engagement.class)); - } - - public Engagement build() { - checkNotNull(feedID, "Engagement 'feedID' field required"); - checkNotNull(userData, "Engagement 'userData' field required"); - checkNotNull(label, "Engagement 'label' field required"); - checkNotNull(content, "Engagement 'content' field required"); - - return new Engagement(this); - } - } -} diff --git a/src/main/java/io/getstream/core/models/EnrichedActivity.java b/src/main/java/io/getstream/core/models/EnrichedActivity.java deleted file mode 100644 index 8d05f52d..00000000 --- a/src/main/java/io/getstream/core/models/EnrichedActivity.java +++ /dev/null @@ -1,378 +0,0 @@ -package io.getstream.core.models; - -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.convert; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.google.common.base.MoreObjects; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import io.getstream.core.models.serialization.DateDeserializer; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -// TODO: check which fields could actually be enriched -@JsonInclude(Include.NON_NULL) -@JsonDeserialize(builder = EnrichedActivity.Builder.class) -public class EnrichedActivity { - private final String id; - private final Data actor; - private final String verb; - private final Data object; - private final String foreignID; - private final Data target; - // TODO: support Java 8 Date/Time types? - private final Date time; - private final Data origin; - private final List to; - private final Double score; - private final Map reactionCounts; - private final Map> ownReactions; - private final Map> latestReactions; - private final Map extra; - private final String moderationTemplate; - private final ModerationResponse moderationResponse; - - private EnrichedActivity(Builder builder) { - id = builder.id; - actor = builder.actor; - verb = builder.verb; - object = builder.object; - foreignID = builder.foreignID; - target = builder.target; - time = builder.time; - origin = builder.origin; - to = builder.to; - score = builder.score; - reactionCounts = builder.reactionCounts; - ownReactions = builder.ownReactions; - latestReactions = builder.latestReactions; - extra = builder.extra; - moderationTemplate = builder.moderationTemplate; - moderationResponse = builder.moderationResponse; - } - - public String getID() { - return id; - } - - public Data getActor() { - return actor; - } - - public String getVerb() { - return verb; - } - - public Data getObject() { - return object; - } - - @JsonProperty("foreign_id") - public String getForeignID() { - return foreignID; - } - - public Data getTarget() { - return target; - } - - @JsonFormat( - shape = JsonFormat.Shape.STRING, - pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS", - lenient = OptBoolean.FALSE, - timezone = "UTC") - public Date getTime() { - return time; - } - - public Data getOrigin() { - return origin; - } - - public List getTo() { - return to; - } - - public Double getScore() { - return score; - } - - @JsonIgnore - public Map getReactionCounts() { - return reactionCounts; - } - - @JsonIgnore - public Map> getOwnReactions() { - return ownReactions; - } - - @JsonIgnore - public Map> getLatestReactions() { - return latestReactions; - } - - @JsonProperty("moderation") - public ModerationResponse getModerationResponse() { - return moderationResponse; - } - - @JsonProperty("moderation_template") - public String getModerationTemplate() { - return moderationTemplate; - } - - @JsonAnyGetter - public Map getExtra() { - return extra; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - EnrichedActivity activity = (EnrichedActivity) o; - return Objects.equals(id, activity.id) - && Objects.equals(actor, activity.actor) - && Objects.equals(verb, activity.verb) - && Objects.equals(object, activity.object) - && Objects.equals(foreignID, activity.foreignID) - && Objects.equals(target, activity.target) - && Objects.equals(time, activity.time) - && Objects.equals(origin, activity.origin) - && Objects.equals(to, activity.to) - && Objects.equals(score, activity.score) - && Objects.equals(extra, activity.extra); - } - - @Override - public int hashCode() { - return Objects.hash(id, actor, verb, object, foreignID, target, time, origin, to, score, extra); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("id", this.id) - .add("actor", this.actor) - .add("verb", this.verb) - .add("object", this.object) - .add("foreignID", this.foreignID) - .add("target", this.target) - .add("time", this.time) - .add("origin", this.origin) - .add("to", this.to) - .add("score", this.score) - .add("ownReactions", this.ownReactions) - .add("latestReactions", this.latestReactions) - .add("reactionCounts", this.reactionCounts) - .add("moderationTemplate", this.moderationTemplate) - .add("moderationResponse", this.moderationResponse) - .add("extra", this.extra) - .toString(); - } - - public static Builder builder() { - return new Builder(); - } - - @JsonPOJOBuilder(withPrefix = "") - public static final class Builder { - private String id; - private Data actor; - private String verb; - private Data object; - private String foreignID; - private Data target; - private Date time; - private Data origin; - private List to; - private Double score; - private Map reactionCounts; - private Map> ownReactions; - private Map> latestReactions; - private Map extra; - private String moderationTemplate; - private ModerationResponse moderationResponse; - - public Builder id(String id) { - this.id = id; - return this; - } - - @JsonIgnore - public Builder actor(String actor) { - this.actor = new Data(actor); - return this; - } - - @JsonProperty("actor") - public Builder actor(Data actor) { - this.actor = actor; - return this; - } - - public Builder verb(String verb) { - this.verb = verb; - return this; - } - - @JsonIgnore - public Builder object(String object) { - this.object = new Data(object); - return this; - } - - @JsonProperty("object") - public Builder object(Data object) { - this.object = object; - return this; - } - - @JsonProperty("foreign_id") - public Builder foreignID(String foreignID) { - this.foreignID = foreignID; - return this; - } - - @JsonIgnore - public Builder target(String target) { - this.target = new Data(target); - return this; - } - - @JsonProperty("target") - public Builder target(Data target) { - this.target = target; - return this; - } - - @JsonDeserialize(using = DateDeserializer.class) - public Builder time(Date time) { - this.time = time; - return this; - } - - @JsonIgnore - public Builder origin(String origin) { - this.origin = new Data(origin); - return this; - } - - @JsonProperty("origin") - public Builder origin(Data origin) { - this.origin = origin; - return this; - } - - @JsonProperty("to") - public Builder to(List to) { - this.to = to; - return this; - } - - @JsonIgnore - public Builder to(Iterable to) { - this.to = Lists.newArrayList(to); - return this; - } - - @JsonIgnore - public Builder to(FeedID... to) { - this.to = Lists.newArrayList(to); - return this; - } - - public Builder score(double score) { - this.score = score; - return this; - } - - @JsonProperty("own_reactions") - public Builder ownReactions(Map> ownReactions) { - this.ownReactions = ownReactions; - return this; - } - - @JsonProperty("latest_reactions") - public Builder latestReactions(Map> latestReactions) { - this.latestReactions = latestReactions; - return this; - } - - @JsonProperty("reaction_counts") - public Builder reactionCounts(Map reactionCounts) { - this.reactionCounts = reactionCounts; - return this; - } - - @JsonProperty("moderation_template") - public Builder moderationTemplate(String moderationTemplate) { - this.moderationTemplate = moderationTemplate; - return this; - } - - @JsonProperty("moderation") - public Builder moderationResponse(ModerationResponse moderationResponse) { - this.moderationResponse = moderationResponse; - return this; - } - - @JsonAnySetter - public Builder extraField(String key, Object value) { - if (extra == null) { - extra = Maps.newHashMap(); - } - extra.put(key, value); - return this; - } - - @JsonIgnore - public Builder extra(Map extra) { - if (!extra.isEmpty()) { - this.extra = extra; - } - return this; - } - - @JsonIgnore - public Builder fromEnrichedActivity(EnrichedActivity activity) { - this.id = activity.id; - this.actor = activity.actor; - this.verb = activity.verb; - this.object = activity.object; - this.foreignID = activity.foreignID; - this.target = activity.target; - this.time = activity.time; - this.origin = activity.origin; - this.to = activity.to; - this.score = activity.score; - this.ownReactions = activity.ownReactions; - this.latestReactions = activity.latestReactions; - this.reactionCounts = activity.reactionCounts; - this.moderationTemplate = activity.moderationTemplate; - this.moderationResponse = activity.moderationResponse; - this.extra = activity.extra; - return this; - } - - @JsonIgnore - public Builder fromCustomEnrichedActivity(T custom) { - return fromEnrichedActivity(convert(custom, EnrichedActivity.class)); - } - - public EnrichedActivity build() { - checkNotNull(actor, "EnrichedActivity 'actor' field required"); - checkNotNull(verb, "EnrichedActivity 'verb' field required"); - checkNotNull(object, "EnrichedActivity 'object' field required"); - - return new EnrichedActivity(this); - } - } -} diff --git a/src/main/java/io/getstream/core/models/ExportIDsResponse.java b/src/main/java/io/getstream/core/models/ExportIDsResponse.java deleted file mode 100644 index 190f6ddb..00000000 --- a/src/main/java/io/getstream/core/models/ExportIDsResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -package io.getstream.core.models; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ExportIDsResponse { - @JsonProperty("export") - private ExportIDsResult export; - - @JsonProperty("duration") - private String duration; - - // No-argument constructor - public ExportIDsResponse() { - } - - // Constructor with parameters - public ExportIDsResponse(String duration) { - this.duration = duration; - } - - public ExportIDsResult getExport() { - return export; - } - - public void setExport(ExportIDsResult export) { - this.export = export; - } - - public String getDuration() { - return duration; - } - - public void setDuration(String duration) { - this.duration = duration; - } -} \ No newline at end of file diff --git a/src/main/java/io/getstream/core/models/ExportIDsResult.java b/src/main/java/io/getstream/core/models/ExportIDsResult.java deleted file mode 100644 index 043c673b..00000000 --- a/src/main/java/io/getstream/core/models/ExportIDsResult.java +++ /dev/null @@ -1,62 +0,0 @@ -package io.getstream.core.models; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ExportIDsResult { - @JsonProperty("user_id") - private String userId; - - @JsonProperty("activity_count") - private int activityCount; - - @JsonProperty("activity_ids") - private List activityIds; - - @JsonProperty("reaction_count") - private int reactionCount; - - @JsonProperty("reaction_ids") - private List reactionIds; - - // Getters and Setters - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId; - } - - public int getActivityCount() { - return activityCount; - } - - public void setActivityCount(int activityCount) { - this.activityCount = activityCount; - } - - public List getActivityIds() { - return activityIds; - } - - public void setActivityIds(List activityIds) { - this.activityIds = activityIds; - } - - public int getReactionCount() { - return reactionCount; - } - - public void setReactionCount(int reactionCount) { - this.reactionCount = reactionCount; - } - - public List getReactionIds() { - return reactionIds; - } - - public void setReactionIds(List reactionIds) { - this.reactionIds = reactionIds; - } -} \ No newline at end of file diff --git a/src/main/java/io/getstream/core/models/Feature.java b/src/main/java/io/getstream/core/models/Feature.java deleted file mode 100644 index c41a5fb9..00000000 --- a/src/main/java/io/getstream/core/models/Feature.java +++ /dev/null @@ -1,46 +0,0 @@ -package io.getstream.core.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.base.MoreObjects; -import java.util.Objects; - -public final class Feature { - private final String group; - private final String value; - - @JsonCreator - public Feature(@JsonProperty("group") String group, @JsonProperty("value") String value) { - this.group = group; - this.value = value; - } - - public String getGroup() { - return group; - } - - public String getValue() { - return value; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Feature feature = (Feature) o; - return Objects.equals(group, feature.group) && Objects.equals(value, feature.value); - } - - @Override - public int hashCode() { - return Objects.hash(group, value); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("group", this.group) - .add("value", this.value) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/models/FeedID.java b/src/main/java/io/getstream/core/models/FeedID.java deleted file mode 100644 index 0f3c55b2..00000000 --- a/src/main/java/io/getstream/core/models/FeedID.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.getstream.core.models; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import java.util.Objects; - -@JsonSerialize(using = ToStringSerializer.class) -public final class FeedID { - private final String slug; - private final String userID; - - public FeedID(String slug, String userID) { - checkNotNull(slug, "Feed slug can't be null"); - checkArgument(!slug.isEmpty(), "Feed slug can't be empty"); - checkArgument(!slug.contains(":"), "Invalid slug"); - checkNotNull(userID, "Feed user ID can't be null"); - checkArgument(!userID.contains(":"), "Invalid user ID"); - checkArgument(!userID.isEmpty(), "User ID can't be empty"); - - this.slug = slug; - this.userID = userID; - } - - public FeedID(String id) { - checkNotNull(id, "Feed ID can't be null"); - checkArgument(id.contains(":"), "Invalid feed ID"); - - String[] parts = id.split(":"); - checkArgument(parts.length == 2, "Invalid feed ID"); - this.slug = parts[0]; - this.userID = parts[1]; - } - - public String getSlug() { - return slug; - } - - public String getUserID() { - return userID; - } - - public String getClaim() { - return slug + userID; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - FeedID feedID = (FeedID) o; - return Objects.equals(slug, feedID.slug) && Objects.equals(userID, feedID.userID); - } - - @Override - public int hashCode() { - return Objects.hash(slug, userID); - } - - @Override - public String toString() { - return slug + ':' + userID; - } -} diff --git a/src/main/java/io/getstream/core/models/FollowRelation.java b/src/main/java/io/getstream/core/models/FollowRelation.java deleted file mode 100644 index 8646722d..00000000 --- a/src/main/java/io/getstream/core/models/FollowRelation.java +++ /dev/null @@ -1,78 +0,0 @@ -package io.getstream.core.models; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -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.google.common.base.MoreObjects; -import java.util.Objects; - -@JsonIgnoreProperties(ignoreUnknown = true) -public final class FollowRelation { - private final String source; - private final String target; - private final Integer activityCopyLimit; - - @JsonCreator - public FollowRelation( - @JsonProperty("feed_id") String source, - @JsonProperty("target_id") String target, - @JsonProperty("activity_copy_limit") Integer activityCopyLimit) { - checkNotNull(source, "FollowRelation 'source' field required"); - checkNotNull(target, "FollowRelation 'target' field required"); - if (activityCopyLimit != null) { - checkArgument(activityCopyLimit >= 0, "Activity copy limit must be non negative"); - } - - this.source = source; - this.target = target; - this.activityCopyLimit = activityCopyLimit; - } - - public FollowRelation( - @JsonProperty("feed_id") String source, - @JsonProperty("target_id") String target) { - this(source, target, null); - } - - public String getSource() { - return this.source; - } - - public String getTarget() { - return this.target; - } - - @JsonProperty("activity_copy_limit") - @JsonInclude(JsonInclude.Include.NON_NULL) - public Integer getActivityCopyLimit() { - return this.activityCopyLimit; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - FollowRelation that = (FollowRelation) o; - return Objects.equals(source, that.source) - && Objects.equals(target, that.target) - && Objects.equals(activityCopyLimit, that.activityCopyLimit); - } - - @Override - public int hashCode() { - return Objects.hash(source, target, activityCopyLimit); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("source", this.source) - .add("target", this.target) - .add("activityCopyLimit", this.activityCopyLimit) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/models/FollowStats.java b/src/main/java/io/getstream/core/models/FollowStats.java deleted file mode 100644 index 0da0d170..00000000 --- a/src/main/java/io/getstream/core/models/FollowStats.java +++ /dev/null @@ -1,37 +0,0 @@ -package io.getstream.core.models; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -public final class FollowStats { - @JsonProperty(value = "followers") - private FollowStat followers; - - @JsonProperty(value = "following") - private FollowStat following; - - public FollowStat getFollowers() { - return followers; - } - - public FollowStat getFollowing() { - return following; - } - - public class FollowStat { - @JsonProperty(value = "count") - private int count; - - @JsonProperty(value = "feed") - private String feed; - - public int getCount() { - return count; - } - - public String getFeed() { - return feed; - } - } -} diff --git a/src/main/java/io/getstream/core/models/ForeignIDTimePair.java b/src/main/java/io/getstream/core/models/ForeignIDTimePair.java deleted file mode 100644 index f1ebfe78..00000000 --- a/src/main/java/io/getstream/core/models/ForeignIDTimePair.java +++ /dev/null @@ -1,44 +0,0 @@ -package io.getstream.core.models; - -import com.google.common.base.MoreObjects; -import java.util.Date; -import java.util.Objects; - -public final class ForeignIDTimePair { - private final String foreignID; - private final Date time; - - public ForeignIDTimePair(String foreignID, Date time) { - this.foreignID = foreignID; - this.time = time; - } - - public String getForeignID() { - return foreignID; - } - - public Date getTime() { - return time; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - ForeignIDTimePair that = (ForeignIDTimePair) o; - return Objects.equals(foreignID, that.foreignID) && Objects.equals(time, that.time); - } - - @Override - public int hashCode() { - return Objects.hash(foreignID, time); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("foreignID", this.foreignID) - .add("time", this.time) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/models/Group.java b/src/main/java/io/getstream/core/models/Group.java deleted file mode 100644 index afd3c7e4..00000000 --- a/src/main/java/io/getstream/core/models/Group.java +++ /dev/null @@ -1,99 +0,0 @@ -package io.getstream.core.models; - -import static com.google.common.base.Preconditions.checkNotNull; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.google.common.base.MoreObjects; -import io.getstream.core.models.serialization.DateDeserializer; -import java.util.Date; -import java.util.List; -import java.util.Objects; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class Group { - private final String id; - private final String group; - private final List activities; - private final int actorCount; - private final Date createdAt; - private final Date updatedAt; - - @JsonCreator - public Group( - @JsonProperty("id") String id, - @JsonProperty("group") String group, - @JsonProperty("activities") List activities, - @JsonProperty("actor_count") int actorCount, - @JsonProperty("created_at") @JsonDeserialize(using = DateDeserializer.class) Date createdAt, - @JsonProperty("updated_at") @JsonDeserialize(using = DateDeserializer.class) Date updatedAt) { - checkNotNull(id, "Group 'id' field required"); - checkNotNull(group, "Group 'group' field required"); - checkNotNull(activities, "Group 'activities' field required"); - - this.id = id; - this.group = group; - this.activities = activities; - this.actorCount = actorCount; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - } - - public String getID() { - return id; - } - - public String getGroup() { - return group; - } - - public String getGroupID() { - return id + '.' + group; - } - - public List getActivities() { - return activities; - } - - public int getActorCount() { - return actorCount; - } - - public Date getCreatedAt() { - return createdAt; - } - - public Date getUpdatedAt() { - return updatedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Group that = (Group) o; - return actorCount == that.actorCount - && Objects.equals(id, that.id) - && Objects.equals(group, that.group) - && Objects.equals(activities, that.activities) - && Objects.equals(createdAt, that.createdAt) - && Objects.equals(updatedAt, that.updatedAt); - } - - @Override - public int hashCode() { - return Objects.hash(id, group, activities, actorCount, createdAt, updatedAt); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("activities", this.activities) - .add("actorCount", this.actorCount) - .add("createdAt", this.createdAt) - .add("updatedAt", this.updatedAt) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/models/Impression.java b/src/main/java/io/getstream/core/models/Impression.java deleted file mode 100644 index b01c6d28..00000000 --- a/src/main/java/io/getstream/core/models/Impression.java +++ /dev/null @@ -1,192 +0,0 @@ -package io.getstream.core.models; - -import static com.google.common.base.Preconditions.checkNotNull; -import static io.getstream.core.utils.Serialization.convert; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; -import com.google.common.base.MoreObjects; -import com.google.common.collect.Lists; -import java.util.Date; -import java.util.List; -import java.util.Objects; - -@JsonInclude(Include.NON_NULL) -@JsonDeserialize(builder = Impression.Builder.class) -public class Impression { - private final String feedID; - private final UserData userData; - private final List contentList; - private final String position; - private final String location; - private final List features; - private final Date trackedAt; - - private Impression(Builder builder) { - position = builder.position; - feedID = builder.feedID; - location = builder.location; - userData = builder.userData; - contentList = builder.contentList; - features = builder.features; - trackedAt = builder.trackedAt; - } - - public static Builder builder() { - return new Builder(); - } - - public String getPosition() { - return position; - } - - @JsonProperty("feed_id") - public String getFeedID() { - return feedID; - } - - public String getLocation() { - return location; - } - - @JsonProperty("user_data") - public UserData getUserData() { - return userData; - } - - @JsonProperty("content_list") - public List getContentList() { - return contentList; - } - - public List getFeatures() { - return features; - } - - @JsonProperty("tracked_at") - public Date getTrackedAt() { - return trackedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - Impression that = (Impression) o; - return Objects.equals(position, that.position) - && Objects.equals(feedID, that.feedID) - && Objects.equals(location, that.location) - && Objects.equals(userData, that.userData) - && Objects.equals(contentList, that.contentList) - && Objects.equals(features, that.features) - && Objects.equals(trackedAt, that.trackedAt); - } - - @Override - public int hashCode() { - return Objects.hash(position, feedID, location, userData, contentList, features, trackedAt); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("position", this.position) - .add("feedID", this.feedID) - .add("location", this.location) - .add("userData", this.userData) - .add("contentList", this.contentList) - .add("features", this.features) - .add("trackedAt", this.trackedAt) - .toString(); - } - - @JsonPOJOBuilder(withPrefix = "") - public static final class Builder { - private String position; - private String feedID; - private String location; - private UserData userData; - private List contentList; - private List features; - private Date trackedAt; - - public Builder position(String position) { - this.position = position; - return this; - } - - @JsonProperty("feed_id") - public Builder feedID(String feedID) { - this.feedID = feedID; - return this; - } - - public Builder location(String location) { - this.location = location; - return this; - } - - @JsonProperty("user_data") - public Builder userData(UserData userData) { - this.userData = userData; - return this; - } - - @JsonProperty("content_list") - public Builder contentList(List contentList) { - this.contentList = contentList; - return this; - } - - @JsonIgnore - public Builder contentList(Iterable contentList) { - this.contentList = Lists.newArrayList(contentList); - return this; - } - - @JsonIgnore - public Builder contentList(Content... contentList) { - this.contentList = Lists.newArrayList(contentList); - return this; - } - - public Builder features(List features) { - this.features = features; - return this; - } - - @JsonProperty("tracked_at") - public Builder trackedAt(Date trackedAt) { - this.trackedAt = trackedAt; - return this; - } - - @JsonIgnore - public Builder fromImpression(Impression impression) { - position = impression.position; - feedID = impression.feedID; - location = impression.location; - userData = impression.userData; - contentList = impression.contentList; - features = impression.features; - trackedAt = impression.trackedAt; - return this; - } - - @JsonIgnore - public Builder fromCustomImpression(T custom) { - return fromImpression(convert(custom, Impression.class)); - } - - public Impression build() { - checkNotNull(feedID, "Impression 'feedID' field required"); - checkNotNull(userData, "Impression 'userData' field required"); - - return new Impression(this); - } - } -} diff --git a/src/main/java/io/getstream/core/models/ModerationResponse.java b/src/main/java/io/getstream/core/models/ModerationResponse.java deleted file mode 100644 index f30cf8c2..00000000 --- a/src/main/java/io/getstream/core/models/ModerationResponse.java +++ /dev/null @@ -1,53 +0,0 @@ -package io.getstream.core.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class ModerationResponse { - private String Status; - private String RecommendedAction; - private APIError APIError; - private String OriginFeed; - private String LatestModeratorAction; - - // Default constructor - public ModerationResponse() {} - - // Constructor with parameters - @JsonCreator - public ModerationResponse( - @JsonProperty("status") String status, - @JsonProperty("recommended_action") String recommendedAction, - @JsonProperty("api_error") APIError apiError, - @JsonProperty("origin_feed") String originFeed, - @JsonProperty("latest_moderator_action") String latestModeratorAction) { - this.Status = status; - this.RecommendedAction = recommendedAction; - this.APIError = apiError; - this.OriginFeed = originFeed; - this.LatestModeratorAction = latestModeratorAction; - } - - // Getters - public String getStatus() { - return Status; - } - - public String getRecommendedAction() { - return RecommendedAction; - } - - public APIError getAPIError() { - return APIError; - } - - public String getOriginFeed() { - return OriginFeed; - } - - public String getLatestModeratorAction() { - return LatestModeratorAction; - } -} diff --git a/src/main/java/io/getstream/core/models/NotificationGroup.java b/src/main/java/io/getstream/core/models/NotificationGroup.java deleted file mode 100644 index 27dd2aae..00000000 --- a/src/main/java/io/getstream/core/models/NotificationGroup.java +++ /dev/null @@ -1,67 +0,0 @@ -package io.getstream.core.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.google.common.base.MoreObjects; -import io.getstream.core.models.serialization.DateDeserializer; -import java.util.Date; -import java.util.List; -import java.util.Objects; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class NotificationGroup extends Group { - private final boolean seen; - private final boolean read; - - @JsonCreator - public NotificationGroup( - @JsonProperty("id") String id, - @JsonProperty("group") String group, - @JsonProperty("activities") List activities, - @JsonProperty("actor_count") int actorCount, - @JsonProperty("created_at") @JsonDeserialize(using = DateDeserializer.class) Date createdAt, - @JsonProperty("updated_at") @JsonDeserialize(using = DateDeserializer.class) Date updatedAt, - @JsonProperty("is_seen") boolean isSeen, - @JsonProperty("is_read") boolean isRead) { - super(id, group, activities, actorCount, createdAt, updatedAt); - - this.seen = isSeen; - this.read = isRead; - } - - public boolean isSeen() { - return seen; - } - - public boolean isRead() { - return read; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - NotificationGroup that = (NotificationGroup) o; - return seen == that.seen && read == that.read; - } - - @Override - public int hashCode() { - return Objects.hash(super.hashCode(), seen, read); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("activities", getActivities()) - .add("actorCount", getActorCount()) - .add("createdAt", getCreatedAt()) - .add("updatedAt", getUpdatedAt()) - .add("isSeen", seen) - .add("isRead", read) - .toString(); - } -} diff --git a/src/main/java/io/getstream/core/models/OGData.java b/src/main/java/io/getstream/core/models/OGData.java deleted file mode 100644 index 46f88be4..00000000 --- a/src/main/java/io/getstream/core/models/OGData.java +++ /dev/null @@ -1,238 +0,0 @@ -package io.getstream.core.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class OGData { - public static class Image { - private final String image; - private final String url; - private final String secureUrl; - private final String width; - private final String height; - private final String type; - private final String alt; - - @JsonCreator - public Image( - @JsonProperty("image") String image, - @JsonProperty("url") String url, - @JsonProperty("secure_url") String secureUrl, - @JsonProperty("width") String width, - @JsonProperty("height") String height, - @JsonProperty("type") String type, - @JsonProperty("alt") String alt) { - this.image = image; - this.url = url; - this.secureUrl = secureUrl; - this.width = width; - this.height = height; - this.type = type; - this.alt = alt; - } - - public String getImage() { - return image; - } - - public String getURL() { - return url; - } - - public String getSecureUrl() { - return secureUrl; - } - - public String getWidth() { - return width; - } - - public String getHeight() { - return height; - } - - public String getType() { - return type; - } - - public String getAlt() { - return alt; - } - } - - public static class Video { - private final String video; - private final String alt; - private final String url; - private final String secureURL; - private final String type; - private final String width; - private final String height; - - @JsonCreator - public Video( - @JsonProperty("video") String video, - @JsonProperty("alt") String alt, - @JsonProperty("url") String url, - @JsonProperty("secure_url") String secureURL, - @JsonProperty("type") String type, - @JsonProperty("width") String width, - @JsonProperty("height") String height) { - this.video = video; - this.alt = alt; - this.url = url; - this.secureURL = secureURL; - this.type = type; - this.width = width; - this.height = height; - } - - public String getSecureURL() { - return secureURL; - } - - public String getURL() { - return url; - } - - public String getWidth() { - return width; - } - - public String getHeight() { - return height; - } - - public String getType() { - return type; - } - - public String getAlt() { - return alt; - } - - public String getVideo() { - return video; - } - } - - public static class Audio { - private final String url; - private final String secureURL; - private final String type; - private final String audio; - - @JsonCreator - public Audio( - @JsonProperty("url") String url, - @JsonProperty("secure_url") String secureURL, - @JsonProperty("type") String type, - @JsonProperty("audio") String audio) { - this.type = type; - this.audio = audio; - this.url = url; - this.secureURL = secureURL; - } - - public String getSecureURL() { - return secureURL; - } - - public String getURL() { - return url; - } - - public String getType() { - return type; - } - - public String getAudio() { - return audio; - } - } - - private final String title; - private final String type; - private final String description; - private final String determiner; - private final String locale; - private final String siteName; - private final List images; - private final List