diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd3c89d964..50197bec57 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - java: [ '8', '11', '17', '21', '25' ] + java: [ '11', '17', '21', '25' ] os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] fail-fast: false steps: @@ -55,6 +55,7 @@ jobs: openam-server-only/target/*.war openam-distribution/openam-distribution-docker/Dockerfile* build-docker: + needs: build-maven runs-on: 'ubuntu-latest' services: registry: @@ -62,10 +63,10 @@ jobs: ports: - 5000:5000 steps: - - uses: actions/checkout@v4 + - name: Download artifacts + uses: actions/download-artifact@v4 with: - fetch-depth: 0 - submodules: recursive + name: ubuntu-latest-11 - name: Get latest release version shell: bash run: | @@ -86,11 +87,14 @@ jobs: uses: docker/setup-buildx-action@v3 with: driver-opts: network=host + - name: Prepare Dockerfile + shell: bash + run: sed -i -E '/^#COPY openam-(server|distribution)\//s/^#//' ./openam-distribution/openam-distribution-docker/Dockerfile - name: Build image uses: docker/build-push-action@v5 continue-on-error: true with: - context: ./openam-distribution/openam-distribution-docker + context: . file: ./openam-distribution/openam-distribution-docker/Dockerfile build-args: | VERSION=${{ env.release_version }} @@ -149,75 +153,3 @@ jobs: http://openam.example.org:8080/openam/json/authenticate | grep tokenId' docker inspect --format="{{json .State.Health.Status}}" test-openam | grep -q \"healthy\" - build-docker-alpine: - runs-on: 'ubuntu-latest' - services: - registry: - image: registry:2 - ports: - - 5000:5000 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - submodules: recursive - - name: Get latest release version - shell: bash - run: | - export git_version_last="$(curl -i -o - --silent https://api.github.com/repos/OpenIdentityPlatform/OpenAM/releases/latest | grep -m1 "\"name\"" | cut -d\" -f4)" ; echo "last release: $git_version_last" - echo "release_version=$git_version_last" >> $GITHUB_ENV - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: | - localhost:5000/${{ github.repository }} - tags: | - type=raw,value=alpine - type=raw,value=${{ env.release_version }}-alpine - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - driver-opts: network=host - - name: Build image - uses: docker/build-push-action@v5 - continue-on-error: true - with: - context: ./openam-distribution/openam-distribution-docker - file: ./openam-distribution/openam-distribution-docker/Dockerfile-alpine - build-args: | - VERSION=${{ env.release_version }} - platforms: linux/amd64,linux/arm64/8, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6, linux/ppc64le - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - name: Docker test - shell: bash - run: | - docker run --rm -it -d --memory="2g" -h openam.example.org --name=test localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }}-alpine - timeout 3m bash -c 'until docker inspect --format="{{json .State.Health.Status}}" test | grep -q \"healthy\"; do sleep 10; done' - docker exec -w '/usr/openam/ssoconfiguratortools' test bash -c \ - 'echo "ACCEPT_LICENSES=true - SERVER_URL=http://openam.example.org:8080 - DEPLOYMENT_URI=/$OPENAM_PATH - BASE_DIR=$OPENAM_DATA_DIR - locale=en_US - PLATFORM_LOCALE=en_US - AM_ENC_KEY= - ADMIN_PWD=passw0rd - AMLDAPUSERPASSWD=p@passw0rd - COOKIE_DOMAIN=example.org - ACCEPT_LICENSES=true - DATA_STORE=embedded - DIRECTORY_SSL=SIMPLE - DIRECTORY_SERVER=openam.example.org - DIRECTORY_PORT=50389 - DIRECTORY_ADMIN_PORT=4444 - DIRECTORY_JMX_PORT=1689 - ROOT_SUFFIX=dc=openam,dc=example,dc=org - DS_DIRMGRDN=cn=Directory Manager - DS_DIRMGRPASSWD=passw0rd" > conf.file && java -jar openam-configurator-tool*.jar --file conf.file' - sleep 35 - docker inspect --format="{{json .State.Health.Status}}" test | grep -q \"healthy\" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0c9d014b80..afe4280137 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Java for publishing to Maven Central Repository OSS uses: actions/setup-java@v4 with: - java-version: ${{ github.event.workflow_run.head_branch == 'release/16.0.0-SNAPSHOT' && '11' || '8'}} + java-version: ${{ github.event.workflow_run.head_branch == 'sustaining/15.2.x' && '8' || '11'}} distribution: 'zulu' server-id: ossrh server-username: MAVEN_USERNAME diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23b8968885..0d44f1bbc0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: - name: Set up Java for publishing to Maven Central Repository OSS uses: actions/setup-java@v4 with: - java-version: '8' + java-version: '11' distribution: 'zulu' server-id: ossrh server-username: MAVEN_USERNAME @@ -163,50 +163,3 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - release-docker-alpine: - runs-on: 'ubuntu-latest' - needs: - - release-maven - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.releaseVersion }} - fetch-depth: 1 - submodules: recursive - - name: Docker meta (alpine) - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ${{ github.repository }} - ghcr.io/${{ github.repository }}/${{ github.event.repository.name }} - tags: | - type=raw,value=alpine - type=raw,value=${{ github.event.inputs.releaseVersion }}-alpine - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Login to GHCR - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push image - continue-on-error: true - uses: docker/build-push-action@v5 - with: - context: ./openam-distribution/openam-distribution-docker - file: ./openam-distribution/openam-distribution-docker/Dockerfile-alpine - build-args: | - VERSION=${{ github.event.inputs.releaseVersion }} - platforms: linux/amd64,linux/arm64/8, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6, linux/ppc64le - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/README.md b/README.md index d316cd10b6..f9a6d0c76c 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ This project is licensed under the [Common Development and Distribution License * [IIS Windows x32/x64](https://github.com/OpenIdentityPlatform/OpenAM-Web-Agents/releases) ## How-to Build OpenAM from Source -To build OpenAM from source you should use JDK 8 or higher +To build OpenAM from source you should use JDK 11 or higher For Windows users before clone and build run the following command: ```bash diff --git a/SECURITY.md b/SECURITY.md index 5148af8017..565ee28239 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,13 +2,15 @@ ## Supported Versions -| Version | Supported | -| -------------------------------------- | -------------------------------------------- | -| Open Identity Platform OpenAM 14.x.x | :white_check_mark: | -| Forgerock OpenAM 13.х.x | :x: upgrade to Open Identity Platform OpenAM | -| Forgerock OpenAM 12.х.x | :x: upgrade to Open Identity Platform OpenAM | -| Forgerock OpenAM 11.х.x | :x: upgrade to Open Identity Platform OpenAM | -| Sun/Oracle OpenSSO 10.х.x | :x: upgrade to Open Identity Platform OpenAM | +| Version | Java Versions Support | EE | Supported | +|--------------------------------------|-----------------------|------------|---------------------------------------------------------------------------------------------------------------------------------------------| +| Open Identity Platform OpenAM 16.x.x | 11 and later | Jakarta EE | :white_check_mark: Community support, [approved vendor support](https://github.com/OpenIdentityPlatform/.github/wiki/Approved-Vendor-List) | +| Open Identity Platform OpenAM 15.x.x | 8 and later | Java EE | :white_check_mark: [Approved vendor support](https://github.com/OpenIdentityPlatform/.github/wiki/Approved-Vendor-List) | +| Open Identity Platform OpenAM 14.x.x | 8 and later | Java EE | :white_check_mark: [Approved vendor support](https://github.com/OpenIdentityPlatform/.github/wiki/Approved-Vendor-List) | +| Forgerock OpenAM 13.х.x | 1.7, 8 and later | Java EE | :x: upgrade to Open Identity Platform OpenAM | +| Forgerock OpenAM 12.х.x | 1.7, 8 and later | Java EE | :x: upgrade to Open Identity Platform OpenAM | +| Forgerock OpenAM 11.х.x | 1.6, 1.7 | Java EE | :x: upgrade to Open Identity Platform OpenAM | +| Sun/Oracle OpenSSO 10.х.x | 1.5, 1.6 | Java EE | :x: upgrade to Open Identity Platform OpenAM | ## Reporting a Vulnerability diff --git a/jato-shaded/pom.xml b/jato-shaded/pom.xml index 70f4010c59..8b8201ae64 100755 --- a/jato-shaded/pom.xml +++ b/jato-shaded/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. --> 4.0.0 @@ -21,15 +22,16 @@ org.openidentityplatform.openam openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT OpenAM Jato Shaded OpenAM Jato Shaded Library - org.openidentityplatform.openam.shaded + org.openidentityplatform.external.com.iplanet.jato jato-shaded jar + 2005-05-04 @@ -38,6 +40,7 @@ org.openidentityplatform.external.com.iplanet.jato jato + 2005-05-04 diff --git a/jato-shaded/src/main/java/com/iplanet/jato/util/Encoder.java b/jato-shaded/src/main/java/com/iplanet/jato/util/Encoder.java index 15118f0b27..d483817c77 100644 --- a/jato-shaded/src/main/java/com/iplanet/jato/util/Encoder.java +++ b/jato-shaded/src/main/java/com/iplanet/jato/util/Encoder.java @@ -13,8 +13,8 @@ import java.util.zip.Inflater; import java.util.zip.InflaterInputStream; - public class Encoder { + private Encoder() { } @@ -35,20 +35,11 @@ public static byte[] decodeBase64(String s) { } public static String encodeHttp64(byte[] bytes, int compressThreshold) { - byte[] result; - if (bytes.length > compressThreshold) { - result = compress(bytes); - } else { - result = new byte[bytes.length + 1]; - result[0] = 0; - System.arraycopy(bytes, 0, result, 1, bytes.length); - } - return Base64.getUrlEncoder().encodeToString(result); + return Base64.getUrlEncoder().encodeToString(bytes); } public static byte[] decodeHttp64(String s) { - byte[] result = Base64.getUrlDecoder().decode(s); - return decompress(result); + return Base64.getUrlDecoder().decode(s); } public static byte[] compress(byte[] in) { @@ -104,7 +95,7 @@ private static byte[] subBuffer(byte[] in, int idx, int len) { public static byte[] serialize(Serializable o, boolean compress) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(512); DeflaterOutputStream dos = null; - ObjectOutputStream oos; + ObjectOutputStream oos = null; if (compress) { dos = new DeflaterOutputStream(baos, new Deflater(9)); oos = new ObjectOutputStream(dos); @@ -125,8 +116,8 @@ public static byte[] serialize(Serializable o, boolean compress) throws IOExcept public static Object deserialize(byte[] b, boolean compressed) throws IOException, ClassNotFoundException { ByteArrayInputStream bais = new ByteArrayInputStream(b); - InflaterInputStream iis; - ObjectInputStream ois; + InflaterInputStream iis = null; + ObjectInputStream ois = null; if (compressed) { iis = new InflaterInputStream(bais); ois = new ApplicationObjectInputStream(iis); @@ -138,3 +129,4 @@ public static Object deserialize(byte[] b, boolean compressed) throws IOExceptio return result; } } + diff --git a/openam-annotations/pom.xml b/openam-annotations/pom.xml index 00dd053059..ab114a404a 100755 --- a/openam-annotations/pom.xml +++ b/openam-annotations/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-audit/openam-audit-configuration/pom.xml b/openam-audit/openam-audit-configuration/pom.xml index 3cd7579c3f..00c5755e5c 100644 --- a/openam-audit/openam-audit-configuration/pom.xml +++ b/openam-audit/openam-audit-configuration/pom.xml @@ -13,13 +13,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. - * Portions copyright 2023 3A Systems LLC + * Portions copyright 2023-2025 3A Systems LLC --> openam-audit org.openidentityplatform.openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT 4.0.0 @@ -80,10 +80,17 @@ test - org.apache.activemq + org.openidentityplatform.openam.jakarta activemq-client test + + + org.apache.geronimo.specs + geronimo-j2ee-management_1.1_spec + 1.0.1 + test + org.testng testng diff --git a/openam-audit/openam-audit-configuration/src/main/java/org/forgerock/openam/audit/configuration/AuditServiceConfigurationProviderImpl.java b/openam-audit/openam-audit-configuration/src/main/java/org/forgerock/openam/audit/configuration/AuditServiceConfigurationProviderImpl.java index 9ef8f35078..73aa5492a3 100644 --- a/openam-audit/openam-audit-configuration/src/main/java/org/forgerock/openam/audit/configuration/AuditServiceConfigurationProviderImpl.java +++ b/openam-audit/openam-audit-configuration/src/main/java/org/forgerock/openam/audit/configuration/AuditServiceConfigurationProviderImpl.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit.configuration; @@ -43,7 +44,7 @@ import org.forgerock.openam.utils.JsonValueBuilder; import org.forgerock.openam.utils.RealmUtils; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import java.io.IOException; import java.io.InputStream; import java.security.AccessController; diff --git a/openam-audit/openam-audit-configuration/src/main/java/org/forgerock/openam/audit/events/handlers/CsvAuditEventHandlerFactory.java b/openam-audit/openam-audit-configuration/src/main/java/org/forgerock/openam/audit/events/handlers/CsvAuditEventHandlerFactory.java index 7b67c44d7c..63eec0abda 100644 --- a/openam-audit/openam-audit-configuration/src/main/java/org/forgerock/openam/audit/events/handlers/CsvAuditEventHandlerFactory.java +++ b/openam-audit/openam-audit-configuration/src/main/java/org/forgerock/openam/audit/events/handlers/CsvAuditEventHandlerFactory.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit.events.handlers; @@ -32,7 +33,7 @@ import org.forgerock.openam.audit.configuration.AuditEventHandlerConfiguration; import org.forgerock.openam.utils.StringUtils; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/openam-audit/openam-audit-context/pom.xml b/openam-audit/openam-audit-context/pom.xml index 10cd8c6083..a527db8941 100644 --- a/openam-audit/openam-audit-context/pom.xml +++ b/openam-audit/openam-audit-context/pom.xml @@ -13,12 +13,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. --> openam-audit org.openidentityplatform.openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT 4.0.0 @@ -40,14 +41,13 @@ core - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided com.google.inject guice - no_aop org.openidentityplatform.commons.guice diff --git a/openam-audit/openam-audit-context/src/main/java/org/forgerock/openam/audit/context/AuditContextFilter.java b/openam-audit/openam-audit-context/src/main/java/org/forgerock/openam/audit/context/AuditContextFilter.java index 0ab3ebf052..424230e672 100644 --- a/openam-audit/openam-audit-context/src/main/java/org/forgerock/openam/audit/context/AuditContextFilter.java +++ b/openam-audit/openam-audit-context/src/main/java/org/forgerock/openam/audit/context/AuditContextFilter.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit.context; @@ -20,13 +21,13 @@ import org.forgerock.http.header.TransactionIdHeader; import org.forgerock.services.TransactionId; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; /** diff --git a/openam-audit/openam-audit-context/src/test/java/org/forgerock/openam/audit/AuditContextFilterTest.java b/openam-audit/openam-audit-context/src/test/java/org/forgerock/openam/audit/AuditContextFilterTest.java index f9db417e04..ea82d00a56 100644 --- a/openam-audit/openam-audit-context/src/test/java/org/forgerock/openam/audit/AuditContextFilterTest.java +++ b/openam-audit/openam-audit-context/src/test/java/org/forgerock/openam/audit/AuditContextFilterTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit; @@ -38,9 +39,9 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -import javax.servlet.FilterChain; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.FilterChain; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.google.inject.AbstractModule; import com.google.inject.Module; diff --git a/openam-audit/openam-audit-core/pom.xml b/openam-audit/openam-audit-core/pom.xml index 1d2de2a88e..0299281e65 100644 --- a/openam-audit/openam-audit-core/pom.xml +++ b/openam-audit/openam-audit-core/pom.xml @@ -13,12 +13,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. --> openam-audit org.openidentityplatform.openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT 4.0.0 @@ -48,8 +49,8 @@ guice-assistedinject - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AMAccessAuditEventBuilder.java b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AMAccessAuditEventBuilder.java index 081a3a616d..8aca00c1aa 100644 --- a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AMAccessAuditEventBuilder.java +++ b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AMAccessAuditEventBuilder.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit; @@ -29,7 +30,7 @@ import java.util.Map; import java.util.TreeMap; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.audit.events.AccessAuditEventBuilder; import org.forgerock.http.MutableUri; diff --git a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditEventFactory.java b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditEventFactory.java index 1a30c88721..875e13b4e6 100644 --- a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditEventFactory.java +++ b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditEventFactory.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit; import static org.forgerock.openam.utils.StringUtils.isNotBlank; -import javax.inject.Singleton; +import jakarta.inject.Singleton; /** * Factory for creation of AuditEvent builders. diff --git a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditEventPublisherImpl.java b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditEventPublisherImpl.java index 52c2b0c344..ae6e1058c8 100644 --- a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditEventPublisherImpl.java +++ b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditEventPublisherImpl.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit; @@ -31,8 +32,8 @@ import org.forgerock.openam.audit.AuditConstants.EventName; import org.forgerock.services.context.RootContext; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; /** * Responsible for publishing locally created audit events to the AuditService. diff --git a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditServiceProviderImpl.java b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditServiceProviderImpl.java index c03a082c6c..210b21003b 100644 --- a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditServiceProviderImpl.java +++ b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/AuditServiceProviderImpl.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit; @@ -31,8 +32,8 @@ import org.forgerock.util.thread.listener.ShutdownListener; import org.forgerock.util.thread.listener.ShutdownManager; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import java.util.Collections; import java.util.Map; import java.util.Set; diff --git a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/HttpAccessAuditFilterFactory.java b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/HttpAccessAuditFilterFactory.java index 72ee20d643..f6d50ad0a6 100644 --- a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/HttpAccessAuditFilterFactory.java +++ b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/HttpAccessAuditFilterFactory.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit; import static org.forgerock.openam.audit.AuditConstants.Component; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.Map; import org.forgerock.http.Filter; diff --git a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditAccessServletFilter.java b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditAccessServletFilter.java index 1bd1a318a6..02d0c2d41d 100644 --- a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditAccessServletFilter.java +++ b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditAccessServletFilter.java @@ -12,19 +12,20 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit.servlet; import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.audit.AuditConstants; diff --git a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditableHttpServletResponse.java b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditableHttpServletResponse.java index a4e5a8945f..59dd4479d2 100644 --- a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditableHttpServletResponse.java +++ b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditableHttpServletResponse.java @@ -12,14 +12,15 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit.servlet; import java.io.IOException; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpServletResponseWrapper; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponseWrapper; /** * {@link HttpServletResponse} decorator used for capturing response status and message. @@ -99,4 +100,5 @@ public void setStatus(int sc, String sm) { this.statusCode = sc; this.message = sm; } + } \ No newline at end of file diff --git a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/Auditor.java b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/Auditor.java index 1b9d0afcb1..63071be24e 100644 --- a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/Auditor.java +++ b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/Auditor.java @@ -12,6 +12,7 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit.servlet; @@ -24,8 +25,8 @@ import static org.forgerock.openam.audit.AuditConstants.EventName.AM_ACCESS_ATTEMPT; import static org.forgerock.openam.audit.AuditConstants.EventName.AM_ACCESS_OUTCOME; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.audit.events.AuditEvent; import org.forgerock.json.JsonValue; diff --git a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditorFactory.java b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditorFactory.java index 45e86df258..df5a6de001 100644 --- a/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditorFactory.java +++ b/openam-audit/openam-audit-core/src/main/java/org/forgerock/openam/audit/servlet/AuditorFactory.java @@ -12,11 +12,12 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit.servlet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.openam.audit.AuditConstants.Component; diff --git a/openam-audit/openam-audit-core/src/test/java/org/forgerock/openam/audit/servlet/AuditableHttpServletResponseTest.java b/openam-audit/openam-audit-core/src/test/java/org/forgerock/openam/audit/servlet/AuditableHttpServletResponseTest.java index 6804cba6c2..a75d0efb16 100644 --- a/openam-audit/openam-audit-core/src/test/java/org/forgerock/openam/audit/servlet/AuditableHttpServletResponseTest.java +++ b/openam-audit/openam-audit-core/src/test/java/org/forgerock/openam/audit/servlet/AuditableHttpServletResponseTest.java @@ -12,11 +12,12 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit.servlet; -import static javax.servlet.http.HttpServletResponse.*; +import static jakarta.servlet.http.HttpServletResponse.*; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; @@ -25,7 +26,7 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; /** * @since 13.0.0 diff --git a/openam-audit/openam-audit-rest/pom.xml b/openam-audit/openam-audit-rest/pom.xml index aa2b649b8e..ddccde9ad6 100644 --- a/openam-audit/openam-audit-rest/pom.xml +++ b/openam-audit/openam-audit-rest/pom.xml @@ -18,7 +18,7 @@ openam-audit org.openidentityplatform.openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT 4.0.0 diff --git a/openam-audit/openam-audit-rest/src/main/java/org/forgerock/openam/audit/rest/AuditRestRouteProvider.java b/openam-audit/openam-audit-rest/src/main/java/org/forgerock/openam/audit/rest/AuditRestRouteProvider.java index 78e7f25175..b07a45df21 100644 --- a/openam-audit/openam-audit-rest/src/main/java/org/forgerock/openam/audit/rest/AuditRestRouteProvider.java +++ b/openam-audit/openam-audit-rest/src/main/java/org/forgerock/openam/audit/rest/AuditRestRouteProvider.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit.rest; @@ -19,7 +20,7 @@ import static org.forgerock.http.routing.RoutingMode.STARTS_WITH; import static org.forgerock.openam.audit.AuditConstants.Component.AUDIT; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.audit.AuditServiceProvider; import org.forgerock.openam.rest.AbstractRestRouteProvider; diff --git a/openam-audit/openam-audit-rest/src/main/java/org/forgerock/openam/audit/rest/RealmAuditRequestHandler.java b/openam-audit/openam-audit-rest/src/main/java/org/forgerock/openam/audit/rest/RealmAuditRequestHandler.java index b6f802bcba..269a211313 100644 --- a/openam-audit/openam-audit-rest/src/main/java/org/forgerock/openam/audit/rest/RealmAuditRequestHandler.java +++ b/openam-audit/openam-audit-rest/src/main/java/org/forgerock/openam/audit/rest/RealmAuditRequestHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.audit.rest; @@ -22,7 +23,7 @@ import static org.forgerock.api.models.VersionedPath.*; import static org.forgerock.openam.i18n.apidescriptor.ApiDescriptorConstants.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.api.annotations.Create; import org.forgerock.api.annotations.Handler; diff --git a/openam-audit/pom.xml b/openam-audit/pom.xml index 107db94827..09a6027cca 100644 --- a/openam-audit/pom.xml +++ b/openam-audit/pom.xml @@ -18,7 +18,7 @@ openam org.openidentityplatform.openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT 4.0.0 diff --git a/openam-authentication/openam-auth-ad/pom.xml b/openam-authentication/openam-auth-ad/pom.xml index 4b8023971d..c189f7d83f 100755 --- a/openam-authentication/openam-auth-ad/pom.xml +++ b/openam-authentication/openam-auth-ad/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-authentication/openam-auth-adaptive/pom.xml b/openam-authentication/openam-auth-adaptive/pom.xml index 01eb965c03..7c9f11faa6 100755 --- a/openam-authentication/openam-auth-adaptive/pom.xml +++ b/openam-authentication/openam-auth-adaptive/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -36,8 +37,8 @@ geoip2 - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-adaptive/src/main/java/org/forgerock/openam/authentication/modules/adaptive/Adaptive.java b/openam-authentication/openam-auth-adaptive/src/main/java/org/forgerock/openam/authentication/modules/adaptive/Adaptive.java index 8efbad082a..e125f92c47 100644 --- a/openam-authentication/openam-auth-adaptive/src/main/java/org/forgerock/openam/authentication/modules/adaptive/Adaptive.java +++ b/openam-authentication/openam-auth-adaptive/src/main/java/org/forgerock/openam/authentication/modules/adaptive/Adaptive.java @@ -22,6 +22,7 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * Portions Copyrighted 2013-2016 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.adaptive; @@ -51,8 +52,8 @@ import javax.security.auth.Subject; import javax.security.auth.callback.Callback; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.openam.utils.ClientUtils; import org.forgerock.openam.utils.CollectionUtils; diff --git a/openam-authentication/openam-auth-adaptive/src/main/java/org/forgerock/openam/authentication/modules/adaptive/AdaptivePostAuthenticationPlugin.java b/openam-authentication/openam-auth-adaptive/src/main/java/org/forgerock/openam/authentication/modules/adaptive/AdaptivePostAuthenticationPlugin.java index 0fa87100ff..947bfdb2c2 100644 --- a/openam-authentication/openam-auth-adaptive/src/main/java/org/forgerock/openam/authentication/modules/adaptive/AdaptivePostAuthenticationPlugin.java +++ b/openam-authentication/openam-auth-adaptive/src/main/java/org/forgerock/openam/authentication/modules/adaptive/AdaptivePostAuthenticationPlugin.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.adaptive; @@ -24,8 +25,8 @@ import java.util.Set; import java.util.concurrent.TimeUnit; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.iplanet.sso.SSOToken; import com.sun.identity.authentication.service.AuthUtils; diff --git a/openam-authentication/openam-auth-amster/pom.xml b/openam-authentication/openam-auth-amster/pom.xml index 38f19c7d7f..fe405d720d 100644 --- a/openam-authentication/openam-auth-amster/pom.xml +++ b/openam-authentication/openam-auth-amster/pom.xml @@ -20,7 +20,7 @@ openam-authentication org.openidentityplatform.openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT 4.0.0 diff --git a/openam-authentication/openam-auth-anonymous/pom.xml b/openam-authentication/openam-auth-anonymous/pom.xml index 0cd16d7360..f8d9fe0982 100755 --- a/openam-authentication/openam-auth-anonymous/pom.xml +++ b/openam-authentication/openam-auth-anonymous/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT openam-auth-anonymous jar diff --git a/openam-authentication/openam-auth-application/pom.xml b/openam-authentication/openam-auth-application/pom.xml index b8325f864b..873a342e3f 100755 --- a/openam-authentication/openam-auth-application/pom.xml +++ b/openam-authentication/openam-auth-application/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -33,8 +34,8 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-application/src/main/java/com/sun/identity/authentication/modules/application/Application.java b/openam-authentication/openam-auth-application/src/main/java/com/sun/identity/authentication/modules/application/Application.java index 3ad9106efd..03a65d24cd 100644 --- a/openam-authentication/openam-auth-application/src/main/java/com/sun/identity/authentication/modules/application/Application.java +++ b/openam-authentication/openam-auth-application/src/main/java/com/sun/identity/authentication/modules/application/Application.java @@ -25,6 +25,7 @@ * $Id: Application.java,v 1.9 2009/07/23 18:54:17 qcheng Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.modules.application; @@ -43,7 +44,7 @@ import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.openam.ldap.LDAPUtils; import org.forgerock.opendj.ldap.DN; diff --git a/openam-authentication/openam-auth-cert/pom.xml b/openam-authentication/openam-auth-cert/pom.xml index 9bae5176bd..0c714a749b 100755 --- a/openam-authentication/openam-auth-cert/pom.xml +++ b/openam-authentication/openam-auth-cert/pom.xml @@ -13,7 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. - * Portions copyright 2017-2024 3A Systems, LLC + * Portions copyright 2017-2025 3A Systems, LLC --> 4.0.0 @@ -22,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -58,8 +58,8 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-cert/src/main/java/com/sun/identity/authentication/modules/cert/Cert.java b/openam-authentication/openam-auth-cert/src/main/java/com/sun/identity/authentication/modules/cert/Cert.java index 0f348f1e4a..9c5fbefa64 100644 --- a/openam-authentication/openam-auth-cert/src/main/java/com/sun/identity/authentication/modules/cert/Cert.java +++ b/openam-authentication/openam-auth-cert/src/main/java/com/sun/identity/authentication/modules/cert/Cert.java @@ -25,6 +25,7 @@ * $Id: Cert.java,v 1.14 2009/03/13 20:54:42 beomsuk Exp $ * * Portions Copyrighted 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.modules.cert; @@ -49,7 +50,7 @@ import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.UnsupportedCallbackException; import javax.security.auth.x500.X500Principal; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.openam.ldap.LDAPUtils; import org.forgerock.opendj.ldap.LDAPUrl; @@ -395,7 +396,7 @@ public int process (Callback[] callbacks, int state) HttpServletRequest servletRequest = getHttpServletRequest(); if (servletRequest != null) { allCerts = (X509Certificate[]) servletRequest. - getAttribute("javax.servlet.request.X509Certificate"); + getAttribute("jakarta.servlet.request.X509Certificate"); if (allCerts == null || allCerts.length == 0) { debug.message( "Certificate: checking for cert passed in the URL."); diff --git a/openam-authentication/openam-auth-common/pom.xml b/openam-authentication/openam-auth-common/pom.xml index e3289c93f9..49de5ffe05 100755 --- a/openam-authentication/openam-auth-common/pom.xml +++ b/openam-authentication/openam-auth-common/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -40,8 +41,8 @@ javax.security.auth.message - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/AMLoginModuleBinder.java b/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/AMLoginModuleBinder.java index dd15dfd7c3..dd1efae337 100644 --- a/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/AMLoginModuleBinder.java +++ b/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/AMLoginModuleBinder.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.common; import javax.security.auth.callback.CallbackHandler; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.sun.identity.authentication.spi.AMLoginModule; import com.sun.identity.authentication.spi.AuthLoginException; diff --git a/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/AuthLoginModule.java b/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/AuthLoginModule.java index 8a9354880a..7fd05730f2 100644 --- a/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/AuthLoginModule.java +++ b/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/AuthLoginModule.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.common; @@ -23,8 +24,8 @@ import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.login.LoginException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.sun.identity.authentication.spi.AuthLoginException; diff --git a/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModulePostAuthenticationPlugin.java b/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModulePostAuthenticationPlugin.java index 464901719f..17955e1e4f 100644 --- a/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModulePostAuthenticationPlugin.java +++ b/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModulePostAuthenticationPlugin.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.common; @@ -21,8 +22,8 @@ import javax.security.auth.message.AuthException; import javax.security.auth.message.AuthStatus; import javax.security.auth.message.MessageInfo; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.iplanet.sso.SSOToken; import com.sun.identity.authentication.spi.AMPostAuthProcessInterface; diff --git a/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/JaspiAuthModuleWrapper.java b/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/JaspiAuthModuleWrapper.java index b34374d792..7e28384194 100644 --- a/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/JaspiAuthModuleWrapper.java +++ b/openam-authentication/openam-auth-common/src/main/java/org/forgerock/openam/authentication/modules/common/JaspiAuthModuleWrapper.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.common; @@ -26,8 +27,8 @@ import javax.security.auth.message.MessageInfo; import javax.security.auth.message.MessagePolicy; import javax.security.auth.message.module.ServerAuthModule; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Base class for wrapping a Jaspi ServerAuthModule. Provides wrappers over the modules functionality, and hides diff --git a/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModulePAPTest.java b/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModulePAPTest.java index c5f0ac43b4..6854f6b5ab 100644 --- a/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModulePAPTest.java +++ b/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModulePAPTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.common; @@ -34,8 +35,8 @@ import javax.security.auth.message.AuthStatus; import javax.security.auth.message.MessageInfo; import javax.security.auth.message.module.ServerAuthModule; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.mockito.Matchers; import org.testng.annotations.BeforeMethod; diff --git a/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModuleTest.java b/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModuleTest.java index 552eddaa5f..4f717ad9e5 100644 --- a/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModuleTest.java +++ b/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthLoginModuleTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.common; @@ -33,8 +34,8 @@ import javax.security.auth.login.LoginException; import javax.security.auth.message.AuthStatus; import javax.security.auth.message.MessageInfo; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.mockito.Matchers; import org.testng.annotations.BeforeMethod; diff --git a/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthModuleWrapperTest.java b/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthModuleWrapperTest.java index fbeeea06ae..524193b756 100644 --- a/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthModuleWrapperTest.java +++ b/openam-authentication/openam-auth-common/src/test/java/org/forgerock/openam/authentication/modules/common/JaspiAuthModuleWrapperTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.common; @@ -28,8 +29,8 @@ import javax.security.auth.callback.CallbackHandler; import javax.security.auth.message.MessagePolicy; import javax.security.auth.message.module.ServerAuthModule; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.mockito.Matchers; import org.testng.annotations.BeforeMethod; diff --git a/openam-authentication/openam-auth-datastore/pom.xml b/openam-authentication/openam-auth-datastore/pom.xml index 3cce1b910b..3e179e01cc 100755 --- a/openam-authentication/openam-auth-datastore/pom.xml +++ b/openam-authentication/openam-auth-datastore/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-authentication/openam-auth-device-id/pom.xml b/openam-authentication/openam-auth-device-id/pom.xml index 138120e385..1849d791b0 100644 --- a/openam-authentication/openam-auth-device-id/pom.xml +++ b/openam-authentication/openam-auth-device-id/pom.xml @@ -20,7 +20,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT OpenAM Device Id Authentication Module diff --git a/openam-authentication/openam-auth-fr-oath/pom.xml b/openam-authentication/openam-auth-fr-oath/pom.xml index e0b7d920ff..9b2baaed60 100644 --- a/openam-authentication/openam-auth-fr-oath/pom.xml +++ b/openam-authentication/openam-auth-fr-oath/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -40,8 +41,8 @@ openam-core-rest - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-fr-oath/src/main/java/org/forgerock/openam/authentication/modules/fr/oath/AuthenticatorOATH.java b/openam-authentication/openam-auth-fr-oath/src/main/java/org/forgerock/openam/authentication/modules/fr/oath/AuthenticatorOATH.java index 659b87978f..01c0354ad4 100644 --- a/openam-authentication/openam-auth-fr-oath/src/main/java/org/forgerock/openam/authentication/modules/fr/oath/AuthenticatorOATH.java +++ b/openam-authentication/openam-auth-fr-oath/src/main/java/org/forgerock/openam/authentication/modules/fr/oath/AuthenticatorOATH.java @@ -13,7 +13,7 @@ * * Copyright 2012-2016 ForgeRock AS. * Portions Copyrighted 2014-2015 Nomura Research Institute, Ltd. - * Portions Copyrighted 2024 3A Systems LLC + * Portions Copyrighted 2024-2025 3A Systems LLC */ package org.forgerock.openam.authentication.modules.fr.oath; @@ -33,7 +33,7 @@ import javax.security.auth.callback.Callback; import javax.security.auth.callback.ConfirmationCallback; import javax.security.auth.callback.NameCallback; -import javax.xml.bind.DatatypeConverter; +import jakarta.xml.bind.DatatypeConverter; import org.apache.commons.codec.DecoderException; import org.forgerock.guice.core.InjectorHolder; diff --git a/openam-authentication/openam-auth-fr-oath/src/main/java/org/forgerock/openam/authentication/modules/fr/oath/OathMaker.java b/openam-authentication/openam-auth-fr-oath/src/main/java/org/forgerock/openam/authentication/modules/fr/oath/OathMaker.java index bbd91b4d3a..6f4847c090 100644 --- a/openam-authentication/openam-auth-fr-oath/src/main/java/org/forgerock/openam/authentication/modules/fr/oath/OathMaker.java +++ b/openam-authentication/openam-auth-fr-oath/src/main/java/org/forgerock/openam/authentication/modules/fr/oath/OathMaker.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.fr.oath; @@ -23,9 +24,9 @@ import java.util.Collections; import java.util.List; import javax.annotation.Nonnull; -import javax.inject.Inject; -import javax.inject.Named; -import javax.xml.bind.DatatypeConverter; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.xml.bind.DatatypeConverter; import org.forgerock.openam.core.rest.devices.DeviceJsonUtils; import org.forgerock.openam.core.rest.devices.oath.OathDeviceSettings; import org.forgerock.openam.core.rest.devices.oath.OathDevicesDao; diff --git a/openam-authentication/openam-auth-hotp/pom.xml b/openam-authentication/openam-auth-hotp/pom.xml index ba5f934642..0fdc8263b4 100755 --- a/openam-authentication/openam-auth-hotp/pom.xml +++ b/openam-authentication/openam-auth-hotp/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -32,13 +33,13 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided com.sun.mail - javax.mail + jakarta.mail diff --git a/openam-authentication/openam-auth-httpbasic/pom.xml b/openam-authentication/openam-auth-httpbasic/pom.xml index eb4263ba8e..d26548470c 100755 --- a/openam-authentication/openam-auth-httpbasic/pom.xml +++ b/openam-authentication/openam-auth-httpbasic/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -32,8 +33,8 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-httpbasic/src/main/java/com/sun/identity/authentication/modules/httpbasic/HTTPBasic.java b/openam-authentication/openam-auth-httpbasic/src/main/java/com/sun/identity/authentication/modules/httpbasic/HTTPBasic.java index 76eea92e6f..83def67b48 100644 --- a/openam-authentication/openam-auth-httpbasic/src/main/java/com/sun/identity/authentication/modules/httpbasic/HTTPBasic.java +++ b/openam-authentication/openam-auth-httpbasic/src/main/java/com/sun/identity/authentication/modules/httpbasic/HTTPBasic.java @@ -28,6 +28,7 @@ /** * Portions Copyrighted 2011-2013 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.modules.httpbasic; @@ -55,8 +56,8 @@ import com.sun.identity.security.AdminTokenAction; import com.sun.identity.shared.encode.Base64; import java.security.AccessController; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * HTTP Basic login module. diff --git a/openam-authentication/openam-auth-jdbc/pom.xml b/openam-authentication/openam-auth-jdbc/pom.xml index 273912dc31..057ab8b82f 100755 --- a/openam-authentication/openam-auth-jdbc/pom.xml +++ b/openam-authentication/openam-auth-jdbc/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-authentication/openam-auth-ldap/pom.xml b/openam-authentication/openam-auth-ldap/pom.xml index 525f17cb32..182e38c1c4 100755 --- a/openam-authentication/openam-auth-ldap/pom.xml +++ b/openam-authentication/openam-auth-ldap/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-authentication/openam-auth-membership/pom.xml b/openam-authentication/openam-auth-membership/pom.xml index df9e9b8d70..c48956bb41 100755 --- a/openam-authentication/openam-auth-membership/pom.xml +++ b/openam-authentication/openam-auth-membership/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-authentication/openam-auth-msisdn/pom.xml b/openam-authentication/openam-auth-msisdn/pom.xml index 646e6ee6ee..d16d91b1a6 100755 --- a/openam-authentication/openam-auth-msisdn/pom.xml +++ b/openam-authentication/openam-auth-msisdn/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -32,8 +33,8 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-msisdn/src/main/java/com/sun/identity/authentication/modules/msisdn/MSISDN.java b/openam-authentication/openam-auth-msisdn/src/main/java/com/sun/identity/authentication/modules/msisdn/MSISDN.java index 7368ead52f..5a8aded2a6 100644 --- a/openam-authentication/openam-auth-msisdn/src/main/java/com/sun/identity/authentication/modules/msisdn/MSISDN.java +++ b/openam-authentication/openam-auth-msisdn/src/main/java/com/sun/identity/authentication/modules/msisdn/MSISDN.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted 2013 ForgeRock, Inc. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.modules.msisdn; @@ -49,8 +50,8 @@ import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.Cookie; /** * MSISDN Authentication module retrieves the device's msisdn diff --git a/openam-authentication/openam-auth-nt/pom.xml b/openam-authentication/openam-auth-nt/pom.xml index 07cd97cb96..cb5a67945f 100755 --- a/openam-authentication/openam-auth-nt/pom.xml +++ b/openam-authentication/openam-auth-nt/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -56,8 +57,8 @@ test - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-nt/src/test/java/com/sun/identity/authentication/modules/nt/NTTest.java b/openam-authentication/openam-auth-nt/src/test/java/com/sun/identity/authentication/modules/nt/NTTest.java index 77d9a334b6..d153a8d6d1 100644 --- a/openam-authentication/openam-auth-nt/src/test/java/com/sun/identity/authentication/modules/nt/NTTest.java +++ b/openam-authentication/openam-auth-nt/src/test/java/com/sun/identity/authentication/modules/nt/NTTest.java @@ -1,3 +1,19 @@ +/* + * The contents of this file are subject to the terms of the Common Development and + * Distribution License (the License). You may not use this file except in compliance with the + * License. + * + * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the + * specific language governing permission and limitations under the License. + * + * When distributing Covered Software, include this CDDL Header Notice in each file and include + * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL + * Header, with the fields enclosed by brackets [] replaced by your own identifying + * information: "Portions Copyrighted [year] [name of copyright owner]". + * + * Copyright 2022-2025 3A Systems, LLC. + */ + package com.sun.identity.authentication.modules.nt; import com.iplanet.am.util.SystemProperties; @@ -13,7 +29,7 @@ import static org.testng.Assert.assertEquals; @PrepareForTest({ SystemProperties.class, AuthD.class, InjectorHolder.class}) -@PowerMockIgnore({"jdk.internal.reflect.*", "javax.servlet.*"}) +@PowerMockIgnore({"jdk.internal.reflect.*", "jakarta.servlet.*"}) public class NTTest extends PowerMockTestCase { @Test (dataProvider = "data-provider") diff --git a/openam-authentication/openam-auth-ntlmv2/pom.xml b/openam-authentication/openam-auth-ntlmv2/pom.xml index 36879f5d73..6219b00fcf 100755 --- a/openam-authentication/openam-auth-ntlmv2/pom.xml +++ b/openam-authentication/openam-auth-ntlmv2/pom.xml @@ -13,6 +13,7 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2023 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT OpenAM NTLMv2 Authentication Module @@ -30,8 +31,8 @@ jar - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-ntlmv2/src/main/java/org/openidentityplatform/openam/authentication/modules/Ntlm.java b/openam-authentication/openam-auth-ntlmv2/src/main/java/org/openidentityplatform/openam/authentication/modules/Ntlm.java index 97fdd0da1b..033b1f7f09 100644 --- a/openam-authentication/openam-auth-ntlmv2/src/main/java/org/openidentityplatform/openam/authentication/modules/Ntlm.java +++ b/openam-authentication/openam-auth-ntlmv2/src/main/java/org/openidentityplatform/openam/authentication/modules/Ntlm.java @@ -12,6 +12,7 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2023 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. */ package org.openidentityplatform.openam.authentication.modules; @@ -32,8 +33,8 @@ import javax.security.auth.Subject; import javax.security.auth.callback.Callback; import javax.security.auth.callback.UnsupportedCallbackException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpSession; import jcifs.ntlmssp.Type1Message; import jcifs.ntlmssp.Type2Message; diff --git a/openam-authentication/openam-auth-oath/pom.xml b/openam-authentication/openam-auth-oath/pom.xml index 43923e8928..10c1b347dd 100755 --- a/openam-authentication/openam-auth-oath/pom.xml +++ b/openam-authentication/openam-auth-oath/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -36,8 +37,8 @@ openam-auth-hotp - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-oath/src/main/java/org/forgerock/openam/authentication/modules/oath/TOTPAlgorithm.java b/openam-authentication/openam-auth-oath/src/main/java/org/forgerock/openam/authentication/modules/oath/TOTPAlgorithm.java index 8d0c38b738..1d1bac7e06 100644 --- a/openam-authentication/openam-auth-oath/src/main/java/org/forgerock/openam/authentication/modules/oath/TOTPAlgorithm.java +++ b/openam-authentication/openam-auth-oath/src/main/java/org/forgerock/openam/authentication/modules/oath/TOTPAlgorithm.java @@ -9,6 +9,7 @@ (http://trustee.ietf.org/license-info). * * Portions Copyrighted 2012-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.oath; @@ -17,7 +18,7 @@ import java.security.GeneralSecurityException; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; -import javax.xml.bind.DatatypeConverter; +import jakarta.xml.bind.DatatypeConverter; /** * This is an example implementation of the OATH diff --git a/openam-authentication/openam-auth-oath/src/main/java/org/forgerock/openam/authentication/modules/oath/plugins/DefaultSharedSecretProvider.java b/openam-authentication/openam-auth-oath/src/main/java/org/forgerock/openam/authentication/modules/oath/plugins/DefaultSharedSecretProvider.java index 194d17255e..2fa191fedd 100644 --- a/openam-authentication/openam-auth-oath/src/main/java/org/forgerock/openam/authentication/modules/oath/plugins/DefaultSharedSecretProvider.java +++ b/openam-authentication/openam-auth-oath/src/main/java/org/forgerock/openam/authentication/modules/oath/plugins/DefaultSharedSecretProvider.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.oath.plugins; -import javax.xml.bind.DatatypeConverter; +import jakarta.xml.bind.DatatypeConverter; import com.sun.identity.authentication.spi.AuthLoginException; import com.sun.identity.shared.debug.Debug; diff --git a/openam-authentication/openam-auth-oauth2/pom.xml b/openam-authentication/openam-auth-oauth2/pom.xml index 1f02a36f4f..e0188fe9ac 100755 --- a/openam-authentication/openam-auth-oauth2/pom.xml +++ b/openam-authentication/openam-auth-oauth2/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -40,8 +41,8 @@ openam-auth-oidc - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuth.java b/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuth.java index 0eaeb24dd3..aad4435f30 100644 --- a/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuth.java +++ b/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuth.java @@ -49,8 +49,8 @@ import javax.security.auth.Subject; import javax.security.auth.callback.Callback; import javax.security.auth.login.LoginException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; diff --git a/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuth2PostAuthnPlugin.java b/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuth2PostAuthnPlugin.java index 5023a48bfb..bd02c67adb 100644 --- a/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuth2PostAuthnPlugin.java +++ b/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuth2PostAuthnPlugin.java @@ -20,7 +20,7 @@  * with the fields enclosed by brackets [] replaced by  * your own identifying information:  * "Portions Copyrighted [year] [name of copyright owner]" - * + * Portions Copyrighted 2025 3A Systems LLC.  */ package org.forgerock.openam.authentication.modules.oauth2; @@ -30,8 +30,8 @@ import com.sun.identity.authentication.spi.AMPostAuthProcessInterface; import com.sun.identity.authentication.spi.AuthenticationException; import java.net.URLEncoder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.iplanet.am.util.SystemProperties; import com.sun.identity.shared.Constants; import static org.forgerock.openam.authentication.modules.oauth2.OAuthParam.*; diff --git a/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuthProxy.java b/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuthProxy.java index 14925fc31a..2590856c13 100644 --- a/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuthProxy.java +++ b/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuthProxy.java @@ -21,12 +21,12 @@  * with the fields enclosed by brackets [] replaced by  * your own identifying information:  * "Portions Copyrighted [year] [name of copyright owner]" - * + * Portions Copyrighted 2025 3A Systems LLC.  */ package org.forgerock.openam.authentication.modules.oauth2; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.PrintWriter; import java.util.Map; diff --git a/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuthUtil.java b/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuthUtil.java index 88fd7e1363..684b3f48c2 100644 --- a/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuthUtil.java +++ b/openam-authentication/openam-auth-oauth2/src/main/java/org/forgerock/openam/authentication/modules/oauth2/OAuthUtil.java @@ -21,12 +21,12 @@  * with the fields enclosed by brackets [] replaced by  * your own identifying information:  * "Portions Copyrighted [year] [name of copyright owner]" - * + * Portions Copyrighted 2025 3A Systems LLC.  */ package org.forgerock.openam.authentication.modules.oauth2; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.shared.debug.Debug; import com.sun.identity.shared.encode.CookieUtils; diff --git a/openam-authentication/openam-auth-oidc/pom.xml b/openam-authentication/openam-auth-oidc/pom.xml index b7532c9fa3..b8d1a30d6d 100755 --- a/openam-authentication/openam-auth-oidc/pom.xml +++ b/openam-authentication/openam-auth-oidc/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -44,8 +45,8 @@ openam-auth-common - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdConnect.java b/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdConnect.java index 6faf54e986..efb4fc7d6e 100644 --- a/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdConnect.java +++ b/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdConnect.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.oidc; @@ -28,7 +29,7 @@ import javax.security.auth.Subject; import javax.security.auth.callback.Callback; import javax.security.auth.login.LoginException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.security.Principal; import java.util.Map; import java.util.Set; diff --git a/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdConnectGuiceModule.java b/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdConnectGuiceModule.java index 9cd8f641d1..4d55553f25 100644 --- a/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdConnectGuiceModule.java +++ b/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdConnectGuiceModule.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.oidc; @@ -23,7 +24,7 @@ import org.forgerock.guice.core.GuiceModule; import org.forgerock.jaspi.modules.openid.resolvers.OpenIdResolverFactory; -import javax.inject.Singleton; +import jakarta.inject.Singleton; @GuiceModule public class OpenIdConnectGuiceModule extends AbstractModule { diff --git a/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdResolverCacheImpl.java b/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdResolverCacheImpl.java index 3a995441a9..530658af9b 100644 --- a/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdResolverCacheImpl.java +++ b/openam-authentication/openam-auth-oidc/src/main/java/org/forgerock/openam/authentication/modules/oidc/OpenIdResolverCacheImpl.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.oidc; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.net.URL; import java.security.AccessController; import java.util.concurrent.ConcurrentHashMap; diff --git a/openam-authentication/openam-auth-persistentcookie/pom.xml b/openam-authentication/openam-auth-persistentcookie/pom.xml index 2e0a225927..c6e4df2dda 100755 --- a/openam-authentication/openam-auth-persistentcookie/pom.xml +++ b/openam-authentication/openam-auth-persistentcookie/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -40,8 +41,8 @@ openam-auth-common - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-persistentcookie/src/main/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookieAuthModulePostAuthenticationPlugin.java b/openam-authentication/openam-auth-persistentcookie/src/main/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookieAuthModulePostAuthenticationPlugin.java index 95f1228bdb..843a22af11 100644 --- a/openam-authentication/openam-auth-persistentcookie/src/main/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookieAuthModulePostAuthenticationPlugin.java +++ b/openam-authentication/openam-auth-persistentcookie/src/main/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookieAuthModulePostAuthenticationPlugin.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. - * Portions Copyrighted 2018-2025 3A Systems, LLC. + * Portions copyright 2018-2025 3A Systems, LLC. */ package org.forgerock.openam.authentication.modules.persistentcookie; @@ -29,8 +29,8 @@ import javax.security.auth.message.AuthException; import javax.security.auth.message.MessageInfo; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.forgerock.jaspi.modules.session.jwt.JwtSessionModule; diff --git a/openam-authentication/openam-auth-persistentcookie/src/test/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookieAuthModuleTest.java b/openam-authentication/openam-auth-persistentcookie/src/test/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookieAuthModuleTest.java index e81cebca8e..3b33899ea2 100644 --- a/openam-authentication/openam-auth-persistentcookie/src/test/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookieAuthModuleTest.java +++ b/openam-authentication/openam-auth-persistentcookie/src/test/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookieAuthModuleTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.persistentcookie; @@ -31,8 +32,8 @@ import javax.security.auth.callback.Callback; import javax.security.auth.login.LoginException; import javax.security.auth.message.MessageInfo; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.caf.authentication.framework.AuthenticationFramework; import org.forgerock.jaspi.modules.session.jwt.JwtSessionModule; diff --git a/openam-authentication/openam-auth-persistentcookie/src/test/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookiePAPTest.java b/openam-authentication/openam-auth-persistentcookie/src/test/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookiePAPTest.java index e961386ebc..14221a1da9 100644 --- a/openam-authentication/openam-auth-persistentcookie/src/test/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookiePAPTest.java +++ b/openam-authentication/openam-auth-persistentcookie/src/test/java/org/forgerock/openam/authentication/modules/persistentcookie/PersistentCookiePAPTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.persistentcookie; @@ -28,8 +29,8 @@ import java.util.Set; import javax.security.auth.message.MessageInfo; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.caf.authentication.framework.AuthenticationFramework; import com.google.common.collect.Sets; diff --git a/openam-authentication/openam-auth-push/pom.xml b/openam-authentication/openam-auth-push/pom.xml index f6352b8c9f..feb6c6aa28 100644 --- a/openam-authentication/openam-auth-push/pom.xml +++ b/openam-authentication/openam-auth-push/pom.xml @@ -13,12 +13,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> openam-authentication org.openidentityplatform.openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT 4.0.0 @@ -38,8 +39,8 @@ openam-auth-common - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/AuthenticatorPush.java b/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/AuthenticatorPush.java index 8a79107202..8bfcadb7a3 100644 --- a/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/AuthenticatorPush.java +++ b/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/AuthenticatorPush.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.push; @@ -32,7 +33,7 @@ import javax.security.auth.callback.ConfirmationCallback; import javax.security.auth.callback.NameCallback; import javax.security.auth.login.LoginException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.json.jose.builders.JwtClaimsSetBuilder; import org.forgerock.json.jose.builders.SignedJwtBuilderImpl; diff --git a/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/UserPushDeviceProfileManager.java b/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/UserPushDeviceProfileManager.java index 73e54a7be1..1aa0c4c763 100644 --- a/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/UserPushDeviceProfileManager.java +++ b/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/UserPushDeviceProfileManager.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.push; @@ -25,8 +26,8 @@ import java.util.Collections; import java.util.List; import javax.annotation.Nonnull; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.core.rest.devices.DeviceJsonUtils; import org.forgerock.openam.core.rest.devices.oath.OathDeviceSettings; import org.forgerock.openam.core.rest.devices.push.PushDeviceSettings; diff --git a/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/registration/AuthenticatorPushRegistration.java b/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/registration/AuthenticatorPushRegistration.java index 644c890810..a8d87d3c33 100644 --- a/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/registration/AuthenticatorPushRegistration.java +++ b/openam-authentication/openam-auth-push/src/main/java/org/forgerock/openam/authentication/modules/push/registration/AuthenticatorPushRegistration.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.push.registration; @@ -34,7 +35,7 @@ import javax.security.auth.callback.ConfirmationCallback; import javax.security.auth.callback.TextOutputCallback; import javax.security.auth.login.LoginException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.json.JsonValue; diff --git a/openam-authentication/openam-auth-qr/pom.xml b/openam-authentication/openam-auth-qr/pom.xml index 684f49f040..3226922137 100755 --- a/openam-authentication/openam-auth-qr/pom.xml +++ b/openam-authentication/openam-auth-qr/pom.xml @@ -11,6 +11,7 @@ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions copyright [year] [name of copyright owner]". + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -19,7 +20,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -35,8 +36,8 @@ openam-auth-common - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-radius/pom.xml b/openam-authentication/openam-auth-radius/pom.xml index 95de4d64d7..3e71337750 100755 --- a/openam-authentication/openam-auth-radius/pom.xml +++ b/openam-authentication/openam-auth-radius/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-authentication/openam-auth-recaptcha/pom.xml b/openam-authentication/openam-auth-recaptcha/pom.xml index 2cb786b2f8..6f6b48781d 100644 --- a/openam-authentication/openam-auth-recaptcha/pom.xml +++ b/openam-authentication/openam-auth-recaptcha/pom.xml @@ -11,6 +11,7 @@ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions copyright [year] [name of copyright owner]". + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -19,7 +20,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -42,8 +43,8 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-saml2/pom.xml b/openam-authentication/openam-auth-saml2/pom.xml index c1a6825736..ee7b1240f4 100644 --- a/openam-authentication/openam-auth-saml2/pom.xml +++ b/openam-authentication/openam-auth-saml2/pom.xml @@ -13,12 +13,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> openam-authentication org.openidentityplatform.openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT 4.0.0 @@ -42,8 +43,8 @@ openam-federation-library - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2.java b/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2.java index 6191437540..15388f1483 100644 --- a/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2.java +++ b/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2.java @@ -13,6 +13,7 @@ * * Copyright 2015-2016 ForgeRock AS. * Portions copyright 2019 Open Source Solution Technology Corporation + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.saml2; @@ -79,8 +80,8 @@ import javax.security.auth.callback.Callback; import javax.security.auth.login.LoginException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.federation.saml2.SAML2TokenRepositoryException; diff --git a/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2PostAuthenticationPlugin.java b/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2PostAuthenticationPlugin.java index 9b6323fed2..8d97973d1c 100644 --- a/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2PostAuthenticationPlugin.java +++ b/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2PostAuthenticationPlugin.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.saml2; @@ -53,8 +54,8 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.federation.saml2.SAML2TokenRepositoryException; import org.forgerock.openam.saml2.SAML2Store; diff --git a/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2Proxy.java b/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2Proxy.java index ad97232225..6dab30fef2 100644 --- a/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2Proxy.java +++ b/openam-authentication/openam-auth-saml2/src/main/java/org/forgerock/openam/authentication/modules/saml2/SAML2Proxy.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.saml2; @@ -23,9 +24,9 @@ import java.util.Map; import java.util.UUID; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.google.common.annotations.VisibleForTesting; import org.forgerock.guice.core.InjectorHolder; diff --git a/openam-authentication/openam-auth-saml2/src/test/java/org/forgerock/openam/authentication/modules/saml2/SAML2ProxyTest.java b/openam-authentication/openam-auth-saml2/src/test/java/org/forgerock/openam/authentication/modules/saml2/SAML2ProxyTest.java index 5caf37e99f..b4217cecb1 100644 --- a/openam-authentication/openam-auth-saml2/src/test/java/org/forgerock/openam/authentication/modules/saml2/SAML2ProxyTest.java +++ b/openam-authentication/openam-auth-saml2/src/test/java/org/forgerock/openam/authentication/modules/saml2/SAML2ProxyTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.saml2; @@ -24,8 +25,8 @@ import com.sun.identity.shared.encode.URLEncDec; import com.sun.xml.bind.StringInputStream; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; import javax.xml.xpath.XPathFactory; import org.forgerock.util.xml.XMLUtils; diff --git a/openam-authentication/openam-auth-scripted/pom.xml b/openam-authentication/openam-auth-scripted/pom.xml index 75f79ebd60..6ff4ee1b0c 100644 --- a/openam-authentication/openam-auth-scripted/pom.xml +++ b/openam-authentication/openam-auth-scripted/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -32,8 +33,8 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-scripted/src/main/java/org/forgerock/openam/authentication/modules/scripted/ScriptHttpRequestWrapper.java b/openam-authentication/openam-auth-scripted/src/main/java/org/forgerock/openam/authentication/modules/scripted/ScriptHttpRequestWrapper.java index db403875e5..4a87af9bef 100644 --- a/openam-authentication/openam-auth-scripted/src/main/java/org/forgerock/openam/authentication/modules/scripted/ScriptHttpRequestWrapper.java +++ b/openam-authentication/openam-auth-scripted/src/main/java/org/forgerock/openam/authentication/modules/scripted/ScriptHttpRequestWrapper.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.modules.scripted; import org.forgerock.util.Reject; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Collections; import java.util.Enumeration; import java.util.List; diff --git a/openam-authentication/openam-auth-securid/pom.xml b/openam-authentication/openam-auth-securid/pom.xml index 6b86b1916e..d3a6e237ee 100755 --- a/openam-authentication/openam-auth-securid/pom.xml +++ b/openam-authentication/openam-auth-securid/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-authentication/openam-auth-webauthn/pom.xml b/openam-authentication/openam-auth-webauthn/pom.xml index f5c53d8a1a..24b565823d 100755 --- a/openam-authentication/openam-auth-webauthn/pom.xml +++ b/openam-authentication/openam-auth-webauthn/pom.xml @@ -12,7 +12,7 @@ * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions copyright [year] [name of copyright owner]". * - * Copyright 2024 3A-Systems LLC + * Copyright 2024-2025 3A-Systems LLC --> 4.0.0 @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT 0.21.9.RELEASE @@ -40,8 +40,8 @@ openam-auth-common - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-webauthn/src/main/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnAuthenticationProcessor.java b/openam-authentication/openam-auth-webauthn/src/main/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnAuthenticationProcessor.java index b26b9cc213..b80e0326f9 100644 --- a/openam-authentication/openam-auth-webauthn/src/main/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnAuthenticationProcessor.java +++ b/openam-authentication/openam-auth-webauthn/src/main/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnAuthenticationProcessor.java @@ -34,7 +34,7 @@ import com.webauthn4j.validator.exception.ValidationException; import org.apache.commons.lang3.ArrayUtils; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.List; import java.util.Objects; diff --git a/openam-authentication/openam-auth-webauthn/src/main/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnRegistrationProcessor.java b/openam-authentication/openam-auth-webauthn/src/main/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnRegistrationProcessor.java index bed88aa3bc..0603d45dea 100644 --- a/openam-authentication/openam-auth-webauthn/src/main/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnRegistrationProcessor.java +++ b/openam-authentication/openam-auth-webauthn/src/main/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnRegistrationProcessor.java @@ -11,7 +11,7 @@ * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions Copyrighted [year] [name of copyright owner]". * - * Copyright 2024 3A-Systems LLC. All rights reserved. + * Copyright 2024-2025 3A-Systems LLC. All rights reserved. */ package org.openidentityplatform.openam.authentication.modules.webauthn; @@ -40,7 +40,7 @@ import com.webauthn4j.server.ServerProperty; import com.webauthn4j.validator.exception.ValidationException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/openam-authentication/openam-auth-webauthn/src/test/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnAuthenticationTest.java b/openam-authentication/openam-auth-webauthn/src/test/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnAuthenticationTest.java index d28b180c16..bc0b3e5740 100644 --- a/openam-authentication/openam-auth-webauthn/src/test/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnAuthenticationTest.java +++ b/openam-authentication/openam-auth-webauthn/src/test/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnAuthenticationTest.java @@ -11,7 +11,7 @@ * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions Copyrighted [year] [name of copyright owner]". * - * Copyright 2024 3A-Systems LLC. All rights reserved. + * Copyright 2024-2025 3A-Systems LLC. All rights reserved. */ package org.openidentityplatform.openam.authentication.modules.webauthn; @@ -28,7 +28,7 @@ import javax.security.auth.callback.Callback; import javax.security.auth.callback.NameCallback; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.idm.AMIdentity; import org.mockito.Mockito; diff --git a/openam-authentication/openam-auth-webauthn/src/test/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnRegistrationTest.java b/openam-authentication/openam-auth-webauthn/src/test/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnRegistrationTest.java index b2d5197fc5..beafa73477 100644 --- a/openam-authentication/openam-auth-webauthn/src/test/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnRegistrationTest.java +++ b/openam-authentication/openam-auth-webauthn/src/test/java/org/openidentityplatform/openam/authentication/modules/webauthn/WebAuthnRegistrationTest.java @@ -11,7 +11,7 @@ * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions Copyrighted [year] [name of copyright owner]". * - * Copyright 2024 3A-Systems LLC. All rights reserved. + * Copyright 2024-2025 3A-Systems LLC. All rights reserved. */ package org.openidentityplatform.openam.authentication.modules.webauthn; @@ -29,7 +29,7 @@ import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.TextOutputCallback; import javax.security.auth.callback.PasswordCallback; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.mockito.Mockito; import org.testng.annotations.BeforeMethod; diff --git a/openam-authentication/openam-auth-windowsdesktopsso/pom.xml b/openam-authentication/openam-auth-windowsdesktopsso/pom.xml index ea18f48399..74df4a84ea 100755 --- a/openam-authentication/openam-auth-windowsdesktopsso/pom.xml +++ b/openam-authentication/openam-auth-windowsdesktopsso/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-authentication - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -32,8 +33,8 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-authentication/openam-auth-windowsdesktopsso/src/main/java/com/sun/identity/authentication/modules/windowsdesktopsso/WindowsDesktopSSO.java b/openam-authentication/openam-auth-windowsdesktopsso/src/main/java/com/sun/identity/authentication/modules/windowsdesktopsso/WindowsDesktopSSO.java index 47330977bd..d79a459b05 100644 --- a/openam-authentication/openam-auth-windowsdesktopsso/src/main/java/com/sun/identity/authentication/modules/windowsdesktopsso/WindowsDesktopSSO.java +++ b/openam-authentication/openam-auth-windowsdesktopsso/src/main/java/com/sun/identity/authentication/modules/windowsdesktopsso/WindowsDesktopSSO.java @@ -25,6 +25,7 @@ * $Id: WindowsDesktopSSO.java,v 1.7 2009/07/28 19:40:45 beomsuk Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.modules.windowsdesktopsso; @@ -59,7 +60,7 @@ import javax.security.auth.callback.Callback; import javax.security.auth.login.Configuration; import javax.security.auth.login.LoginContext; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileOutputStream; diff --git a/openam-authentication/openam-auth-windowsdesktopsso/src/test/java/com/sun/identity/authentication/modules/windowsdesktopsso/WindowsDesktopSSOTest.java b/openam-authentication/openam-auth-windowsdesktopsso/src/test/java/com/sun/identity/authentication/modules/windowsdesktopsso/WindowsDesktopSSOTest.java index 8e148c53af..1334c1db14 100644 --- a/openam-authentication/openam-auth-windowsdesktopsso/src/test/java/com/sun/identity/authentication/modules/windowsdesktopsso/WindowsDesktopSSOTest.java +++ b/openam-authentication/openam-auth-windowsdesktopsso/src/test/java/com/sun/identity/authentication/modules/windowsdesktopsso/WindowsDesktopSSOTest.java @@ -39,7 +39,7 @@ import static org.testng.Assert.*; @PrepareForTest({ SystemProperties.class, AuthD.class, InjectorHolder.class}) -@PowerMockIgnore({"jdk.internal.reflect.*", "javax.servlet.*"}) +@PowerMockIgnore({"jdk.internal.reflect.*", "jakarta.servlet.*"}) public class WindowsDesktopSSOTest extends PowerMockTestCase { WindowsDesktopSSO windowsDesktopSSO = null; diff --git a/openam-authentication/pom.xml b/openam-authentication/pom.xml index 07d0ab52c7..9d2e9d1eed 100755 --- a/openam-authentication/pom.xml +++ b/openam-authentication/pom.xml @@ -22,7 +22,7 @@ org.openidentityplatform.openam openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-cassandra/openam-cassandra-cts/pom.xml b/openam-cassandra/openam-cassandra-cts/pom.xml index cfc889d689..b9e684bd7c 100644 --- a/openam-cassandra/openam-cassandra-cts/pom.xml +++ b/openam-cassandra/openam-cassandra-cts/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2019 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -20,7 +21,7 @@ org.openidentityplatform.openam openam-cassandra - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT openam-cassandra-cts @@ -63,16 +64,5 @@ 2.2 - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - UTF-8 - - - \ No newline at end of file diff --git a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/CTSAsyncConnectionModule.java b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/CTSAsyncConnectionModule.java index 004d78cba7..6d5eae98e9 100644 --- a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/CTSAsyncConnectionModule.java +++ b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/CTSAsyncConnectionModule.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2019 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. */ package org.openidentityplatform.openam.cassandra; import java.util.concurrent.ExecutorService; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.cts.api.CoreTokenConstants; import org.forgerock.openam.cts.impl.queue.config.CTSQueueConfiguration; @@ -51,7 +52,7 @@ protected void configureTaskExecutor(PrivateBinder binder) { @Override - protected Class> getConnectionFactoryProviderType() { + protected Class> getConnectionFactoryProviderType() { return CTSConnectionFactoryProvider.class; } diff --git a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/ConnectionFactoryProvider.java b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/ConnectionFactoryProvider.java index 10af2740a0..5b0a2d43a3 100644 --- a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/ConnectionFactoryProvider.java +++ b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/ConnectionFactoryProvider.java @@ -12,15 +12,16 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2019 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. */ package org.openidentityplatform.openam.cassandra; import java.text.MessageFormat; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.openam.cts.api.CoreTokenConstants; import org.forgerock.openam.sm.ConnectionConfig; diff --git a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/DataLayerConfiguration.java b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/DataLayerConfiguration.java index 8974eea476..bd6f03988e 100644 --- a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/DataLayerConfiguration.java +++ b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/DataLayerConfiguration.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2019 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. */ package org.openidentityplatform.openam.cassandra; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.cts.impl.CTSDataLayerConfiguration; import org.forgerock.openam.sm.datalayer.api.DataLayerConstants; diff --git a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/DataLayerConnectionModule.java b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/DataLayerConnectionModule.java index 8e742058bb..bfb2ca580e 100644 --- a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/DataLayerConnectionModule.java +++ b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/DataLayerConnectionModule.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2019 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. */ package org.openidentityplatform.openam.cassandra; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.forgerock.openam.cts.api.tokens.Token; import org.forgerock.openam.cts.utils.LdapTokenAttributeConversion; @@ -90,7 +91,7 @@ protected Class getLdapConfigurationType() * return */ @SuppressWarnings("rawtypes") - protected Class> getConnectionFactoryProviderType() { + protected Class> getConnectionFactoryProviderType() { return DataLayerConnectionFactoryCache.class; } diff --git a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/Filter.java b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/Filter.java index 3310c713e0..642cc5c007 100644 --- a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/Filter.java +++ b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/Filter.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2019 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. */ package org.openidentityplatform.openam.cassandra; @@ -21,7 +22,7 @@ import java.util.Map; import java.util.TreeMap; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.forgerock.guice.core.InjectorHolder; diff --git a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryBuilder.java b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryBuilder.java index 8a1680d795..ec983f0790 100644 --- a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryBuilder.java +++ b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryBuilder.java @@ -29,8 +29,8 @@ import java.util.Set; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.lang3.StringUtils; import org.forgerock.openam.cts.continuous.ContinuousQuery; diff --git a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryFactory.java b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryFactory.java index e534c37e2e..45719c6f3a 100644 --- a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryFactory.java +++ b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryFactory.java @@ -13,11 +13,12 @@ * * Copyright 2015 ForgeRock AS. * Copyright 2019 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. */ package org.openidentityplatform.openam.cassandra; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.tokens.CoreTokenField; import com.datastax.oss.driver.api.core.CqlSession; diff --git a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryFilterVisitor.java b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryFilterVisitor.java index e2a4e070df..7a86409d50 100644 --- a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryFilterVisitor.java +++ b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/QueryFilterVisitor.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2019 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. */ package org.openidentityplatform.openam.cassandra; @@ -22,7 +23,7 @@ import java.util.Calendar; import java.util.List; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.tokens.CoreTokenField; import org.forgerock.openam.tokens.TokenType; diff --git a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/TokenStorageAdapter.java b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/TokenStorageAdapter.java index fc7a0709f6..a382a87c7d 100644 --- a/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/TokenStorageAdapter.java +++ b/openam-cassandra/openam-cassandra-cts/src/main/java/org/openidentityplatform/openam/cassandra/TokenStorageAdapter.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2019 Open Identity Platform Community. + * Portions copyright 2025 3A Systems LLC. */ package org.openidentityplatform.openam.cassandra; @@ -34,7 +35,7 @@ import java.util.Set; import java.util.TreeSet; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.forgerock.openam.cts.api.fields.CoreTokenFieldTypes; diff --git a/openam-cassandra/openam-cassandra-datastore/pom.xml b/openam-cassandra/openam-cassandra-datastore/pom.xml index 22c9b5b2a1..0c7864e47d 100644 --- a/openam-cassandra/openam-cassandra-datastore/pom.xml +++ b/openam-cassandra/openam-cassandra-datastore/pom.xml @@ -20,7 +20,7 @@ org.openidentityplatform.openam openam-cassandra - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT openam-cassandra-datastore diff --git a/openam-cassandra/openam-cassandra-embedded/pom.xml b/openam-cassandra/openam-cassandra-embedded/pom.xml index bec3f40b22..87a7183825 100644 --- a/openam-cassandra/openam-cassandra-embedded/pom.xml +++ b/openam-cassandra/openam-cassandra-embedded/pom.xml @@ -20,7 +20,7 @@ org.openidentityplatform.openam openam-cassandra - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT openam-cassandra-embedded diff --git a/openam-cassandra/pom.xml b/openam-cassandra/pom.xml index fabf68f741..4131916b25 100644 --- a/openam-cassandra/pom.xml +++ b/openam-cassandra/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT OpenAM Cassandra diff --git a/openam-certs/pom.xml b/openam-certs/pom.xml index eff793a8ed..f4e8e92107 100644 --- a/openam-certs/pom.xml +++ b/openam-certs/pom.xml @@ -19,7 +19,7 @@ openam org.openidentityplatform.openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT 4.0.0 diff --git a/openam-cli/openam-cli-definitions/pom.xml b/openam-cli/openam-cli-definitions/pom.xml index 0586a52225..39405f4d36 100644 --- a/openam-cli/openam-cli-definitions/pom.xml +++ b/openam-cli/openam-cli-definitions/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam-cli - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-cli/openam-cli-impl/pom.xml b/openam-cli/openam-cli-impl/pom.xml index 49d589cf43..786041ce21 100644 --- a/openam-cli/openam-cli-impl/pom.xml +++ b/openam-cli/openam-cli-impl/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2012-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -21,7 +22,7 @@ org.openidentityplatform.openam openam-cli - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -79,8 +80,8 @@ OpenFM - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/SessionCommand.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/SessionCommand.java index 02ccf8e9f7..6bc649c2c3 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/SessionCommand.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/SessionCommand.java @@ -25,6 +25,7 @@ * $Id: SessionCommand.java,v 1.9 2010/01/04 18:59:21 veiming Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli; @@ -42,7 +43,7 @@ import java.util.StringTokenizer; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.ldap.LDAPUtils; import org.forgerock.openam.session.SessionCache; diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/WebCLIHelper.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/WebCLIHelper.java index 35fcdcc33f..8912af71bb 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/WebCLIHelper.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/WebCLIHelper.java @@ -29,6 +29,7 @@ /* * Portions Copyrighted 2011 ForgeRock AS * Portions Copyrighted 2012 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli; @@ -40,7 +41,7 @@ import java.util.List; import java.util.Map; import java.util.ResourceBundle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.owasp.esapi.ESAPI; /** diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/CreateApplication.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/CreateApplication.java index 7432e7f7ed..67378c5bb3 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/CreateApplication.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/CreateApplication.java @@ -25,6 +25,7 @@ * $Id: CreateApplication.java,v 1.1 2009/08/19 05:40:31 veiming Exp $ * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -44,7 +45,7 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.entitlement.service.ApplicationServiceFactory; import org.forgerock.openam.entitlement.utils.EntitlementUtils; diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/CreateApplicationPrivilege.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/CreateApplicationPrivilege.java index b9c3d9b2fb..7e5684bbd3 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/CreateApplicationPrivilege.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/CreateApplicationPrivilege.java @@ -25,6 +25,7 @@ * $Id: CreateApplicationPrivilege.java,v 1.2 2009/11/19 01:02:02 veiming Exp $ * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -47,7 +48,7 @@ import java.util.Map; import java.util.Set; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/DeleteApplicationPrivilege.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/DeleteApplicationPrivilege.java index 853ed7261b..821067b1ee 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/DeleteApplicationPrivilege.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/DeleteApplicationPrivilege.java @@ -25,6 +25,7 @@ * $Id: DeleteApplicationPrivilege.java,v 1.1 2009/11/10 19:01:03 veiming Exp $ * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -43,7 +44,7 @@ import java.util.List; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/DeleteApplications.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/DeleteApplications.java index f0addde40c..b236f18fd6 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/DeleteApplications.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/DeleteApplications.java @@ -25,6 +25,7 @@ * $Id: DeleteApplications.java,v 1.1 2009/08/19 05:40:31 veiming Exp $ * * Portions Copyrighted 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -40,7 +41,7 @@ import java.text.MessageFormat; import java.util.List; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; import org.forgerock.openam.entitlement.service.ApplicationService; diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplicationPrivileges.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplicationPrivileges.java index 56b25ca33d..8c17012d18 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplicationPrivileges.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplicationPrivileges.java @@ -25,6 +25,7 @@ * $Id: ListApplicationPrivileges.java,v 1.1 2009/11/10 19:01:04 veiming Exp $ * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -43,7 +44,7 @@ import java.util.Collections; import java.util.Set; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplicationTypes.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplicationTypes.java index 386a3ec5e3..480e181b58 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplicationTypes.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplicationTypes.java @@ -25,6 +25,7 @@ * $Id: ListApplicationTypes.java,v 1.1 2009/08/19 05:40:31 veiming Exp $ * * Portions Copyrighted 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -37,7 +38,7 @@ import com.sun.identity.log.Level; import java.util.Set; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.entitlement.service.ApplicationServiceFactory; diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplications.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplications.java index b78474d22b..cb20d196d0 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplications.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ListApplications.java @@ -25,6 +25,7 @@ * $Id: ListApplications.java,v 1.2 2009/11/19 01:02:02 veiming Exp $ * * Portions Copyrighted 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -39,7 +40,7 @@ import com.sun.identity.log.Level; import java.util.Set; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.entitlement.service.ApplicationServiceFactory; diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/RemoveApplicationPrivilegeResources.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/RemoveApplicationPrivilegeResources.java index 35ee5ead81..b5cf4694c6 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/RemoveApplicationPrivilegeResources.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/RemoveApplicationPrivilegeResources.java @@ -25,6 +25,7 @@ * $Id: RemoveApplicationPrivilegeResources.java,v 1.2 2009/11/19 01:02:02 veiming Exp $ * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -46,7 +47,7 @@ import java.util.Map; import java.util.Set; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/RemoveApplicationPrivilegeSubjects.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/RemoveApplicationPrivilegeSubjects.java index 356949e237..b2ed62ba7a 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/RemoveApplicationPrivilegeSubjects.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/RemoveApplicationPrivilegeSubjects.java @@ -25,6 +25,7 @@ * $Id: RemoveApplicationPrivilegeSubjects.java,v 1.1 2009/11/10 19:01:04 veiming Exp $ * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -46,7 +47,7 @@ import java.text.MessageFormat; import java.util.Set; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplication.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplication.java index ef9fa73662..4e38f10ce7 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplication.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplication.java @@ -25,6 +25,7 @@ * $Id: SetApplication.java,v 1.2 2009/11/19 01:02:02 veiming Exp $ * * Portions Copyrighted 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -43,7 +44,7 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; import org.forgerock.openam.entitlement.service.ApplicationServiceFactory; diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplicationPrivilegeResources.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplicationPrivilegeResources.java index 7c6b5c018e..6b2f6157ea 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplicationPrivilegeResources.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplicationPrivilegeResources.java @@ -25,6 +25,7 @@ * $Id: SetApplicationPrivilegeResources.java,v 1.2 2009/11/19 01:02:02 veiming Exp $ * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -46,7 +47,7 @@ import java.util.Map; import java.util.Set; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplicationPrivilegeSubjects.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplicationPrivilegeSubjects.java index b41f72477b..994c9eff98 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplicationPrivilegeSubjects.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/SetApplicationPrivilegeSubjects.java @@ -25,6 +25,7 @@ * $Id: SetApplicationPrivilegeSubjects.java,v 1.1 2009/11/10 19:01:04 veiming Exp $ * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -47,7 +48,7 @@ import java.util.HashSet; import java.util.Set; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ShowApplication.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ShowApplication.java index 216726b67e..2cb0742c77 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ShowApplication.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ShowApplication.java @@ -25,6 +25,7 @@ * $Id4 * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -42,7 +43,7 @@ import java.text.MessageFormat; import java.util.Set; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.entitlement.service.ApplicationServiceFactory; diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ShowApplicationPrivilege.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ShowApplicationPrivilege.java index 3254800d73..9d8baafc4a 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ShowApplicationPrivilege.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/ShowApplicationPrivilege.java @@ -25,6 +25,7 @@ * $Id: ShowApplicationPrivilege.java,v 1.1 2009/11/10 19:01:04 veiming Exp $ * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -46,7 +47,7 @@ import java.util.Map; import java.util.Set; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/UpdateApplicationPrivilege.java b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/UpdateApplicationPrivilege.java index 392c7af302..a557dc5e0c 100644 --- a/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/UpdateApplicationPrivilege.java +++ b/openam-cli/openam-cli-impl/src/main/java/com/sun/identity/cli/entitlement/UpdateApplicationPrivilege.java @@ -25,6 +25,7 @@ * $Id: UpdateApplicationPrivilege.java,v 1.1 2009/11/10 19:01:04 veiming Exp $ * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.cli.entitlement; @@ -44,7 +45,7 @@ import java.text.MessageFormat; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-cli/openam-cli-impl/src/main/java/org/forgerock/openam/cli/entitlement/PolicyExport.java b/openam-cli/openam-cli-impl/src/main/java/org/forgerock/openam/cli/entitlement/PolicyExport.java index 3fed5a5dde..29c616bf09 100644 --- a/openam-cli/openam-cli-impl/src/main/java/org/forgerock/openam/cli/entitlement/PolicyExport.java +++ b/openam-cli/openam-cli-impl/src/main/java/org/forgerock/openam/cli/entitlement/PolicyExport.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.cli.entitlement; @@ -25,7 +26,7 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.http.Client; import org.forgerock.http.protocol.Header; diff --git a/openam-cli/openam-cli-impl/src/main/java/org/forgerock/openam/cli/entitlement/PolicyImport.java b/openam-cli/openam-cli-impl/src/main/java/org/forgerock/openam/cli/entitlement/PolicyImport.java index 0a1c8d1f8c..4f69f36d15 100644 --- a/openam-cli/openam-cli-impl/src/main/java/org/forgerock/openam/cli/entitlement/PolicyImport.java +++ b/openam-cli/openam-cli-impl/src/main/java/org/forgerock/openam/cli/entitlement/PolicyImport.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.cli.entitlement; @@ -23,7 +24,7 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.http.Client; import org.forgerock.http.protocol.Request; diff --git a/openam-cli/pom.xml b/openam-cli/pom.xml index e97ecfa417..c37ce60d6e 100644 --- a/openam-cli/pom.xml +++ b/openam-cli/pom.xml @@ -21,7 +21,7 @@ org.openidentityplatform.openam openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT diff --git a/openam-clientsdk/pom.xml b/openam-clientsdk/pom.xml index a23507379b..36fab8dc54 100755 --- a/openam-clientsdk/pom.xml +++ b/openam-clientsdk/pom.xml @@ -23,7 +23,7 @@ org.openidentityplatform.openam openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -698,6 +698,15 @@ javax.activation ${shade.package}.javax.activation + + + jakarta.inject + ${shade.package}.javax.inject + + + jakarta.mail + ${shade.package}.javax.mail + false true diff --git a/openam-common-auth-ui/pom.xml b/openam-common-auth-ui/pom.xml index 27a33977d7..7180bc5b5d 100755 --- a/openam-common-auth-ui/pom.xml +++ b/openam-common-auth-ui/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2012-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -20,7 +21,7 @@ org.openidentityplatform.openam openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -31,13 +32,13 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided - javax.servlet.jsp - jsp-api + jakarta.servlet.jsp + jakarta.servlet.jsp-api org.openidentityplatform.openam diff --git a/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/AuthViewBeanBase.java b/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/AuthViewBeanBase.java index bf6b67de7f..c11712702c 100644 --- a/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/AuthViewBeanBase.java +++ b/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/AuthViewBeanBase.java @@ -26,6 +26,7 @@ * * Portions Copyrighted 2011-2015 ForgeRock AS. * Portions Copyrighted 2013-2015 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.UI; @@ -47,8 +48,8 @@ import java.util.Map; import java.util.Set; import java.util.Enumeration; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.openam.console.base.ConsoleViewBeanBase; /** diff --git a/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEFormTag.java b/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEFormTag.java index 508db4bbf8..5d09c5d210 100644 --- a/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEFormTag.java +++ b/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEFormTag.java @@ -25,10 +25,11 @@ * $Id: DSAMEFormTag.java,v 1.2 2008/06/25 05:41:50 qcheng Exp $ * * Portions Copyrighted 2011-2014 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.UI.taglib; -import javax.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspException; import com.iplanet.am.util.SystemProperties; import com.iplanet.jato.taglib.html.FormTag; diff --git a/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEHrefTag.java b/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEHrefTag.java index 8f8f2d4415..e8a9611c19 100644 --- a/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEHrefTag.java +++ b/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEHrefTag.java @@ -26,6 +26,7 @@ * * Portions Copyrighted 2011-2016 ForgeRock AS. * Portions Copyrighted 2012 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.UI.taglib; @@ -38,9 +39,9 @@ import com.iplanet.jato.view.ViewBeanBase; import com.sun.identity.authentication.UI.AuthViewBeanBase; import com.sun.identity.shared.debug.Debug; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.tagext.BodyContent; -import javax.servlet.jsp.tagext.BodyTag; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTag; import org.owasp.esapi.ESAPI; diff --git a/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEResBundleTag.java b/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEResBundleTag.java index 99e4a92741..f2c4f5a499 100644 --- a/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEResBundleTag.java +++ b/openam-common-auth-ui/src/main/java/com/sun/identity/authentication/UI/taglib/DSAMEResBundleTag.java @@ -28,6 +28,7 @@ /** * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.UI.taglib; @@ -39,9 +40,9 @@ import com.sun.identity.shared.locale.AMResourceBundleCache; import java.util.ResourceBundle; import java.util.MissingResourceException; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.tagext.BodyContent; -import javax.servlet.jsp.tagext.BodyTag; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTag; /** * Href tag reimplements JATO Href tag. It adds a content encoding diff --git a/openam-console/pom.xml b/openam-console/pom.xml index 20ee5d91ba..ca6153cf62 100644 --- a/openam-console/pom.xml +++ b/openam-console/pom.xml @@ -22,7 +22,7 @@ org.openidentityplatform.openam openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -106,11 +106,11 @@ - org.openidentityplatform.openam.shaded + org.openidentityplatform.openam.jakarta jato-shaded - org.openidentityplatform.external.com.sun.web.ui + org.openidentityplatform.openam.jakarta cc @@ -158,13 +158,13 @@ cc_zh_TW - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided - javax.servlet.jsp - jsp-api + jakarta.servlet.jsp + jakarta.servlet.jsp-api org.openidentityplatform.openam diff --git a/openam-console/src/main/java/com/sun/identity/console/XuiRedirectHelper.java b/openam-console/src/main/java/com/sun/identity/console/XuiRedirectHelper.java index 94d36abd54..a25698647f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/XuiRedirectHelper.java +++ b/openam-console/src/main/java/com/sun/identity/console/XuiRedirectHelper.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console; @@ -25,7 +26,7 @@ import org.forgerock.openam.services.baseurl.BaseURLProviderFactory; import org.forgerock.openam.xui.XUIState; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; import java.text.MessageFormat; diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentAddViewBean.java index 7fec5d4194..8b1e88c38a 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentAddViewBean.java @@ -24,6 +24,8 @@ * * $Id: AgentAddViewBean.java,v 1.8 2008/09/20 06:38:46 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.agentconfig; @@ -45,7 +47,7 @@ import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.html.CCTextField; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.text.MessageFormat; /** diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentConfigInheritViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentConfigInheritViewBean.java index b5d9ff26ea..4fcff37271 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentConfigInheritViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentConfigInheritViewBean.java @@ -24,6 +24,8 @@ * * $Id: AgentConfigInheritViewBean.java,v 1.8 2008/08/08 17:34:45 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ /* @@ -62,7 +64,7 @@ import java.util.MissingResourceException; import java.util.ResourceBundle; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Servers and Sites Management main page. diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentDumpViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentDumpViewBean.java index 38f9fa8d98..9b36a9d167 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentDumpViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentDumpViewBean.java @@ -25,6 +25,7 @@ * $Id: AgentDumpViewBean.java,v 1.1 2008/12/10 18:25:14 farble1670 Exp $ * * Portions Copyrighted 2011-2014 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.agentconfig; @@ -48,7 +49,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.text.MessageFormat; /** diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentExportPolicyViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentExportPolicyViewBean.java index a7d28474f5..439ab8a8d2 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentExportPolicyViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentExportPolicyViewBean.java @@ -23,6 +23,8 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * $Id: AgentExportPolicyViewBean.java,v 1.1 2009/12/19 00:08:37 asyhuang Exp $ + * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.agentconfig; @@ -43,7 +45,7 @@ import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.html.CCStaticTextField; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.owasp.esapi.ESAPI; import java.text.MessageFormat; diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentGroupAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentGroupAddViewBean.java index 8f9c029a15..6a25f245ec 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentGroupAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentGroupAddViewBean.java @@ -24,6 +24,8 @@ * * $Id: AgentGroupAddViewBean.java,v 1.6 2008/06/25 05:42:44 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.agentconfig; @@ -45,7 +47,7 @@ import com.sun.web.ui.view.html.CCTextField; import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * View Bean to create agent group. diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentProfileViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentProfileViewBean.java index 9c19eb8168..21f1376dcf 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentProfileViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentProfileViewBean.java @@ -24,6 +24,8 @@ * * $Id: AgentProfileViewBean.java,v 1.14 2009/11/10 23:20:15 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.agentconfig; @@ -62,7 +64,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Base class for all agent profile view bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentsViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentsViewBean.java index e550c4691f..6b945a9d2c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentsViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/AgentsViewBean.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.agentconfig; @@ -71,7 +72,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.console.agentconfig.model.AgentsModel; import com.sun.identity.console.agentconfig.model.AgentsModelImpl; import com.sun.identity.console.base.AMPostViewBean; diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/GenericAgentProfileViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/GenericAgentProfileViewBean.java index 0a41710345..f05c728860 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/GenericAgentProfileViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/GenericAgentProfileViewBean.java @@ -24,6 +24,8 @@ * * $Id: GenericAgentProfileViewBean.java,v 1.15 2009/01/07 16:03:06 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.agentconfig; @@ -50,7 +52,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Generic Agent Profile View Bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/HomeViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/HomeViewBean.java index 3ac9c15009..771b717f92 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/HomeViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/HomeViewBean.java @@ -24,6 +24,8 @@ * * $Id: HomeViewBean.java,v 1.3 2008/06/25 05:42:44 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ /* @@ -42,7 +44,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import com.sun.web.ui.model.CCPageTitleModel; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceEditViewBean.java index 93a9a6be81..f8b127d377 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceEditViewBean.java @@ -24,6 +24,8 @@ * * $Id: WebServiceEditViewBean.java,v 1.7 2009/12/10 17:14:02 ggennaro Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.agentconfig; @@ -54,7 +56,7 @@ import java.util.Set; import java.util.StringTokenizer; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Base class for all WSS customized View Bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceUserCredAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceUserCredAddViewBean.java index f22be949da..46ca961091 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceUserCredAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceUserCredAddViewBean.java @@ -24,6 +24,8 @@ * * $Id: WebServiceUserCredAddViewBean.java,v 1.3 2008/11/24 21:36:49 farble1670 Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.agentconfig; @@ -46,7 +48,7 @@ import java.io.Serializable; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * View Bean to create new User Credential entry. diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceUserCredEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceUserCredEditViewBean.java index 4c1eb6ea2e..d0a6f74455 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceUserCredEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/WebServiceUserCredEditViewBean.java @@ -24,6 +24,8 @@ * * $Id: WebServiceUserCredEditViewBean.java,v 1.3 2008/11/24 21:36:49 farble1670 Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.agentconfig; @@ -47,7 +49,7 @@ import java.io.Serializable; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * View Bean to edit user credential entry. diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentDumpModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentDumpModelImpl.java index 4a85eee927..99b4ca2d13 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentDumpModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentDumpModelImpl.java @@ -23,6 +23,7 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * $Id: AgentDumpModelImpl.java,v 1.1 2008/12/10 18:25:14 farble1670 Exp $ + * Portions Copyrighted 2025 3A Systems LLC. * */ @@ -39,7 +40,7 @@ import com.sun.identity.idm.IdUtils; import com.sun.identity.sm.SMSException; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class AgentDumpModelImpl extends AMModelBase implements AgentDumpModel { diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentExportPolicyModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentExportPolicyModelImpl.java index 050f380d5a..8bbd94feb4 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentExportPolicyModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentExportPolicyModelImpl.java @@ -24,6 +24,8 @@ * * $Id: AgentExportPolicyModelImpl.java,v 1.1 2009/12/19 00:08:14 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.agentconfig.model; @@ -40,7 +42,7 @@ import com.sun.identity.wss.provider.ProviderException; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class AgentExportPolicyModelImpl extends AMModelBase implements AgentExportPolicyModel { diff --git a/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentsModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentsModelImpl.java index caee010df8..e9fbf580c5 100644 --- a/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentsModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/agentconfig/model/AgentsModelImpl.java @@ -28,6 +28,7 @@ /** * Portions Copyrighted 2012 ForgeRock Inc + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.agentconfig.model; @@ -65,7 +66,7 @@ import java.util.ResourceBundle; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/AbstractAuditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/audit/AbstractAuditViewBean.java index 6b048ade27..a807c94aa9 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/AbstractAuditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/AbstractAuditViewBean.java @@ -13,6 +13,7 @@ * * Copyright 2015-2016 ForgeRock AS. * Portions Copyrighted 2016 Nomura Research Institute, Ltd. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit; @@ -43,7 +44,7 @@ import com.sun.web.ui.view.table.CCActionTable; import org.forgerock.openam.utils.CollectionUtils; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashSet; diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/GlobalAuditConfigViewBean.java b/openam-console/src/main/java/com/sun/identity/console/audit/GlobalAuditConfigViewBean.java index 4689a024ba..2db6e7363c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/GlobalAuditConfigViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/GlobalAuditConfigViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit; @@ -25,7 +26,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Global Audit configuration UI view bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerAddViewBean.java index 265ad6cfc9..98b7026afd 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerAddViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit; @@ -23,7 +24,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Global Audit configuration UI view bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerEditViewBean.java index fdfbc0e0a8..8ac5256546 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerEditViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit; @@ -24,7 +25,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Global Audit configuration UI view bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerSelectViewBean.java b/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerSelectViewBean.java index 7cb43a28cc..14f4a2a7fb 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerSelectViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/GlobalEventHandlerSelectViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit; @@ -24,7 +25,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Global Audit configuration UI view bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/RealmAuditConfigViewBean.java b/openam-console/src/main/java/com/sun/identity/console/audit/RealmAuditConfigViewBean.java index 5d9e75ec58..5aac84e4c4 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/RealmAuditConfigViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/RealmAuditConfigViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit; @@ -27,7 +28,7 @@ import com.sun.identity.console.realm.ServicesViewBean; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Realm Audit configuration UI view bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerAddViewBean.java index 33f5e62c60..63ccaf27fb 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerAddViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit; @@ -23,7 +24,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Realm Audit configuration UI view bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerEditViewBean.java index 8cdae74155..75207b9462 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerEditViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit; @@ -24,7 +25,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Realm Audit configuration UI view bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerSelectViewBean.java b/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerSelectViewBean.java index f0135574c3..a7f7616f38 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerSelectViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/RealmEventHandlerSelectViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit; @@ -24,7 +25,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Realm Audit configuration UI view bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/model/AbstractAuditModel.java b/openam-console/src/main/java/com/sun/identity/console/audit/model/AbstractAuditModel.java index f0881c1212..ba60b496ea 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/model/AbstractAuditModel.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/model/AbstractAuditModel.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit.model; @@ -36,7 +37,7 @@ import com.sun.identity.sm.ServiceConfig; import com.sun.identity.sm.ServiceSchema; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.text.Collator; import java.util.ArrayList; import java.util.Collections; diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/model/GlobalAuditConfigModel.java b/openam-console/src/main/java/com/sun/identity/console/audit/model/GlobalAuditConfigModel.java index 963628b351..b78e39967c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/model/GlobalAuditConfigModel.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/model/GlobalAuditConfigModel.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit.model; @@ -27,7 +28,7 @@ import com.sun.identity.sm.ServiceSchema; import com.sun.identity.sm.ServiceSchemaManager; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Map; import java.util.Set; diff --git a/openam-console/src/main/java/com/sun/identity/console/audit/model/RealmAuditConfigModel.java b/openam-console/src/main/java/com/sun/identity/console/audit/model/RealmAuditConfigModel.java index 3b37e9fa3b..480a616022 100644 --- a/openam-console/src/main/java/com/sun/identity/console/audit/model/RealmAuditConfigModel.java +++ b/openam-console/src/main/java/com/sun/identity/console/audit/model/RealmAuditConfigModel.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.console.audit.model; @@ -29,7 +30,7 @@ import com.sun.identity.sm.ServiceSchema; import com.sun.identity.sm.ServiceSchemaManager; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Map; import java.util.Set; diff --git a/openam-console/src/main/java/com/sun/identity/console/authentication/AuthConfigViewBean.java b/openam-console/src/main/java/com/sun/identity/console/authentication/AuthConfigViewBean.java index 5ee8af946e..907f58ac9b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/authentication/AuthConfigViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/authentication/AuthConfigViewBean.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.authentication; @@ -69,7 +70,7 @@ import java.util.List; import java.util.Set; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class AuthConfigViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/authentication/AuthPropertiesViewBean.java b/openam-console/src/main/java/com/sun/identity/console/authentication/AuthPropertiesViewBean.java index 04a9c81095..5ace098486 100644 --- a/openam-console/src/main/java/com/sun/identity/console/authentication/AuthPropertiesViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/authentication/AuthPropertiesViewBean.java @@ -23,6 +23,7 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * Portions Copyrighted 2014-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. * * $Id: AuthPropertiesViewBean.java,v 1.5 2008/07/07 20:39:19 veiming Exp $ * @@ -32,7 +33,7 @@ import static com.sun.identity.console.XuiRedirectHelper.*; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.Serializable; import java.text.MessageFormat; import java.util.HashMap; diff --git a/openam-console/src/main/java/com/sun/identity/console/authentication/CoreAttributesViewBean.java b/openam-console/src/main/java/com/sun/identity/console/authentication/CoreAttributesViewBean.java index 263df40da8..d611bbc219 100644 --- a/openam-console/src/main/java/com/sun/identity/console/authentication/CoreAttributesViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/authentication/CoreAttributesViewBean.java @@ -24,6 +24,8 @@ * * $Id: CoreAttributesViewBean.java,v 1.2 2008/06/25 05:42:45 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.authentication; @@ -44,7 +46,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.web.ui.view.alert.CCAlert; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class CoreAttributesViewBean extends AMServiceProfileViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/authentication/EditAuthTypeViewBean.java b/openam-console/src/main/java/com/sun/identity/console/authentication/EditAuthTypeViewBean.java index 3874b3be0a..1f4621ae35 100644 --- a/openam-console/src/main/java/com/sun/identity/console/authentication/EditAuthTypeViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/authentication/EditAuthTypeViewBean.java @@ -29,6 +29,7 @@ /* * Portions Copyright 2014-2015 ForgeRock AS. * Portions Copyrighted 2015 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.authentication; @@ -50,7 +51,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.text.MessageFormat; import java.util.Map; diff --git a/openam-console/src/main/java/com/sun/identity/console/authentication/ScriptUploaderViewBean.java b/openam-console/src/main/java/com/sun/identity/console/authentication/ScriptUploaderViewBean.java index 9793501eac..88091cd8cf 100644 --- a/openam-console/src/main/java/com/sun/identity/console/authentication/ScriptUploaderViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/authentication/ScriptUploaderViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.authentication; @@ -26,7 +27,7 @@ import com.sun.web.ui.view.masthead.CCSecondaryMasthead; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * JATO view-bean for uploading scripts. Based on {@link com.sun.identity.console.federation.FileUploaderViewBean} but diff --git a/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthConfigurationModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthConfigurationModelImpl.java index a1295c6dea..630a773a93 100644 --- a/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthConfigurationModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthConfigurationModelImpl.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.authentication.model; @@ -50,7 +51,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthProfileModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthProfileModelImpl.java index 2b864835be..f5973a8cbe 100644 --- a/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthProfileModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthProfileModelImpl.java @@ -24,6 +24,8 @@ * * $Id: AuthProfileModelImpl.java,v 1.2 2008/06/25 05:42:46 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.authentication.model; @@ -34,7 +36,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthPropertiesModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthPropertiesModelImpl.java index 7f1baff155..253cf61657 100644 --- a/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthPropertiesModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/authentication/model/AuthPropertiesModelImpl.java @@ -25,6 +25,7 @@ * $Id: AuthPropertiesModelImpl.java,v 1.3 2008/07/09 02:04:49 veiming Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.authentication.model; @@ -45,7 +46,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/authentication/model/CoreAttributesModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/authentication/model/CoreAttributesModelImpl.java index 73bf5b1302..fdc0e510eb 100644 --- a/openam-console/src/main/java/com/sun/identity/console/authentication/model/CoreAttributesModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/authentication/model/CoreAttributesModelImpl.java @@ -24,6 +24,8 @@ * * $Id: CoreAttributesModelImpl.java,v 1.2 2008/06/25 05:42:46 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.authentication.model; @@ -40,7 +42,7 @@ import java.util.Set; import java.util.Collections; import java.util.HashSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/base/AMAdminFrameViewBean.java b/openam-console/src/main/java/com/sun/identity/console/base/AMAdminFrameViewBean.java index 010497c7b5..b91da36f0f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/AMAdminFrameViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/AMAdminFrameViewBean.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.base; @@ -36,7 +37,7 @@ import com.iplanet.jato.view.event.DisplayEvent; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.base.model.AMModelBase; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class AMAdminFrameViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/base/AMConsoleConfig.java b/openam-console/src/main/java/com/sun/identity/console/base/AMConsoleConfig.java index a8685d9087..1281bb4aaf 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/AMConsoleConfig.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/AMConsoleConfig.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.base; @@ -35,7 +36,7 @@ import com.sun.identity.shared.Constants; import com.sun.identity.common.RequestUtils; import com.sun.identity.console.base.model.AMAdminConstants; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public final class AMConsoleConfig { static private AMConsoleConfig instance = new AMConsoleConfig(); diff --git a/openam-console/src/main/java/com/sun/identity/console/base/AMInvalidURLViewBean.java b/openam-console/src/main/java/com/sun/identity/console/base/AMInvalidURLViewBean.java index b96de86bf6..2f88f8f69f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/AMInvalidURLViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/AMInvalidURLViewBean.java @@ -24,6 +24,8 @@ * * $Id: AMInvalidURLViewBean.java,v 1.2 2008/06/25 05:42:47 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.base; @@ -33,7 +35,7 @@ import com.sun.web.ui.view.alert.CCAlert; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.base.model.AMModelBase; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * AMInvalidURLViewBean is invoked when Module Servlet gets an diff --git a/openam-console/src/main/java/com/sun/identity/console/base/AMLogoutCommand.java b/openam-console/src/main/java/com/sun/identity/console/base/AMLogoutCommand.java index 02560533c9..33062783a0 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/AMLogoutCommand.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/AMLogoutCommand.java @@ -24,6 +24,8 @@ * * $Id: AMLogoutCommand.java,v 1.2 2008/06/25 05:42:47 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.base; @@ -32,7 +34,7 @@ import com.iplanet.jato.command.CommandEvent; import com.iplanet.jato.command.CommandException; import java.io.IOException; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import com.sun.identity.console.base.model.AMModelBase; /** diff --git a/openam-console/src/main/java/com/sun/identity/console/base/AMPrimaryMastHeadViewBean.java b/openam-console/src/main/java/com/sun/identity/console/base/AMPrimaryMastHeadViewBean.java index a3b68c4621..edabc80f0c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/AMPrimaryMastHeadViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/AMPrimaryMastHeadViewBean.java @@ -25,6 +25,7 @@ * $Id: AMPrimaryMastHeadViewBean.java,v 1.11 2009/08/18 22:38:10 veiming Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.base; @@ -58,7 +59,7 @@ import java.util.Map; import java.util.Set; import java.text.MessageFormat; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.owasp.esapi.ESAPI; /** diff --git a/openam-console/src/main/java/com/sun/identity/console/base/AMServiceProfileViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/base/AMServiceProfileViewBeanBase.java index 6ba8bdd633..ed7b7ccef8 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/AMServiceProfileViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/AMServiceProfileViewBeanBase.java @@ -25,6 +25,7 @@ * $Id: AMServiceProfileViewBeanBase.java,v 1.3 2009/11/10 04:16:17 bhavnab Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ @@ -53,7 +54,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class AMServiceProfileViewBeanBase extends DynamicRequestViewBean { diff --git a/openam-console/src/main/java/com/sun/identity/console/base/AMUncaughtExceptionViewBean.java b/openam-console/src/main/java/com/sun/identity/console/base/AMUncaughtExceptionViewBean.java index de83a04fff..7d7d7936bd 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/AMUncaughtExceptionViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/AMUncaughtExceptionViewBean.java @@ -24,6 +24,8 @@ * * $Id: AMUncaughtExceptionViewBean.java,v 1.2 2008/06/25 05:42:47 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.base; @@ -33,7 +35,7 @@ import com.sun.web.ui.view.alert.CCAlert; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.base.model.AMModelBase; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * AMUncaughtExceptionViewBean displays a message box when uncaught diff --git a/openam-console/src/main/java/com/sun/identity/console/base/AMViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/base/AMViewBeanBase.java index e459778d61..5642146269 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/AMViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/AMViewBeanBase.java @@ -25,6 +25,7 @@ * $Id: AMViewBeanBase.java,v 1.15 2009/10/19 18:17:33 asyhuang Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.base; @@ -91,8 +92,8 @@ import java.util.Map; import java.util.Set; import java.util.StringTokenizer; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.http.util.Uris; import org.forgerock.openam.console.base.ConsoleViewBeanBase; diff --git a/openam-console/src/main/java/com/sun/identity/console/base/AMViewConfig.java b/openam-console/src/main/java/com/sun/identity/console/base/AMViewConfig.java index dba5f3ddf1..47576c1a4b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/AMViewConfig.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/AMViewConfig.java @@ -25,6 +25,7 @@ * $Id: AMViewConfig.java,v 1.9 2008/06/25 05:42:48 qcheng Exp $ * * Portions Copyrighted 2012-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.base; @@ -57,7 +58,7 @@ import java.util.Map; import java.util.Set; import java.util.StringTokenizer; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; diff --git a/openam-console/src/main/java/com/sun/identity/console/base/AuthenticatedViewBean.java b/openam-console/src/main/java/com/sun/identity/console/base/AuthenticatedViewBean.java index b7890b8a42..4cf5fd4219 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/AuthenticatedViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/AuthenticatedViewBean.java @@ -24,6 +24,8 @@ * * $Id: AuthenticatedViewBean.java,v 1.2 2008/06/25 05:42:48 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.base; @@ -35,7 +37,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.base.model.AMModelBase; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * This view just display a message indicating that user has authenticated. diff --git a/openam-console/src/main/java/com/sun/identity/console/base/CloseWindowViewBean.java b/openam-console/src/main/java/com/sun/identity/console/base/CloseWindowViewBean.java index 827dce1650..f6cc6105c9 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/CloseWindowViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/CloseWindowViewBean.java @@ -24,6 +24,8 @@ * * $Id: CloseWindowViewBean.java,v 1.2 2008/06/25 05:42:48 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.base; @@ -34,7 +36,7 @@ import com.iplanet.jato.view.event.DisplayEvent; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.base.model.AMModelBase; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * This view just closes the browser window. diff --git a/openam-console/src/main/java/com/sun/identity/console/base/ConsoleServletBase.java b/openam-console/src/main/java/com/sun/identity/console/base/ConsoleServletBase.java index f02b54a472..0dd38e3430 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/ConsoleServletBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/ConsoleServletBase.java @@ -25,6 +25,7 @@ * $Id: ConsoleServletBase.java,v 1.7 2009/03/24 23:57:32 babysunil Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.base; @@ -46,8 +47,8 @@ import com.sun.identity.shared.debug.Debug; import java.io.IOException; import java.io.UnsupportedEncodingException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; import org.owasp.esapi.ESAPI; diff --git a/openam-console/src/main/java/com/sun/identity/console/base/DynamicRequestViewBean.java b/openam-console/src/main/java/com/sun/identity/console/base/DynamicRequestViewBean.java index 50c4debd10..c5e38bde80 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/DynamicRequestViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/DynamicRequestViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.base; @@ -20,7 +21,7 @@ import com.sun.identity.console.base.model.AMServiceProfileModel; import com.sun.identity.shared.datastruct.CollectionHelper; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.text.MessageFormat; import java.util.Map; import java.util.Set; diff --git a/openam-console/src/main/java/com/sun/identity/console/base/MessageViewBean.java b/openam-console/src/main/java/com/sun/identity/console/base/MessageViewBean.java index df2fd08581..34cdb09380 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/MessageViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/MessageViewBean.java @@ -24,6 +24,8 @@ * * $Id: MessageViewBean.java,v 1.2 2008/06/25 05:42:48 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.base; @@ -35,7 +37,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.base.model.AMModelBase; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * This view just display a message. diff --git a/openam-console/src/main/java/com/sun/identity/console/base/VersionViewBean.java b/openam-console/src/main/java/com/sun/identity/console/base/VersionViewBean.java index 2054494317..c7bbb7ae8b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/VersionViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/VersionViewBean.java @@ -24,6 +24,8 @@ * * $Id: VersionViewBean.java,v 1.2 2008/06/25 05:42:48 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ @@ -36,7 +38,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.base.model.AMModelBase; import com.sun.identity.console.base.model.AMSystemConfig; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * This class displays the version information page. The version information diff --git a/openam-console/src/main/java/com/sun/identity/console/base/model/AMAuthUtils.java b/openam-console/src/main/java/com/sun/identity/console/base/model/AMAuthUtils.java index c55776705c..bc733d5213 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/model/AMAuthUtils.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/model/AMAuthUtils.java @@ -24,6 +24,8 @@ * * $Id: AMAuthUtils.java,v 1.2 2008/06/25 05:42:49 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.base.model; @@ -33,7 +35,7 @@ import com.iplanet.sso.SSOTokenManager; import com.sun.identity.shared.Constants; import com.sun.identity.shared.debug.Debug; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * This class provides authentication related helper methods. diff --git a/openam-console/src/main/java/com/sun/identity/console/base/model/AMModelBase.java b/openam-console/src/main/java/com/sun/identity/console/base/model/AMModelBase.java index 46bd5bf54d..470ccebdec 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/model/AMModelBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/model/AMModelBase.java @@ -26,13 +26,14 @@ * * Portions Copyrighted 2011-2016 ForgeRock AS. * Portions Copyrighted 2022 Open Identity Platform Community + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.base.model; import static org.forgerock.openam.utils.Time.*; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; import java.security.AccessController; import java.text.Collator; diff --git a/openam-console/src/main/java/com/sun/identity/console/base/model/AMPropertySheetModel.java b/openam-console/src/main/java/com/sun/identity/console/base/model/AMPropertySheetModel.java index 49e479bae5..4328f5bdab 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/model/AMPropertySheetModel.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/model/AMPropertySheetModel.java @@ -27,6 +27,7 @@ /* * Portions Copyrighted 2011-2014 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.base.model; @@ -63,7 +64,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; diff --git a/openam-console/src/main/java/com/sun/identity/console/base/model/AMServiceProfileModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/base/model/AMServiceProfileModelImpl.java index e58a8255f6..fcc66c5e2d 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/model/AMServiceProfileModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/model/AMServiceProfileModelImpl.java @@ -24,6 +24,8 @@ * * $Id: AMServiceProfileModelImpl.java,v 1.3 2008/06/25 05:42:50 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.base.model; @@ -44,7 +46,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/base/model/AccessControlModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/base/model/AccessControlModelImpl.java index b02ca2af8f..9d25f0ed3a 100644 --- a/openam-console/src/main/java/com/sun/identity/console/base/model/AccessControlModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/base/model/AccessControlModelImpl.java @@ -24,6 +24,8 @@ * * $Id: AccessControlModelImpl.java,v 1.4 2008/06/25 05:42:50 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.base.model; @@ -42,7 +44,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/delegation/DelegationPropertiesViewBean.java b/openam-console/src/main/java/com/sun/identity/console/delegation/DelegationPropertiesViewBean.java index 008b631820..05966aff43 100644 --- a/openam-console/src/main/java/com/sun/identity/console/delegation/DelegationPropertiesViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/delegation/DelegationPropertiesViewBean.java @@ -24,6 +24,8 @@ * * $Id: DelegationPropertiesViewBean.java,v 1.2 2008/06/25 05:42:51 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.delegation; @@ -58,7 +60,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class DelegationPropertiesViewBean extends RealmPropertiesBase diff --git a/openam-console/src/main/java/com/sun/identity/console/delegation/DelegationViewBean.java b/openam-console/src/main/java/com/sun/identity/console/delegation/DelegationViewBean.java index b6a55e0fa7..4608c8c9ae 100644 --- a/openam-console/src/main/java/com/sun/identity/console/delegation/DelegationViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/delegation/DelegationViewBean.java @@ -24,6 +24,8 @@ * * $Id: DelegationViewBean.java,v 1.4 2009/08/11 18:17:09 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.delegation; @@ -58,7 +60,7 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class DelegationViewBean extends RealmPropertiesBase diff --git a/openam-console/src/main/java/com/sun/identity/console/delegation/model/DelegationConfig.java b/openam-console/src/main/java/com/sun/identity/console/delegation/model/DelegationConfig.java index 75481e6a0f..fa521d90eb 100644 --- a/openam-console/src/main/java/com/sun/identity/console/delegation/model/DelegationConfig.java +++ b/openam-console/src/main/java/com/sun/identity/console/delegation/model/DelegationConfig.java @@ -27,6 +27,7 @@ */ /** * Portions Copyrighted 2012 ForgeRock Inc + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.delegation.model; @@ -54,7 +55,7 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/delegation/model/DelegationModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/delegation/model/DelegationModelImpl.java index 5db48173bd..77d37b4343 100644 --- a/openam-console/src/main/java/com/sun/identity/console/delegation/model/DelegationModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/delegation/model/DelegationModelImpl.java @@ -24,6 +24,8 @@ * * $Id: DelegationModelImpl.java,v 1.3 2008/06/25 05:42:53 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.delegation.model; @@ -40,7 +42,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/CreateCOTViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/CreateCOTViewBean.java index c97bd13a58..d99d28a838 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/CreateCOTViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/CreateCOTViewBean.java @@ -24,6 +24,8 @@ * * $Id: CreateCOTViewBean.java,v 1.6 2009/08/21 20:09:23 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -65,7 +67,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class CreateCOTViewBean extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/CreateSAML2MetaDataViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/CreateSAML2MetaDataViewBean.java index 7928dd1b1b..a9992106d5 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/CreateSAML2MetaDataViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/CreateSAML2MetaDataViewBean.java @@ -24,6 +24,8 @@ * * $Id: CreateSAML2MetaDataViewBean.java,v 1.6 2008/12/02 22:20:13 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -56,7 +58,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class CreateSAML2MetaDataViewBean extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/FSAuthDomainsOpViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/federation/FSAuthDomainsOpViewBeanBase.java index abb132d039..a912854b10 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/FSAuthDomainsOpViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/FSAuthDomainsOpViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: FSAuthDomainsOpViewBeanBase.java,v 1.2 2008/06/25 05:49:34 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -39,7 +41,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class FSAuthDomainsOpViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSelectTrustedPartnerTypeViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSelectTrustedPartnerTypeViewBean.java index 1d3c700b0f..a49e6cd35b 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSelectTrustedPartnerTypeViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSelectTrustedPartnerTypeViewBean.java @@ -24,6 +24,8 @@ * * $Id: FSSAMLSelectTrustedPartnerTypeViewBean.java,v 1.2 2008/06/25 05:49:34 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -47,7 +49,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class FSSAMLSelectTrustedPartnerTypeViewBean extends AMPrimaryMastHeadViewBean { diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLServiceViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLServiceViewBean.java index 1b9e625f44..45654a8e10 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLServiceViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLServiceViewBean.java @@ -24,6 +24,8 @@ * * $Id: FSSAMLServiceViewBean.java,v 1.4 2008/06/25 05:49:34 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -63,7 +65,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class FSSAMLServiceViewBean extends AMPrimaryMastHeadViewBean { diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSetTrustedPartnerTypeViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSetTrustedPartnerTypeViewBean.java index 497efc4b13..cf10779d63 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSetTrustedPartnerTypeViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSetTrustedPartnerTypeViewBean.java @@ -24,6 +24,8 @@ * * $Id: FSSAMLSetTrustedPartnerTypeViewBean.java,v 1.2 2008/06/25 05:49:34 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -43,7 +45,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class FSSAMLSetTrustedPartnerTypeViewBean extends FSSAMLSelectTrustedPartnerTypeViewBean { diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSiteIDViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSiteIDViewBeanBase.java index 7403f9d311..9efd67b924 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSiteIDViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLSiteIDViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: FSSAMLSiteIDViewBeanBase.java,v 1.2 2008/06/25 05:49:35 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -45,7 +47,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class FSSAMLSiteIDViewBeanBase extends AMPrimaryMastHeadViewBean { diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLTargetURLsViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLTargetURLsViewBeanBase.java index e20059ff85..773e0a4f47 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLTargetURLsViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLTargetURLsViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: FSSAMLTargetURLsViewBeanBase.java,v 1.2 2008/06/25 05:49:35 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -45,7 +47,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.net.MalformedURLException; import java.net.URL; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class FSSAMLTargetURLsViewBeanBase extends AMPrimaryMastHeadViewBean { diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLTrustedPartnersViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLTrustedPartnersViewBeanBase.java index f064e32cef..f17bd42c03 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLTrustedPartnersViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/FSSAMLTrustedPartnersViewBeanBase.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted 2014 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.federation; @@ -60,7 +61,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class FSSAMLTrustedPartnersViewBeanBase extends AMPrimaryMastHeadViewBean { diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/FederationViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/FederationViewBean.java index c1acf856c7..0735842cd6 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/FederationViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/FederationViewBean.java @@ -26,6 +26,7 @@ * * Portions Copyrighted 2012-2016 ForgeRock AS. * Portions Copyrighted 2012 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.federation; @@ -73,7 +74,7 @@ import org.owasp.esapi.ESAPI; import org.owasp.esapi.Encoder; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class FederationViewBean extends AMPrimaryMastHeadViewBean { diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/FileUploaderViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/FileUploaderViewBean.java index 8cd4028b9e..d5fc0706d1 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/FileUploaderViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/FileUploaderViewBean.java @@ -24,6 +24,8 @@ * * $Id: FileUploaderViewBean.java,v 1.2 2008/06/25 05:49:36 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -37,7 +39,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.pagetitle.CCPageTitle; import com.sun.web.ui.view.masthead.CCSecondaryMasthead; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class FileUploaderViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/IDFFAffiliateViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/IDFFAffiliateViewBean.java index adb95bb913..d7658403b5 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/IDFFAffiliateViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/IDFFAffiliateViewBean.java @@ -24,6 +24,8 @@ * * $Id: IDFFAffiliateViewBean.java,v 1.4 2008/06/25 05:49:36 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -47,7 +49,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class IDFFAffiliateViewBean extends IDFFViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/IDFFIDPViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/IDFFIDPViewBean.java index 65c1053244..aa70229feb 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/IDFFIDPViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/IDFFIDPViewBean.java @@ -24,6 +24,8 @@ * * $Id: IDFFIDPViewBean.java,v 1.12 2008/10/24 00:11:56 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -48,7 +50,7 @@ import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class IDFFIDPViewBean extends IDFFViewBeanBase { diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/IDFFSPViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/IDFFSPViewBean.java index 79c9eb6f51..30ed5dadb2 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/IDFFSPViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/IDFFSPViewBean.java @@ -24,6 +24,8 @@ * * $Id: IDFFSPViewBean.java,v 1.12 2008/10/24 00:11:59 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -48,7 +50,7 @@ import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class IDFFSPViewBean extends IDFFViewBeanBase { diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/IDFFViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/federation/IDFFViewBeanBase.java index c2c4fdf4c7..525a7144a9 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/IDFFViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/IDFFViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: IDFFViewBeanBase.java,v 1.5 2008/06/25 05:49:36 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -56,7 +58,7 @@ import java.util.ArrayList; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class IDFFViewBeanBase extends EntityPropertiesBase diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/ImportEntityViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/ImportEntityViewBean.java index 7a5f3d5593..838dbe6bd9 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/ImportEntityViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/ImportEntityViewBean.java @@ -24,6 +24,8 @@ * * $Id: ImportEntityViewBean.java,v 1.7 2009/08/21 20:09:23 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -54,7 +56,7 @@ import java.util.Map; import java.util.Set; import java.util.Collections; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ImportEntityViewBean extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AffiliateViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AffiliateViewBean.java index d013c01d1f..4a0be4c59c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AffiliateViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AffiliateViewBean.java @@ -24,6 +24,8 @@ * * $Id: SAMLv2AffiliateViewBean.java,v 1.3 2008/08/12 17:15:21 babysunil Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -37,7 +39,7 @@ import com.sun.web.ui.model.CCAddRemoveModel; import com.sun.web.ui.view.addremove.CCAddRemove; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.console.base.AMPropertySheet; import com.sun.identity.console.base.model.AMConsoleException; import java.util.Map; diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AttrAuthorityViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AttrAuthorityViewBean.java index 0202b23b40..b34411affa 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AttrAuthorityViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AttrAuthorityViewBean.java @@ -24,6 +24,8 @@ * * $Id: SAMLv2AttrAuthorityViewBean.java,v 1.3 2008/06/25 05:49:37 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -36,7 +38,7 @@ import com.sun.identity.console.base.model.AMPropertySheetModel; import com.sun.identity.console.federation.model.SAMLv2Model; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.console.base.model.AMConsoleException; import java.util.Map; import java.util.HashMap; diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AttrQueryViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AttrQueryViewBean.java index c3908f7f4b..94f688d3d2 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AttrQueryViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AttrQueryViewBean.java @@ -24,6 +24,8 @@ * * $Id: SAMLv2AttrQueryViewBean.java,v 1.3 2008/06/25 05:49:37 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -35,7 +37,7 @@ import com.sun.identity.console.base.model.AMPropertySheetModel; import com.sun.identity.console.federation.model.SAMLv2Model; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.console.base.AMPropertySheet; import com.sun.identity.console.base.model.AMConsoleException; import java.util.Map; diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AuthnAuthorityViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AuthnAuthorityViewBean.java index 60749d9800..cd79e3b2f0 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AuthnAuthorityViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2AuthnAuthorityViewBean.java @@ -24,6 +24,8 @@ * * $Id: SAMLv2AuthnAuthorityViewBean.java,v 1.3 2008/06/25 05:49:37 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -36,7 +38,7 @@ import com.sun.identity.console.base.model.AMPropertySheetModel; import com.sun.identity.console.federation.model.SAMLv2Model; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.console.base.model.AMConsoleException; import java.util.Map; import java.util.HashMap; diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2Base.java b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2Base.java index 60559dc199..2b1f509689 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2Base.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2Base.java @@ -25,6 +25,7 @@ * $Id: SAMLv2Base.java,v 1.8 2008/06/25 05:49:37 qcheng Exp $ * * Portions Copyrighted 2014-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.federation; @@ -44,7 +45,7 @@ import java.util.Collections; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class SAMLv2Base extends EntityPropertiesBase { protected static final String PROPERTIES = "propertyAttributes"; diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2GeneralViewBean.java b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2GeneralViewBean.java index 93e0dbc382..27cbd7904e 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2GeneralViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/SAMLv2GeneralViewBean.java @@ -24,6 +24,8 @@ * * $Id: SAMLv2GeneralViewBean.java,v 1.3 2008/06/25 05:49:37 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -35,7 +37,7 @@ import com.sun.identity.console.base.model.AMPropertySheetModel; import com.sun.identity.console.federation.model.SAMLv2Model; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class SAMLv2GeneralViewBean extends SAMLv2Base { diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/WSFedGeneralBase.java b/openam-console/src/main/java/com/sun/identity/console/federation/WSFedGeneralBase.java index 465471794c..a018b9dd45 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/WSFedGeneralBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/WSFedGeneralBase.java @@ -24,6 +24,8 @@ * * $Id: WSFedGeneralBase.java,v 1.6 2008/06/25 05:49:38 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation; @@ -34,7 +36,7 @@ import com.sun.identity.console.federation.model.EntityModel; import com.sun.identity.console.federation.model.WSFedPropertiesModel; import com.sun.identity.console.federation.model.WSFedPropertiesModelImpl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.List; import java.util.Set; import java.util.HashSet; diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/model/CreateMetaDataModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/federation/model/CreateMetaDataModelImpl.java index 0451300bdf..a52c054667 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/model/CreateMetaDataModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/model/CreateMetaDataModelImpl.java @@ -25,6 +25,7 @@ * $Id: CreateMetaDataModelImpl.java,v 1.7 2010/01/06 23:11:25 veiming Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.federation.model; @@ -58,7 +59,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import javax.xml.bind.JAXBException; public class CreateMetaDataModelImpl extends AMModelBase diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/model/EntityModel.java b/openam-console/src/main/java/com/sun/identity/console/federation/model/EntityModel.java index 0b92f12145..79116a7123 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/model/EntityModel.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/model/EntityModel.java @@ -24,6 +24,8 @@ * * $Id: EntityModel.java,v 1.10 2008/06/25 05:49:39 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation.model; @@ -33,7 +35,7 @@ import java.util.Set; import java.util.Map; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/model/EntityModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/federation/model/EntityModelImpl.java index 71839fbd89..130edaf882 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/model/EntityModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/model/EntityModelImpl.java @@ -24,6 +24,8 @@ * * $Id: EntityModelImpl.java,v 1.20 2009/12/25 09:13:22 babysunil Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation.model; @@ -38,7 +40,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.federation.meta.IDFFMetaManager; import com.sun.identity.federation.meta.IDFFMetaException; diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/model/FSAuthDomainsModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/federation/model/FSAuthDomainsModelImpl.java index 673144bc4e..319f0cb1f9 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/model/FSAuthDomainsModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/model/FSAuthDomainsModelImpl.java @@ -24,6 +24,8 @@ * * $Id: FSAuthDomainsModelImpl.java,v 1.12 2009/11/10 01:19:49 exu Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation.model; @@ -50,7 +52,7 @@ import java.util.Map; import java.util.Set; import java.util.StringTokenizer; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class FSAuthDomainsModelImpl extends AMModelBase implements FSAuthDomainsModel diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/model/FSSAMLServiceModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/federation/model/FSSAMLServiceModelImpl.java index 2ed2f890b5..2a2f4ae53e 100755 --- a/openam-console/src/main/java/com/sun/identity/console/federation/model/FSSAMLServiceModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/model/FSSAMLServiceModelImpl.java @@ -24,6 +24,8 @@ * * $Id: FSSAMLServiceModelImpl.java,v 1.3 2008/06/25 05:49:40 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation.model; @@ -45,7 +47,7 @@ import java.util.Map; import java.util.ResourceBundle; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/model/IDFFModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/federation/model/IDFFModelImpl.java index 7e54a84475..aed9d1df8c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/model/IDFFModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/model/IDFFModelImpl.java @@ -24,6 +24,8 @@ * * $Id: IDFFModelImpl.java,v 1.9 2009/11/10 01:19:49 exu Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.federation.model; @@ -58,7 +60,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import javax.xml.bind.JAXBException; public class IDFFModelImpl diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/model/ImportEntityModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/federation/model/ImportEntityModelImpl.java index 9e50b23102..378a2519f2 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/model/ImportEntityModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/model/ImportEntityModelImpl.java @@ -25,6 +25,7 @@ * $Id: ImportEntityModelImpl.java,v 1.11 2009/11/10 01:19:49 exu Exp $ * * Portions Copyrighted 2012-2014 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.federation.model; @@ -46,7 +47,7 @@ import java.util.List; import java.util.Map; import javax.xml.bind.JAXBException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.w3c.dom.Document; import com.sun.identity.wsfederation.meta.WSFederationMetaManager; diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/model/SAMLv2ModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/federation/model/SAMLv2ModelImpl.java index 83140227e1..91d74539f1 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/model/SAMLv2ModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/model/SAMLv2ModelImpl.java @@ -26,13 +26,14 @@ * * Portions Copyrighted 2010-2015 ForgeRock AS. * Portions Copyrighted 2015 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.federation.model; import com.sun.identity.console.base.model.AMAdminUtils; import com.sun.identity.console.base.model.AMConsoleException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.saml2.common.SAML2Constants; import com.sun.identity.saml2.jaxb.metadata.EntityDescriptorElement; diff --git a/openam-console/src/main/java/com/sun/identity/console/federation/model/WSFedPropertiesModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/federation/model/WSFedPropertiesModelImpl.java index 6eacfbf4f5..3286b8206f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/federation/model/WSFedPropertiesModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/federation/model/WSFedPropertiesModelImpl.java @@ -25,6 +25,7 @@ * $Id: WSFedPropertiesModelImpl.java,v 1.14 2009/11/10 01:19:50 exu Exp $ * * Portions copyright 2012-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ @@ -50,7 +51,7 @@ import com.sun.identity.wsfederation.jaxb.entityconfig.ObjectFactory; import java.util.Set; import javax.xml.bind.JAXBException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/EndUserViewBean.java b/openam-console/src/main/java/com/sun/identity/console/idm/EndUserViewBean.java index 9ccfe54011..26c4925513 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/EndUserViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/EndUserViewBean.java @@ -24,6 +24,8 @@ * * $Id: EndUserViewBean.java,v 1.4 2008/09/04 23:59:36 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.idm; @@ -42,7 +44,7 @@ import com.sun.identity.idm.IdUtils; import com.sun.web.ui.model.CCPageTitleModel; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class EndUserViewBean extends EntityEditViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/EntitiesViewBean.java b/openam-console/src/main/java/com/sun/identity/console/idm/EntitiesViewBean.java index c6ee4274f1..9630afb329 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/EntitiesViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/EntitiesViewBean.java @@ -25,6 +25,7 @@ * $Id: EntitiesViewBean.java,v 1.14 2009/12/11 23:25:19 veiming Exp $ * * Portions Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.idm; @@ -70,7 +71,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class EntitiesViewBean extends RealmPropertiesBase diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/EntityEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/idm/EntityEditViewBean.java index 140c4fe8d3..8ca165b670 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/EntityEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/EntityEditViewBean.java @@ -25,6 +25,7 @@ * $Id: EntityEditViewBean.java,v 1.11 2009/01/28 05:34:57 ww203982 Exp $ * * Portions Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.idm; @@ -60,7 +61,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class EntityEditViewBean extends EntityOpViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/EntityOpViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/idm/EntityOpViewBeanBase.java index f30238f75c..cbc4569d83 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/EntityOpViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/EntityOpViewBeanBase.java @@ -25,6 +25,7 @@ * $Id: EntityOpViewBeanBase.java,v 1.4 2008/09/04 23:59:37 veiming Exp $ * * Portions Copyrighted 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.idm; @@ -52,7 +53,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.tabs.CCTabs; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.openam.security.whitelist.ValidGotoUrlExtractor; import org.forgerock.openam.shared.security.whitelist.RedirectUrlValidator; diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/EntityResourceOfferingViewBean.java b/openam-console/src/main/java/com/sun/identity/console/idm/EntityResourceOfferingViewBean.java index 2dd914379b..ca05b0cb35 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/EntityResourceOfferingViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/EntityResourceOfferingViewBean.java @@ -24,6 +24,8 @@ * * $Id: EntityResourceOfferingViewBean.java,v 1.2 2008/06/25 05:49:41 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.idm; @@ -49,7 +51,7 @@ import com.sun.web.ui.view.table.CCActionTable; import java.text.MessageFormat; import java.util.Iterator; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class EntityResourceOfferingViewBean extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/EntityResourceOfferingViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/idm/EntityResourceOfferingViewBeanBase.java index 085b7d8fd8..cdc44e5df4 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/EntityResourceOfferingViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/EntityResourceOfferingViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: EntityResourceOfferingViewBeanBase.java,v 1.2 2008/06/25 05:49:41 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.idm; @@ -41,7 +43,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.alert.CCAlert; import java.io.InputStream; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class EntityResourceOfferingViewBeanBase extends SMDiscoveryBootstrapRefOffViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/EntityServicesViewBean.java b/openam-console/src/main/java/com/sun/identity/console/idm/EntityServicesViewBean.java index b23096e1a7..7a9b07f26f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/EntityServicesViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/EntityServicesViewBean.java @@ -24,6 +24,8 @@ * * $Id: EntityServicesViewBean.java,v 1.7 2009/12/01 20:42:42 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.idm; @@ -54,7 +56,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; public class EntityServicesViewBean extends EntityEditViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/HomeViewBean.java b/openam-console/src/main/java/com/sun/identity/console/idm/HomeViewBean.java index 6154d1d7d4..c116ca6098 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/HomeViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/HomeViewBean.java @@ -24,6 +24,8 @@ * * $Id: HomeViewBean.java,v 1.2 2008/06/25 05:42:59 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.idm; @@ -40,7 +42,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import com.sun.web.ui.model.CCPageTitleModel; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class HomeViewBean extends RealmPropertiesBase diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/ServiceViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/idm/ServiceViewBeanBase.java index 8db4feccbb..fac8b95dd3 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/ServiceViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/ServiceViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: ServiceViewBeanBase.java,v 1.3 2008/06/25 05:42:59 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.idm; @@ -51,7 +53,7 @@ import java.io.IOException; import java.util.Collections; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class ServiceViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/ServicesEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/idm/ServicesEditViewBean.java index 11d7cbdb69..eb36cdb130 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/ServicesEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/ServicesEditViewBean.java @@ -24,6 +24,8 @@ * * $Id: ServicesEditViewBean.java,v 1.3 2008/06/25 05:42:59 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.idm; @@ -41,7 +43,7 @@ import com.sun.web.ui.view.alert.CCAlert; import java.text.MessageFormat; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ServicesEditViewBean extends ServiceViewBeanBase { diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/ServicesSelectViewBean.java b/openam-console/src/main/java/com/sun/identity/console/idm/ServicesSelectViewBean.java index 7b9418ba65..a9462e4448 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/ServicesSelectViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/ServicesSelectViewBean.java @@ -24,6 +24,8 @@ * * $Id: ServicesSelectViewBean.java,v 1.4 2009/03/16 18:28:45 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.idm; @@ -54,8 +56,8 @@ import java.util.Collections; import java.util.Iterator; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; public class ServicesSelectViewBean extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/model/EntitiesModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/idm/model/EntitiesModelImpl.java index 95c8a02e55..3e8e375e72 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/model/EntitiesModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/model/EntitiesModelImpl.java @@ -25,7 +25,7 @@ * $Id: EntitiesModelImpl.java,v 1.17 2009/09/05 01:30:46 veiming Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. - * Portions Copyrighted 2022 Open Identity Platform Community + * Portions Copyrighted 2022-2025 3A Systems LLC. */ package com.sun.identity.console.idm.model; @@ -79,7 +79,7 @@ import java.util.ResourceBundle; import java.util.Set; import java.util.StringTokenizer; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/idm/model/EntityResourceOfferingModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/idm/model/EntityResourceOfferingModelImpl.java index 8acdb13990..b6adde7df0 100644 --- a/openam-console/src/main/java/com/sun/identity/console/idm/model/EntityResourceOfferingModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/idm/model/EntityResourceOfferingModelImpl.java @@ -24,6 +24,8 @@ * * $Id: EntityResourceOfferingModelImpl.java,v 1.2 2008/06/25 05:49:41 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.idm.model; @@ -41,7 +43,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/ActionSchemaGUI.java b/openam-console/src/main/java/com/sun/identity/console/policy/ActionSchemaGUI.java index da0245a8c6..db47a0930f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/ActionSchemaGUI.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/ActionSchemaGUI.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.policy; @@ -39,9 +40,9 @@ import com.sun.identity.policy.ActionSchema; import com.sun.web.ui.common.CCTagClass; import com.sun.web.ui.taglib.common.CCTagBase; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.PageContext; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.PageContext; public class ActionSchemaGUI { private static ActionSchemaGUI instance = new ActionSchemaGUI(); diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/ConditionOpViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/policy/ConditionOpViewBeanBase.java index f46eeaa2e7..4638546f7c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/ConditionOpViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/ConditionOpViewBeanBase.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted 2011 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.policy; @@ -58,7 +59,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class ConditionOpViewBeanBase extends ProfileViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/ConditionProxyViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/ConditionProxyViewBean.java index 7916ec8917..1da3c9b3db 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/ConditionProxyViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/ConditionProxyViewBean.java @@ -24,6 +24,8 @@ * * $Id: ConditionProxyViewBean.java,v 1.2 2008/06/25 05:43:02 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -33,7 +35,7 @@ import com.sun.identity.console.base.AMViewBeanBase; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.policy.model.PolicyModelImpl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ConditionProxyViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/IdentityMembershipConditionAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/IdentityMembershipConditionAddViewBean.java index 524ba3e44c..5c3149d475 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/IdentityMembershipConditionAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/IdentityMembershipConditionAddViewBean.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.policy; @@ -49,7 +50,7 @@ import java.util.Collections; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Default implementation of Identity Member Condition Add View Bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/IdentityMembershipConditionEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/IdentityMembershipConditionEditViewBean.java index be48e8851b..0e4d490fd1 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/IdentityMembershipConditionEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/IdentityMembershipConditionEditViewBean.java @@ -24,6 +24,8 @@ * * $Id: IdentityMembershipConditionEditViewBean.java,v 1.2 2008/06/25 05:43:02 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -48,7 +50,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Default implementation of Identity Member Condition Edit View Bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectAddViewBean.java index c094789869..703ac5e3c5 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectAddViewBean.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.policy; @@ -59,7 +60,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class IdentitySubjectAddViewBean extends SubjectAddViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectEditViewBean.java index 53054fb34e..811404c05f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectEditViewBean.java @@ -24,6 +24,8 @@ * * $Id: IdentitySubjectEditViewBean.java,v 1.2 2008/06/25 05:43:02 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -57,7 +59,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class IdentitySubjectEditViewBean extends SubjectEditViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectViewBean.java index 2adbb43a8d..dc42791a12 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/IdentitySubjectViewBean.java @@ -24,13 +24,15 @@ * * $Id: IdentitySubjectViewBean.java,v 1.2 2008/06/25 05:43:02 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; import com.iplanet.jato.view.event.RequestInvocationEvent; import com.sun.identity.console.base.model.AMAdminConstants; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class IdentitySubjectViewBean extends PolicySubjectPluginViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/PMAuthenticatedUsersSubjectViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/PMAuthenticatedUsersSubjectViewBean.java index bc474fc29a..e97a7720a0 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/PMAuthenticatedUsersSubjectViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/PMAuthenticatedUsersSubjectViewBean.java @@ -24,13 +24,15 @@ * * $Id: PMAuthenticatedUsersSubjectViewBean.java,v 1.2 2008/06/25 05:43:02 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; import com.iplanet.jato.view.event.RequestInvocationEvent; import com.sun.identity.console.base.model.AMAdminConstants; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class PMAuthenticatedUsersSubjectViewBean extends PolicySubjectPluginViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/PMDefaultTimeConditionAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/PMDefaultTimeConditionAddViewBean.java index b5ce0fcde2..1939cd2088 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/PMDefaultTimeConditionAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/PMDefaultTimeConditionAddViewBean.java @@ -24,6 +24,8 @@ * * $Id: PMDefaultTimeConditionAddViewBean.java,v 1.2 2008/06/25 05:43:03 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -35,7 +37,7 @@ import com.sun.identity.console.policy.model.PolicyModel; import com.sun.identity.console.policy.model.TimePolicyModelImpl; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class PMDefaultTimeConditionAddViewBean extends ConditionAddViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/PMDefaultTimeConditionEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/PMDefaultTimeConditionEditViewBean.java index bde42bf555..aea22ed09c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/PMDefaultTimeConditionEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/PMDefaultTimeConditionEditViewBean.java @@ -24,6 +24,8 @@ * * $Id: PMDefaultTimeConditionEditViewBean.java,v 1.2 2008/06/25 05:43:03 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -43,7 +45,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class PMDefaultTimeConditionEditViewBean extends ConditionEditViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/PolicyConditionPluginViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/policy/PolicyConditionPluginViewBeanBase.java index ca01366fa1..ff5bdd9bf1 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/PolicyConditionPluginViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/PolicyConditionPluginViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: PolicyConditionPluginViewBeanBase.java,v 1.2 2008/06/25 05:43:03 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -35,7 +37,7 @@ import com.sun.identity.console.base.model.AMAdminConstants; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.policy.model.PolicyModelImpl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class PolicyConditionPluginViewBeanBase extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/PolicySelectTypeViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/PolicySelectTypeViewBean.java index cbf5b64036..0b5b6ef72f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/PolicySelectTypeViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/PolicySelectTypeViewBean.java @@ -24,6 +24,8 @@ * * $Id: PolicySelectTypeViewBean.java,v 1.2 2008/06/25 05:43:04 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -44,7 +46,7 @@ import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.html.CCTextField; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class PolicySelectTypeViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/PolicySubjectPluginViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/policy/PolicySubjectPluginViewBeanBase.java index acdda2fde9..8594899a6b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/PolicySubjectPluginViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/PolicySubjectPluginViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: PolicySubjectPluginViewBeanBase.java,v 1.2 2008/06/25 05:43:04 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -35,7 +37,7 @@ import com.sun.identity.console.base.model.AMAdminConstants; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.policy.model.PolicyModelImpl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class PolicySubjectPluginViewBeanBase extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/PolicyViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/PolicyViewBean.java index 5b5e65d7b6..cd4e8a4107 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/PolicyViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/PolicyViewBean.java @@ -29,6 +29,7 @@ /* * Portions Copyrighted 2012 ForgeRock Inc * Portions Copyrighted 2012 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.policy; @@ -62,7 +63,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class PolicyViewBean extends RealmPropertiesBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/ProfileViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/policy/ProfileViewBeanBase.java index 14c45e40cf..57f61ff1ca 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/ProfileViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/ProfileViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: ProfileViewBeanBase.java,v 1.2 2008/06/25 05:43:04 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -36,7 +38,7 @@ import com.sun.identity.console.policy.model.PolicyCache; import com.sun.identity.console.policy.model.PolicyModel; import com.sun.identity.console.policy.model.PolicyModelImpl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class ProfileViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/ReferralProxyViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/ReferralProxyViewBean.java index 02903171c4..6d67c964c1 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/ReferralProxyViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/ReferralProxyViewBean.java @@ -24,6 +24,8 @@ * * $Id: ReferralProxyViewBean.java,v 1.2 2008/06/25 05:43:04 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -33,7 +35,7 @@ import com.sun.identity.console.base.AMViewBeanBase; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.policy.model.PolicyModelImpl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ReferralProxyViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderOpViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderOpViewBeanBase.java index 66ed16ca4a..fc6840d6bd 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderOpViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderOpViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: ResponseProviderOpViewBeanBase.java,v 1.2 2008/06/25 05:43:04 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -49,7 +51,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class ResponseProviderOpViewBeanBase extends ProfileViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderPluginViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderPluginViewBeanBase.java index b22021ec78..9f73b7bb5a 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderPluginViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderPluginViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: ResponseProviderPluginViewBeanBase.java,v 1.2 2008/06/25 05:43:04 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -35,7 +37,7 @@ import com.sun.identity.console.base.model.AMAdminConstants; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.policy.model.PolicyModelImpl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ResponseProviderPluginViewBeanBase extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderProxyViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderProxyViewBean.java index 5afa78644d..f3eb496c25 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderProxyViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/ResponseProviderProxyViewBean.java @@ -24,6 +24,8 @@ * * $Id: ResponseProviderProxyViewBean.java,v 1.2 2008/06/25 05:43:05 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -33,7 +35,7 @@ import com.sun.identity.console.base.AMViewBeanBase; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.policy.model.PolicyModelImpl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ResponseProviderProxyViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/RuleOpViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/policy/RuleOpViewBeanBase.java index c4530fc428..9e520bfde2 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/RuleOpViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/RuleOpViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: RuleOpViewBeanBase.java,v 1.2 2008/06/25 05:43:05 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -61,7 +63,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class RuleOpViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/SelectRealmViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/SelectRealmViewBean.java index d13f3131d9..eea9672f2b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/SelectRealmViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/SelectRealmViewBean.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.policy; @@ -57,7 +58,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * This appears in a popup window, user can search for realms; select one of diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/SelectTypeViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/policy/SelectTypeViewBeanBase.java index a8420c5e95..5334663724 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/SelectTypeViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/SelectTypeViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: SelectTypeViewBeanBase.java,v 1.2 2008/06/25 05:43:05 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -46,7 +48,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.html.CCRadioButton; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class SelectTypeViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/SessionPropertyOpViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/policy/SessionPropertyOpViewBeanBase.java index 68a3b09c31..99fecde4a0 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/SessionPropertyOpViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/SessionPropertyOpViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: SessionPropertyOpViewBeanBase.java,v 1.2 2008/06/25 05:43:06 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -45,7 +47,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class SessionPropertyOpViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/SubjectProxyViewBean.java b/openam-console/src/main/java/com/sun/identity/console/policy/SubjectProxyViewBean.java index b8cdcf3d34..b3a43b758a 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/SubjectProxyViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/SubjectProxyViewBean.java @@ -24,6 +24,8 @@ * * $Id: SubjectProxyViewBean.java,v 1.2 2008/06/25 05:43:06 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy; @@ -33,7 +35,7 @@ import com.sun.identity.console.base.AMViewBeanBase; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.policy.model.PolicyModelImpl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class SubjectProxyViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/model/IdentitySubjectModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/policy/model/IdentitySubjectModelImpl.java index b8752a8456..be18d6861e 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/model/IdentitySubjectModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/model/IdentitySubjectModelImpl.java @@ -24,6 +24,8 @@ * * $Id: IdentitySubjectModelImpl.java,v 1.2 2008/06/25 05:43:07 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy.model; @@ -37,7 +39,7 @@ import com.sun.identity.idm.IdType; import com.sun.identity.idm.IdUtils; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/model/PolicyModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/policy/model/PolicyModelImpl.java index 6f562f0a4b..990a0efabd 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/model/PolicyModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/model/PolicyModelImpl.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.policy.model; @@ -87,7 +88,7 @@ import java.util.Map; import java.util.ResourceBundle; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/model/SelectRealmModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/policy/model/SelectRealmModelImpl.java index c97b3f0b49..7db031b97e 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/model/SelectRealmModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/model/SelectRealmModelImpl.java @@ -24,6 +24,8 @@ * * $Id: SelectRealmModelImpl.java,v 1.2 2008/06/25 05:43:08 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy.model; @@ -40,7 +42,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * This implements SelectRealmModel where searching of realms diff --git a/openam-console/src/main/java/com/sun/identity/console/policy/model/TimePolicyModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/policy/model/TimePolicyModelImpl.java index d2e8f4d0e0..a39c5db214 100644 --- a/openam-console/src/main/java/com/sun/identity/console/policy/model/TimePolicyModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/policy/model/TimePolicyModelImpl.java @@ -24,6 +24,8 @@ * * $Id: TimePolicyModelImpl.java,v 1.3 2008/06/25 05:43:08 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.policy.model; @@ -31,7 +33,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/HomePageViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/HomePageViewBean.java index c9ddb684be..d4aae0c883 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/HomePageViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/HomePageViewBean.java @@ -24,6 +24,8 @@ * * $Id: HomePageViewBean.java,v 1.2 2008/06/25 05:43:11 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -35,7 +37,7 @@ import com.sun.identity.console.realm.model.RMRealmModelImpl; import com.sun.web.ui.view.pagetitle.CCPageTitle; import com.sun.web.ui.model.CCPageTitleModel; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class HomePageViewBean extends RMRealmViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoAddViewBean.java index c33a0810d4..2d6eb76857 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoAddViewBean.java @@ -24,6 +24,8 @@ * * $Id: IDRepoAddViewBean.java,v 1.3 2009/11/19 23:45:59 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -45,7 +47,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; public class IDRepoAddViewBean extends IDRepoOpViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoEditViewBean.java index ea988f9364..f5fa224ad1 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoEditViewBean.java @@ -24,6 +24,8 @@ * * $Id: IDRepoEditViewBean.java,v 1.4 2009/11/19 23:45:59 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -46,7 +48,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; public class IDRepoEditViewBean extends IDRepoOpViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoOpViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoOpViewBeanBase.java index 9b9ee69bdb..865596dbd7 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoOpViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoOpViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: IDRepoOpViewBeanBase.java,v 1.2 2008/06/25 05:43:11 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -44,7 +46,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.alert.CCAlert; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class IDRepoOpViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoSelectTypeViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoSelectTypeViewBean.java index facb0550c8..93cfa315cf 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoSelectTypeViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoSelectTypeViewBean.java @@ -24,6 +24,8 @@ * * $Id: IDRepoSelectTypeViewBean.java,v 1.2 2008/06/25 05:43:11 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -46,7 +48,7 @@ import com.sun.web.ui.view.html.CCRadioButton; import com.sun.web.ui.view.html.CCTextField; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class IDRepoSelectTypeViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoViewBean.java index d1a0735b25..0e3930fd60 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/IDRepoViewBean.java @@ -24,6 +24,8 @@ * * $Id: IDRepoViewBean.java,v 1.3 2008/07/07 20:39:20 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -54,7 +56,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class IDRepoViewBean extends RealmPropertiesBase diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/RMRealmOpViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/realm/RMRealmOpViewBeanBase.java index 2154938a45..54ccf84aa3 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/RMRealmOpViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/RMRealmOpViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: RMRealmOpViewBeanBase.java,v 1.2 2008/06/25 05:43:11 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -34,7 +36,7 @@ import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.realm.model.RMRealmModelImpl; import com.sun.web.ui.model.CCPageTitleModel; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class RMRealmOpViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/RMRealmViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/RMRealmViewBean.java index b0bcf4663c..e2255375c2 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/RMRealmViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/RMRealmViewBean.java @@ -25,12 +25,13 @@ * $Id: RMRealmViewBean.java,v 1.3 2008/07/07 20:39:20 veiming Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.realm; import static com.sun.identity.console.XuiRedirectHelper.*; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/RealmPropertiesViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/RealmPropertiesViewBean.java index 11253be807..5d119698db 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/RealmPropertiesViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/RealmPropertiesViewBean.java @@ -25,6 +25,7 @@ * $Id: RealmPropertiesViewBean.java,v 1.2 2008/06/25 05:43:12 qcheng Exp $ * * Portions Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.realm; @@ -50,7 +51,7 @@ import java.text.MessageFormat; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.http.util.Uris; diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/RealmResourceOfferingViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/RealmResourceOfferingViewBean.java index cfac336f1e..d1b91d9d25 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/RealmResourceOfferingViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/RealmResourceOfferingViewBean.java @@ -24,6 +24,8 @@ * * $Id: RealmResourceOfferingViewBean.java,v 1.2 2008/06/25 05:49:43 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -48,7 +50,7 @@ import com.sun.web.ui.view.table.CCActionTable; import java.text.MessageFormat; import java.util.Iterator; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class RealmResourceOfferingViewBean extends RMRealmViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/RealmResourceOfferingViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/realm/RealmResourceOfferingViewBeanBase.java index 21bfb14aa4..efeb1e7145 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/RealmResourceOfferingViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/RealmResourceOfferingViewBeanBase.java @@ -24,6 +24,8 @@ * * $Id: RealmResourceOfferingViewBeanBase.java,v 1.2 2008/06/25 05:49:43 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -41,7 +43,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.alert.CCAlert; import java.io.InputStream; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class RealmResourceOfferingViewBeanBase extends SMDiscoveryBootstrapRefOffViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesAddViewBean.java index 10372a8117..9b9d462050 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesAddViewBean.java @@ -24,6 +24,8 @@ * * $Id: ServicesAddViewBean.java,v 1.2 2008/06/25 05:43:12 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -45,7 +47,7 @@ import java.text.MessageFormat; import java.util.Collections; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ServicesAddViewBean extends AMServiceProfileViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesCannotAssignServiceViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesCannotAssignServiceViewBean.java index 669ad702c6..4982789e7f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesCannotAssignServiceViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesCannotAssignServiceViewBean.java @@ -24,6 +24,8 @@ * * $Id: ServicesCannotAssignServiceViewBean.java,v 1.2 2008/06/25 05:43:12 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -39,7 +41,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ServicesCannotAssignServiceViewBean extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesEditViewBean.java index 0634fdc1f2..98174ef53c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesEditViewBean.java @@ -24,6 +24,8 @@ * * $Id: ServicesEditViewBean.java,v 1.2 2008/06/25 05:43:12 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -44,7 +46,7 @@ import com.sun.web.ui.view.alert.CCAlert; import java.text.MessageFormat; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ServicesEditViewBean extends AMServiceProfileViewBeanBase { diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesNoAttributeViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesNoAttributeViewBean.java index 19ed3431d6..65504f546e 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesNoAttributeViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesNoAttributeViewBean.java @@ -24,6 +24,8 @@ * * $Id: ServicesNoAttributeViewBean.java,v 1.2 2008/06/25 05:43:12 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -40,7 +42,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class ServicesNoAttributeViewBean extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesSelectViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesSelectViewBean.java index 1c655758ab..4c2803cb87 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesSelectViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesSelectViewBean.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.realm; @@ -55,8 +56,8 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; public class ServicesSelectViewBean extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesViewBean.java b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesViewBean.java index 865ee18379..7e6b2fcd95 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/ServicesViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/ServicesViewBean.java @@ -24,6 +24,8 @@ * * $Id: ServicesViewBean.java,v 1.2 2008/06/25 05:43:12 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm; @@ -60,8 +62,8 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import static com.sun.identity.console.XuiRedirectHelper.*; diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/model/IDRepoModel.java b/openam-console/src/main/java/com/sun/identity/console/realm/model/IDRepoModel.java index f96377c6da..46d2b69a70 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/model/IDRepoModel.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/model/IDRepoModel.java @@ -24,6 +24,8 @@ * * $Id: IDRepoModel.java,v 1.3 2009/11/19 23:46:00 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm.model; @@ -33,7 +35,7 @@ import com.sun.identity.console.base.model.AMConsoleException; import java.util.Map; import java.util.Set; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/model/IDRepoModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/realm/model/IDRepoModelImpl.java index 75706a967b..af8d5bf83d 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/model/IDRepoModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/model/IDRepoModelImpl.java @@ -27,7 +27,8 @@ */ /* - * Portions Copyrighted 2011 ForgeRock AS + * Portions Copyrighted 2011 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.realm.model; @@ -61,8 +62,8 @@ import java.util.Map; import java.util.ResourceBundle; import java.util.Set; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/model/RMRealmModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/realm/model/RMRealmModelImpl.java index 6868aa6a86..8320a6b183 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/model/RMRealmModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/model/RMRealmModelImpl.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.realm.model; @@ -54,7 +55,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/model/RealmResourceOfferingModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/realm/model/RealmResourceOfferingModelImpl.java index f8842f1548..e09e473477 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/model/RealmResourceOfferingModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/model/RealmResourceOfferingModelImpl.java @@ -24,6 +24,8 @@ * * $Id: RealmResourceOfferingModelImpl.java,v 1.2 2008/06/25 05:49:43 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.realm.model; @@ -42,7 +44,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/model/ServicesModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/realm/model/ServicesModelImpl.java index 2d45d36a9b..a40d8793c2 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/model/ServicesModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/model/ServicesModelImpl.java @@ -25,6 +25,7 @@ * $Id: ServicesModelImpl.java,v 1.3 2008/08/15 19:41:31 veiming Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.realm.model; @@ -51,7 +52,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/realm/model/ServicesProfileModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/realm/model/ServicesProfileModelImpl.java index 9605a33a8e..27b3dc7972 100644 --- a/openam-console/src/main/java/com/sun/identity/console/realm/model/ServicesProfileModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/realm/model/ServicesProfileModelImpl.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.realm.model; @@ -49,7 +50,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/scripts/ScriptsViewBean.java b/openam-console/src/main/java/com/sun/identity/console/scripts/ScriptsViewBean.java index ed6ac97bda..2cf643b695 100644 --- a/openam-console/src/main/java/com/sun/identity/console/scripts/ScriptsViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/scripts/ScriptsViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.scripts; @@ -27,7 +28,7 @@ import com.sun.identity.console.realm.HasEntitiesTabs; import com.sun.identity.console.realm.RealmPropertiesBase; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.text.MessageFormat; /** diff --git a/openam-console/src/main/java/com/sun/identity/console/service/G11NCharsetAliasViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/service/G11NCharsetAliasViewBeanBase.java index 46049d8f4b..59ab8a2295 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/G11NCharsetAliasViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/G11NCharsetAliasViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: G11NCharsetAliasViewBeanBase.java,v 1.2 2008/06/25 05:43:14 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -44,7 +45,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class G11NCharsetAliasViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/service/G11NSupportedCharsetsViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/service/G11NSupportedCharsetsViewBeanBase.java index 5e7ffa6c0b..518899fe9c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/G11NSupportedCharsetsViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/G11NSupportedCharsetsViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: G11NSupportedCharsetsViewBeanBase.java,v 1.2 2008/06/25 05:43:14 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -44,7 +45,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class G11NSupportedCharsetsViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/service/MAPClientManagerViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/MAPClientManagerViewBean.java index 7bbbe82889..78742ce5f1 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/MAPClientManagerViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/MAPClientManagerViewBean.java @@ -24,6 +24,7 @@ * * $Id: MAPClientManagerViewBean.java,v 1.2 2008/06/25 05:43:14 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -59,7 +60,7 @@ import com.sun.web.ui.view.tabs.CCTabs; import java.util.Iterator; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class MAPClientManagerViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/service/MAPCreateDeviceTwoViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/MAPCreateDeviceTwoViewBean.java index 4059e52c66..61f6632218 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/MAPCreateDeviceTwoViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/MAPCreateDeviceTwoViewBean.java @@ -24,6 +24,7 @@ * * $Id: MAPCreateDeviceTwoViewBean.java,v 1.2 2008/06/25 05:43:15 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -51,7 +52,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class MAPCreateDeviceTwoViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/service/MAPCreateDeviceViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/MAPCreateDeviceViewBean.java index 6169aaa858..67c6ff03bb 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/MAPCreateDeviceViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/MAPCreateDeviceViewBean.java @@ -24,6 +24,7 @@ * * $Id: MAPCreateDeviceViewBean.java,v 1.2 2008/06/25 05:43:15 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -47,7 +48,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.Iterator; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class MAPCreateDeviceViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/service/MAPDeviceProfileViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/MAPDeviceProfileViewBean.java index 38d84924e2..e28148799c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/MAPDeviceProfileViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/MAPDeviceProfileViewBean.java @@ -24,6 +24,7 @@ * * $Id: MAPDeviceProfileViewBean.java,v 1.2 2008/06/25 05:43:15 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -51,7 +52,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class MAPDeviceProfileViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/service/MAPDuplicationDeviceViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/MAPDuplicationDeviceViewBean.java index 5348d9b352..31d042b5ed 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/MAPDuplicationDeviceViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/MAPDuplicationDeviceViewBean.java @@ -24,6 +24,7 @@ * * $Id: MAPDuplicationDeviceViewBean.java,v 1.2 2008/06/25 05:43:15 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -45,7 +46,7 @@ import com.sun.web.ui.view.html.CCTextField; import com.sun.web.ui.view.masthead.CCSecondaryMasthead; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class MAPDuplicationDeviceViewBean extends AMViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SCConfigViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SCConfigViewBean.java index c50b0ef5d5..81cc3cd7e3 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SCConfigViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SCConfigViewBean.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -47,7 +48,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import com.sun.web.ui.view.propertysheet.CCPropertySheet; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class SCConfigViewBean extends AMPrimaryMastHeadViewBean { diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SCPlatform30ViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SCPlatform30ViewBean.java index 9767625092..72ce55a8ed 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SCPlatform30ViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SCPlatform30ViewBean.java @@ -24,6 +24,7 @@ * * $Id: SCPlatform30ViewBean.java,v 1.2 2008/06/25 05:43:15 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -41,7 +42,7 @@ import com.sun.identity.console.service.model.SCPlatformModelImpl; import com.sun.web.ui.view.alert.CCAlert; import java.text.MessageFormat; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * View bean for platform server revision 30. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SCPolicyResourceComparatorViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/service/SCPolicyResourceComparatorViewBeanBase.java index 7d04775756..89184f79e2 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SCPolicyResourceComparatorViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SCPolicyResourceComparatorViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: SCPolicyResourceComparatorViewBeanBase.java,v 1.2 2008/06/25 05:43:16 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -42,7 +43,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class SCPolicyResourceComparatorViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SCSAML2SOAPBindingRequestHandlerListViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/service/SCSAML2SOAPBindingRequestHandlerListViewBeanBase.java index dbd690e8e4..d293830f2c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SCSAML2SOAPBindingRequestHandlerListViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SCSAML2SOAPBindingRequestHandlerListViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: SCSAML2SOAPBindingRequestHandlerListViewBeanBase.java,v 1.2 2008/06/25 05:49:44 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -44,7 +45,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class SCSAML2SOAPBindingRequestHandlerListViewBeanBase extends AMPrimaryMastHeadViewBean { diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SCSAML2SOAPBindingViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SCSAML2SOAPBindingViewBean.java index f118eb7ea7..d8a3747744 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SCSAML2SOAPBindingViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SCSAML2SOAPBindingViewBean.java @@ -24,6 +24,7 @@ * * $Id: SCSAML2SOAPBindingViewBean.java,v 1.4 2008/06/25 05:49:44 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -50,7 +51,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.console.base.model.AMAdminConstants; public class SCSAML2SOAPBindingViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SCSOAPBindingRequestHandlerListViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/service/SCSOAPBindingRequestHandlerListViewBeanBase.java index d5342e811e..68dc1dab3b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SCSOAPBindingRequestHandlerListViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SCSOAPBindingRequestHandlerListViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: SCSOAPBindingRequestHandlerListViewBeanBase.java,v 1.2 2008/06/25 05:49:44 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -44,7 +45,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class SCSOAPBindingRequestHandlerListViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SCSOAPBindingViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SCSOAPBindingViewBean.java index 5d20205d7e..6c02d7b0cc 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SCSOAPBindingViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SCSOAPBindingViewBean.java @@ -24,6 +24,7 @@ * * $Id: SCSOAPBindingViewBean.java,v 1.3 2008/06/25 05:49:44 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -49,7 +50,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class SCSOAPBindingViewBean extends AMServiceProfileViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SCServiceProfileViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SCServiceProfileViewBean.java index c720d2a9a5..feb143ef7b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SCServiceProfileViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SCServiceProfileViewBean.java @@ -29,6 +29,7 @@ /* * Portions Copyrighted 2011-2015 ForgeRock AS. * Portions Copyrighted 2015 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -60,7 +61,7 @@ import com.sun.web.ui.view.html.CCRadioButton; import com.sun.web.ui.view.table.CCActionTable; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashSet; diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryBootstrapRefOffViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryBootstrapRefOffViewBeanBase.java index c8fd4275c7..6d3dfe0f5c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryBootstrapRefOffViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryBootstrapRefOffViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: SMDiscoveryBootstrapRefOffViewBeanBase.java,v 1.2 2008/06/25 05:49:44 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -60,7 +61,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class SMDiscoveryBootstrapRefOffViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryDescriptionViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryDescriptionViewBeanBase.java index db5e364376..7cd47b8594 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryDescriptionViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryDescriptionViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: SMDiscoveryDescriptionViewBeanBase.java,v 1.3 2008/10/20 23:40:01 babysunil Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -52,7 +53,7 @@ import java.text.MessageFormat; import java.util.HashSet; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class SMDiscoveryDescriptionViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryProviderResourceIdMapperViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryProviderResourceIdMapperViewBeanBase.java index 6d4dda1e87..7bee24fa6e 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryProviderResourceIdMapperViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryProviderResourceIdMapperViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: SMDiscoveryProviderResourceIdMapperViewBeanBase.java,v 1.2 2008/06/25 05:49:45 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -45,7 +46,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class SMDiscoveryProviderResourceIdMapperViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryServiceViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryServiceViewBean.java index 07ead68803..fbd27772d9 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryServiceViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SMDiscoveryServiceViewBean.java @@ -24,6 +24,7 @@ * * $Id: SMDiscoveryServiceViewBean.java,v 1.8 2008/12/17 07:30:34 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -67,7 +68,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class SMDiscoveryServiceViewBean extends AMServiceProfileViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SMG11NViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SMG11NViewBean.java index 3959e893c3..d5e4f19336 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SMG11NViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SMG11NViewBean.java @@ -24,6 +24,7 @@ * * $Id: SMG11NViewBean.java,v 1.5 2008/07/07 20:39:20 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -56,7 +57,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class SMG11NViewBean extends AMServiceProfileViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/service/STSExportPolicyViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/STSExportPolicyViewBean.java index 0322ec04eb..b4bac0ac75 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/STSExportPolicyViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/STSExportPolicyViewBean.java @@ -27,6 +27,7 @@ /** * Portions Copyrighted 2012 ForgeRock Inc * Portions Copyrighted 2012 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -47,7 +48,7 @@ import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.html.CCStaticTextField; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.owasp.esapi.ESAPI; /** diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SecurityTokenServiceViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SecurityTokenServiceViewBean.java index 7aefdcdac5..38aa648875 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SecurityTokenServiceViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SecurityTokenServiceViewBean.java @@ -24,6 +24,7 @@ * * $Id: SecurityTokenServiceViewBean.java,v 1.6 2009/12/19 02:17:03 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -50,7 +51,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class SecurityTokenServiceViewBean extends AMServiceProfileViewBeanBase { diff --git a/openam-console/src/main/java/com/sun/identity/console/service/ServerAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/ServerAddViewBean.java index 0d32993ed5..a66ddef3b5 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/ServerAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/ServerAddViewBean.java @@ -24,6 +24,7 @@ * * $Id: ServerAddViewBean.java,v 1.3 2008/11/04 22:32:14 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -46,7 +47,7 @@ import com.sun.web.ui.view.html.CCTextField; import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.net.MalformedURLException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Creates a new server. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/ServerCloneViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/ServerCloneViewBean.java index 1825be1fc3..4b184db852 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/ServerCloneViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/ServerCloneViewBean.java @@ -24,6 +24,7 @@ * * $Id: ServerCloneViewBean.java,v 1.2 2008/06/25 05:43:16 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -44,7 +45,7 @@ import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.text.MessageFormat; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Creates a clone server. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigInheritViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigInheritViewBean.java index b280077555..522247248d 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigInheritViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigInheritViewBean.java @@ -24,6 +24,7 @@ * * $Id: ServerConfigInheritViewBean.java,v 1.5 2008/08/25 22:15:38 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -52,7 +53,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Servers and Sites Management main page. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigXMLAddServerViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigXMLAddServerViewBean.java index dbcf499d20..595bf031dd 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigXMLAddServerViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigXMLAddServerViewBean.java @@ -24,6 +24,7 @@ * * $Id: ServerConfigXMLAddServerViewBean.java,v 1.2 2008/06/25 05:43:16 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -47,7 +48,7 @@ import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.html.CCTextField; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Creates a new server to server configuration XML. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigXMLViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigXMLViewBean.java index 2977f499af..1a97e57b2a 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigXMLViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/ServerConfigXMLViewBean.java @@ -24,6 +24,7 @@ * * $Id: ServerConfigXMLViewBean.java,v 1.7 2008/08/29 18:14:52 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -57,7 +58,7 @@ import com.sun.web.ui.view.tabs.CCTabs; import java.util.Iterator; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * This view bean manages server configuration XML. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/ServerEditAdvancedViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/ServerEditAdvancedViewBean.java index 7b009a205d..d860243ec3 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/ServerEditAdvancedViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/ServerEditAdvancedViewBean.java @@ -25,6 +25,7 @@ * $Id: ServerEditAdvancedViewBean.java,v 1.5 2009/07/06 18:20:04 veiming Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -61,7 +62,7 @@ import java.util.Set; import java.util.StringTokenizer; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Server Configuration, Advanced Tab. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/ServerEditViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/service/ServerEditViewBeanBase.java index 2aa36a7e28..77f57ae862 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/ServerEditViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/ServerEditViewBeanBase.java @@ -70,7 +70,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Base class for server profile view bean. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/ServerSiteViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/ServerSiteViewBean.java index 801bad52f3..678cdb3136 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/ServerSiteViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/ServerSiteViewBean.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -63,7 +64,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Servers and Sites Management main page. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SiteAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SiteAddViewBean.java index 60fb41ed95..94f949deee 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SiteAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SiteAddViewBean.java @@ -28,6 +28,7 @@ /* * Portions copyright 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -47,7 +48,7 @@ import com.sun.web.ui.view.alert.CCAlert; import com.sun.web.ui.view.html.CCTextField; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Creates a new site. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SiteEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SiteEditViewBean.java index dd4f124d92..d79f775323 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SiteEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SiteEditViewBean.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -51,7 +52,7 @@ import java.util.Iterator; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Creates a new site. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SubConfigAddViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SubConfigAddViewBean.java index fd9b149490..ad0061812b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SubConfigAddViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SubConfigAddViewBean.java @@ -25,6 +25,7 @@ * $Id: SubConfigAddViewBean.java,v 1.3 2008/06/25 05:43:17 qcheng Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -56,7 +57,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class SubConfigAddViewBean extends DynamicRequestViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SubConfigEditViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SubConfigEditViewBean.java index 1b14d66aa1..f2475a60c0 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SubConfigEditViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SubConfigEditViewBean.java @@ -25,6 +25,7 @@ * $Id: SubConfigEditViewBean.java,v 1.2 2008/06/25 05:43:17 qcheng Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -54,7 +55,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import com.sun.web.ui.view.table.CCActionTable; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; import java.text.MessageFormat; import java.util.ArrayList; diff --git a/openam-console/src/main/java/com/sun/identity/console/service/SubSchemaTypeSelectViewBean.java b/openam-console/src/main/java/com/sun/identity/console/service/SubSchemaTypeSelectViewBean.java index 3238b5a01e..21478b5826 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/SubSchemaTypeSelectViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/SubSchemaTypeSelectViewBean.java @@ -24,6 +24,7 @@ * * $Id: SubSchemaTypeSelectViewBean.java,v 1.2 2008/06/25 05:43:17 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service; @@ -50,7 +51,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class SubSchemaTypeSelectViewBean extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/MAPCreateDeviceModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/MAPCreateDeviceModelImpl.java index 7e89b05ff7..f75fb18de9 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/MAPCreateDeviceModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/MAPCreateDeviceModelImpl.java @@ -24,6 +24,8 @@ * * $Id: MAPCreateDeviceModelImpl.java,v 1.2 2008/06/25 05:43:18 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.service.model; @@ -44,7 +46,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/MAPDeviceProfileModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/MAPDeviceProfileModelImpl.java index 5daa9d6ff4..4f9039effb 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/MAPDeviceProfileModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/MAPDeviceProfileModelImpl.java @@ -24,6 +24,8 @@ * * $Id: MAPDeviceProfileModelImpl.java,v 1.2 2008/06/25 05:43:18 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.service.model; @@ -46,7 +48,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/MAPModelBase.java b/openam-console/src/main/java/com/sun/identity/console/service/model/MAPModelBase.java index e004581e7c..e7861ac64e 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/MAPModelBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/MAPModelBase.java @@ -25,6 +25,7 @@ * $Id: MAPModelBase.java,v 1.3 2009/01/28 05:34:57 ww203982 Exp $ * * Portions Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service.model; @@ -47,7 +48,7 @@ import java.util.Map; import java.util.ResourceBundle; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class MAPModelBase extends AMModelBase implements MAPModel { diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/MAPServiceModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/MAPServiceModelImpl.java index 0eb33372fe..5b02b1391e 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/MAPServiceModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/MAPServiceModelImpl.java @@ -24,6 +24,8 @@ * * $Id: MAPServiceModelImpl.java,v 1.2 2008/06/25 05:43:18 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.service.model; @@ -36,7 +38,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SCConfigModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SCConfigModelImpl.java index 3f50b5e92d..2282d95de9 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SCConfigModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SCConfigModelImpl.java @@ -26,6 +26,7 @@ * * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service.model; @@ -42,7 +43,7 @@ import com.sun.identity.sm.SchemaType; import com.sun.identity.sm.ServiceManager; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SCConsolePropertiesModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SCConsolePropertiesModelImpl.java index c31c1726de..a18520c848 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SCConsolePropertiesModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SCConsolePropertiesModelImpl.java @@ -24,6 +24,8 @@ * * $Id: SCConsolePropertiesModelImpl.java,v 1.2 2008/06/25 05:43:18 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.service.model; @@ -33,7 +35,7 @@ import com.sun.identity.console.base.model.AMServiceProfileModelImpl; import com.sun.identity.sm.ServiceManager; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SCModelBase.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SCModelBase.java index 068744cdab..b7da5f7bd7 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SCModelBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SCModelBase.java @@ -24,6 +24,8 @@ * * $Id: SCModelBase.java,v 1.3 2008/07/10 23:27:24 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.service.model; @@ -38,7 +40,7 @@ import com.sun.identity.sm.ServiceSchema; import com.sun.identity.sm.SchemaType; import com.iplanet.sso.SSOException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SCPlatformModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SCPlatformModelImpl.java index b6cfd5eca5..357fce1c6b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SCPlatformModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SCPlatformModelImpl.java @@ -27,6 +27,7 @@ */ /* * Portions Copyrighted 2011 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service.model; @@ -34,7 +35,7 @@ import com.sun.identity.console.base.model.AMConsoleException; import com.sun.identity.console.base.model.AMServiceProfileModelImpl; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SCPolicyModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SCPolicyModelImpl.java index b69b96d7fe..010bb93e39 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SCPolicyModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SCPolicyModelImpl.java @@ -24,13 +24,15 @@ * * $Id: SCPolicyModelImpl.java,v 1.2 2008/06/25 05:43:18 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.service.model; import com.sun.identity.console.base.model.AMAdminConstants; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SCSAML2SOAPBindingModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SCSAML2SOAPBindingModelImpl.java index 26675cd724..1ba42b2c5f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SCSAML2SOAPBindingModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SCSAML2SOAPBindingModelImpl.java @@ -29,6 +29,7 @@ /* * Portions Copyrighted 2014 ForgeRock AS * Portions Copyrighted 2014 Nomura Research Institute, Ltd + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service.model; @@ -38,7 +39,7 @@ import com.sun.identity.console.base.model.AMServiceProfileModelImpl; import com.sun.identity.console.property.PropertyXMLBuilder; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SCSOAPBindingModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SCSOAPBindingModelImpl.java index 09d6fd6976..b96128ae4a 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SCSOAPBindingModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SCSOAPBindingModelImpl.java @@ -24,6 +24,8 @@ * * $Id: SCSOAPBindingModelImpl.java,v 1.2 2008/06/25 05:49:46 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.service.model; @@ -33,7 +35,7 @@ import com.sun.identity.console.base.model.AMServiceProfileModelImpl; import com.sun.identity.console.property.PropertyXMLBuilder; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SMDiscoveryServiceModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SMDiscoveryServiceModelImpl.java index d95c08828f..b130944bae 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SMDiscoveryServiceModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SMDiscoveryServiceModelImpl.java @@ -24,6 +24,7 @@ * * $Id: SMDiscoveryServiceModelImpl.java,v 1.2 2008/06/25 05:49:47 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service.model; @@ -39,7 +40,7 @@ import com.sun.identity.sm.SMSException; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SMG11NModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SMG11NModelImpl.java index a8e618d591..71b6a3022b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SMG11NModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SMG11NModelImpl.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted 2011 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service.model; @@ -37,7 +38,7 @@ import com.sun.identity.console.base.model.AMServiceProfileModelImpl; import com.sun.identity.console.property.PropertyXMLBuilder; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/STSExportPolicyModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/STSExportPolicyModelImpl.java index 685f57998d..73cd7f1b14 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/STSExportPolicyModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/STSExportPolicyModelImpl.java @@ -24,6 +24,7 @@ * * $Id: STSExportPolicyModelImpl.java,v 1.1 2009/12/19 00:14:56 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service.model; @@ -40,7 +41,7 @@ import com.sun.identity.wss.provider.ProviderException; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class STSExportPolicyModelImpl extends AMModelBase implements STSExportPolicyModel { diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SecurityTokenServiceModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SecurityTokenServiceModelImpl.java index 653d1331f7..7035562b73 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SecurityTokenServiceModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SecurityTokenServiceModelImpl.java @@ -24,6 +24,8 @@ * * $Id: SecurityTokenServiceModelImpl.java,v 1.2 2008/08/15 23:11:17 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. + * */ package com.sun.identity.console.service.model; @@ -33,7 +35,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class SecurityTokenServiceModelImpl extends AMServiceProfileModelImpl diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/ServerSiteModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/ServerSiteModelImpl.java index 1a99d90416..51563ad664 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/ServerSiteModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/ServerSiteModelImpl.java @@ -25,6 +25,7 @@ * $Id: ServerSiteModelImpl.java,v 1.6 2009/07/07 06:14:13 veiming Exp $ * * Portions Copyrighted 2014 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service.model; @@ -53,7 +54,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Server and Site model implementation. diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SubConfigModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SubConfigModelImpl.java index b2c2f68fe4..4d5c9a2121 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SubConfigModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SubConfigModelImpl.java @@ -25,6 +25,7 @@ * $Id: SubConfigModelImpl.java,v 1.3 2008/06/25 05:43:19 qcheng Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service.model; @@ -50,7 +51,7 @@ import java.util.ResourceBundle; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ /* Logging is done in base.model.SubConfigMeta class */ diff --git a/openam-console/src/main/java/com/sun/identity/console/service/model/SubSchemaModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/service/model/SubSchemaModelImpl.java index 32dfe61ac6..98ea710cb3 100644 --- a/openam-console/src/main/java/com/sun/identity/console/service/model/SubSchemaModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/service/model/SubSchemaModelImpl.java @@ -24,6 +24,7 @@ * * $Id: SubSchemaModelImpl.java,v 1.2 2008/06/25 05:43:19 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.service.model; @@ -38,7 +39,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ /* Logging is done in base.model.SubConfigMeta class */ diff --git a/openam-console/src/main/java/com/sun/identity/console/session/SMProfileViewBean.java b/openam-console/src/main/java/com/sun/identity/console/session/SMProfileViewBean.java index 430d7717e7..ec0cd60eb7 100644 --- a/openam-console/src/main/java/com/sun/identity/console/session/SMProfileViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/session/SMProfileViewBean.java @@ -27,6 +27,7 @@ /** * Portions copyright 2013-2016 ForgeRock, Inc. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.session; @@ -38,7 +39,7 @@ import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.opendj.ldap.DN; diff --git a/openam-console/src/main/java/com/sun/identity/console/session/model/SMProfileModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/session/model/SMProfileModelImpl.java index f1784eb44b..53f7fd8315 100644 --- a/openam-console/src/main/java/com/sun/identity/console/session/model/SMProfileModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/session/model/SMProfileModelImpl.java @@ -25,6 +25,7 @@ * $Id: SMProfileModelImpl.java,v 1.5 2008/06/25 05:43:21 qcheng Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.session.model; @@ -42,7 +43,7 @@ import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.session.SessionCache; diff --git a/openam-console/src/main/java/com/sun/identity/console/sts/STSAddViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/sts/STSAddViewBeanBase.java index 2135c72a7b..dfaa1f503d 100644 --- a/openam-console/src/main/java/com/sun/identity/console/sts/STSAddViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/sts/STSAddViewBeanBase.java @@ -16,6 +16,7 @@ /* * Portions Copyrighted 2015 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.sts; @@ -37,7 +38,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Map; import java.util.Set; diff --git a/openam-console/src/main/java/com/sun/identity/console/sts/STSEditViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/sts/STSEditViewBeanBase.java index ce4647f79d..cdc85cb453 100644 --- a/openam-console/src/main/java/com/sun/identity/console/sts/STSEditViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/sts/STSEditViewBeanBase.java @@ -16,6 +16,7 @@ /* * Portions Copyrighted 2015-2016 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.sts; @@ -43,7 +44,7 @@ import org.forgerock.openam.shared.sts.SharedSTSConstants; import org.forgerock.openam.utils.CollectionUtils; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.text.MessageFormat; import java.util.Map; import java.util.Set; diff --git a/openam-console/src/main/java/com/sun/identity/console/sts/STSHomeViewBean.java b/openam-console/src/main/java/com/sun/identity/console/sts/STSHomeViewBean.java index f9052bfbec..fd6156a3ca 100644 --- a/openam-console/src/main/java/com/sun/identity/console/sts/STSHomeViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/sts/STSHomeViewBean.java @@ -12,6 +12,7 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.sts; @@ -36,7 +37,7 @@ import com.sun.web.ui.view.table.CCActionTable; import org.forgerock.openam.utils.CollectionUtils; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; diff --git a/openam-console/src/main/java/com/sun/identity/console/sts/model/RestSTSInstanceModel.java b/openam-console/src/main/java/com/sun/identity/console/sts/model/RestSTSInstanceModel.java index e0c74d1984..7d9ac7f6d6 100644 --- a/openam-console/src/main/java/com/sun/identity/console/sts/model/RestSTSInstanceModel.java +++ b/openam-console/src/main/java/com/sun/identity/console/sts/model/RestSTSInstanceModel.java @@ -12,6 +12,7 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.sts.model; @@ -21,7 +22,7 @@ import org.forgerock.openam.shared.sts.SharedSTSConstants; import org.forgerock.openam.utils.CollectionUtils; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.HashSet; import java.util.Map; import java.util.Set; diff --git a/openam-console/src/main/java/com/sun/identity/console/sts/model/STSHomeViewBeanModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/sts/model/STSHomeViewBeanModelImpl.java index d412c4934b..fda3e25c11 100644 --- a/openam-console/src/main/java/com/sun/identity/console/sts/model/STSHomeViewBeanModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/sts/model/STSHomeViewBeanModelImpl.java @@ -12,6 +12,7 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.sts.model; @@ -19,7 +20,7 @@ import com.sun.identity.console.base.model.AMConsoleException; import com.sun.identity.console.base.model.AMModelBase; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Map; import java.util.Set; diff --git a/openam-console/src/main/java/com/sun/identity/console/sts/model/STSInstanceModelBase.java b/openam-console/src/main/java/com/sun/identity/console/sts/model/STSInstanceModelBase.java index add0ff7a13..8bb7a43d3f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/sts/model/STSInstanceModelBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/sts/model/STSInstanceModelBase.java @@ -12,6 +12,7 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.sts.model; @@ -34,7 +35,7 @@ import org.forgerock.openam.utils.IOUtils; import org.forgerock.openam.utils.StringUtils; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; diff --git a/openam-console/src/main/java/com/sun/identity/console/sts/model/SoapSTSInstanceModel.java b/openam-console/src/main/java/com/sun/identity/console/sts/model/SoapSTSInstanceModel.java index 9a6f5aca2b..b4f6a953f4 100644 --- a/openam-console/src/main/java/com/sun/identity/console/sts/model/SoapSTSInstanceModel.java +++ b/openam-console/src/main/java/com/sun/identity/console/sts/model/SoapSTSInstanceModel.java @@ -12,6 +12,7 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.sts.model; @@ -24,7 +25,7 @@ import org.forgerock.openam.utils.CollectionUtils; import org.forgerock.openam.utils.StringUtils; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import javax.xml.namespace.QName; import java.util.Map; import java.util.Set; diff --git a/openam-console/src/main/java/com/sun/identity/console/task/CompleteCreateHostedIDPViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/CompleteCreateHostedIDPViewBean.java index bf43abd6db..49fd56887d 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/CompleteCreateHostedIDPViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/CompleteCreateHostedIDPViewBean.java @@ -24,6 +24,7 @@ * * $Id: CompleteCreateHostedIDPViewBean.java,v 1.2 2008/06/25 05:49:47 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -32,7 +33,7 @@ import com.sun.identity.console.base.AMPrimaryMastHeadViewBean; import com.sun.identity.console.base.model.AMModel; import com.sun.identity.console.base.model.AMModelBase; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** diff --git a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsCompleteViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsCompleteViewBean.java index e42b2374ef..f319d80244 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsCompleteViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsCompleteViewBean.java @@ -25,6 +25,7 @@ * $Id: ConfigureGoogleAppsCompleteViewBean.java,v 1.7 2009/05/07 21:31:45 asyhuang Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -57,9 +58,9 @@ import java.util.StringTokenizer; import java.util.logging.Level; import java.util.logging.Logger; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Create register product UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsViewBean.java index 11081ffb94..3e88482623 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsViewBean.java @@ -24,6 +24,7 @@ * * $Id: ConfigureGoogleAppsViewBean.java,v 1.2 2009/05/07 21:33:07 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -46,7 +47,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Create Fedlet UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsWarningViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsWarningViewBean.java index f335f36204..204b86cda5 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsWarningViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureGoogleAppsWarningViewBean.java @@ -24,6 +24,7 @@ * * $Id: ConfigureGoogleAppsWarningViewBean.java,v 1.2 2009/03/13 21:33:12 asyhuang Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -35,7 +36,7 @@ import com.sun.identity.console.task.model.TaskModel; import com.sun.identity.console.task.model.TaskModelImpl; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Create Warning for googleapps UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureOAuth2ViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureOAuth2ViewBean.java index e2a567c992..8586f59392 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureOAuth2ViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureOAuth2ViewBean.java @@ -3,7 +3,7 @@ import java.text.MessageFormat; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.iplanet.jato.view.View; import com.iplanet.jato.view.event.ChildContentDisplayEvent; diff --git a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsCompleteViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsCompleteViewBean.java index 6d7e2a9228..6c8aaae3a3 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsCompleteViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsCompleteViewBean.java @@ -25,6 +25,7 @@ * $Id: ConfigureSalesForceAppsCompleteViewBean.java,v 1.3 2009/07/28 17:45:40 babysunil Exp $ * * Portions Copyrighted 2013-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -54,9 +55,9 @@ import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Create register product UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsFinishWarningViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsFinishWarningViewBean.java index 670bea3bab..1ccec16ce7 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsFinishWarningViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsFinishWarningViewBean.java @@ -25,6 +25,7 @@ * $Id: ConfigureSalesForceAppsFinishWarningViewBean.java,v 1.1 2009/07/28 17:45:20 babysunil Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -40,7 +41,7 @@ import com.sun.identity.console.task.model.TaskModel; import com.sun.identity.console.task.model.TaskModelImpl; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.http.util.Uris; diff --git a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsViewBean.java index 1fff859c03..97e8015ec2 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsViewBean.java @@ -24,6 +24,7 @@ * * $Id: ConfigureSalesForceAppsViewBean.java,v 1.1 2009/07/01 23:27:21 babysunil Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -49,7 +50,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Create SalesForce UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsWarningViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsWarningViewBean.java index fce839968c..5a31549543 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsWarningViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSalesForceAppsWarningViewBean.java @@ -24,6 +24,7 @@ * * $Id: ConfigureSalesForceAppsWarningViewBean.java,v 1.1 2009/07/01 23:27:21 babysunil Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -35,7 +36,7 @@ import com.sun.identity.console.task.model.TaskModel; import com.sun.identity.console.task.model.TaskModelImpl; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Create Warning for salesforce UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSocialAuthNViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSocialAuthNViewBean.java index f22f1f3f2b..9dfd25fe4e 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSocialAuthNViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/ConfigureSocialAuthNViewBean.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -32,7 +33,7 @@ import com.sun.web.ui.view.html.CCDropDownMenu; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.io.InputStream; import java.text.MessageFormat; import java.util.SortedSet; diff --git a/openam-console/src/main/java/com/sun/identity/console/task/CreateFedletViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/CreateFedletViewBean.java index 263959a38f..c7af486297 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/CreateFedletViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/CreateFedletViewBean.java @@ -25,6 +25,7 @@ * $Id: CreateFedletViewBean.java,v 1.4 2008/07/24 18:16:55 veiming Exp $ * * Portions Copyrighted 2016 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -51,7 +52,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Create Fedlet UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/CreateFedletWarningViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/CreateFedletWarningViewBean.java index 7d3abae519..c8ff77f01c 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/CreateFedletWarningViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/CreateFedletWarningViewBean.java @@ -24,6 +24,7 @@ * * $Id: CreateFedletWarningViewBean.java,v 1.2 2008/06/25 05:49:47 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -35,7 +36,7 @@ import com.sun.identity.console.task.model.TaskModel; import com.sun.identity.console.task.model.TaskModelImpl; import com.sun.web.ui.view.alert.CCAlert; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Create Fedlet UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/CreateHostedIDPViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/CreateHostedIDPViewBean.java index 9efb2db7b1..254e2c978e 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/CreateHostedIDPViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/CreateHostedIDPViewBean.java @@ -25,6 +25,7 @@ * $Id: CreateHostedIDPViewBean.java,v 1.9 2008/10/29 00:02:39 veiming Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -49,7 +50,7 @@ import com.sun.web.ui.view.html.CCDropDownMenu; import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Create hosted identity provider UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/CreateHostedSPViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/CreateHostedSPViewBean.java index 42773223a3..26615adb0b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/CreateHostedSPViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/CreateHostedSPViewBean.java @@ -25,6 +25,7 @@ * $Id: CreateHostedSPViewBean.java,v 1.8 2008/10/29 00:02:39 veiming Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -50,7 +51,7 @@ import com.sun.web.ui.view.html.CCDropDownMenu; import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Create hosted identity provider UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/CreateRemoteIDPViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/CreateRemoteIDPViewBean.java index 683dc58b51..ac7cc94e41 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/CreateRemoteIDPViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/CreateRemoteIDPViewBean.java @@ -24,6 +24,7 @@ * * $Id: CreateRemoteIDPViewBean.java,v 1.2 2008/06/25 05:49:47 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -43,7 +44,7 @@ import com.sun.web.ui.view.html.CCDropDownMenu; import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Create remote identity provider UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/CreateRemoteSPViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/CreateRemoteSPViewBean.java index 60577d6c7c..cc75f48d1f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/CreateRemoteSPViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/CreateRemoteSPViewBean.java @@ -24,6 +24,7 @@ * * $Id: CreateRemoteSPViewBean.java,v 1.6 2008/06/25 05:49:48 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -46,7 +47,7 @@ import com.sun.web.ui.view.html.CCDropDownMenu; import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Create remote service provider UI. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/CreateSoapSTSDeploymentViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/CreateSoapSTSDeploymentViewBean.java index b551e9fb5d..c284051b5e 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/CreateSoapSTSDeploymentViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/CreateSoapSTSDeploymentViewBean.java @@ -14,7 +14,7 @@ import com.sun.web.ui.view.html.CCDropDownMenu; import com.sun.web.ui.view.pagetitle.CCPageTitle; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Set; /** diff --git a/openam-console/src/main/java/com/sun/identity/console/task/HomeViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/HomeViewBean.java index 543cdbeb38..027215bc49 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/HomeViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/HomeViewBean.java @@ -25,13 +25,14 @@ * $Id: HomeViewBean.java,v 1.2 2008/06/25 05:43:21 qcheng Exp $ * * Portions Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; import static com.sun.identity.console.XuiRedirectHelper.*; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.iplanet.jato.model.ModelControlException; import com.iplanet.jato.view.event.DisplayEvent; diff --git a/openam-console/src/main/java/com/sun/identity/console/task/ValidateSAML2SetupViewBean.java b/openam-console/src/main/java/com/sun/identity/console/task/ValidateSAML2SetupViewBean.java index bcdb70a8c1..99a2003596 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/ValidateSAML2SetupViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/ValidateSAML2SetupViewBean.java @@ -24,6 +24,7 @@ * * $Id: ValidateSAML2SetupViewBean.java,v 1.5 2008/08/21 04:37:46 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task; @@ -47,7 +48,7 @@ import java.util.Iterator; import java.util.Set; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Validate Entity Setup. diff --git a/openam-console/src/main/java/com/sun/identity/console/task/model/OAuth2ModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/task/model/OAuth2ModelImpl.java index d27b4a7aeb..7523bd5539 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/model/OAuth2ModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/model/OAuth2ModelImpl.java @@ -14,11 +14,12 @@ * Copyright 2015 ForgeRock AS. * Portions Copyrighted 2019 Open Source Solution Technology Corporation. * Portions Copyrighted 2019 OGIS-RI Co., Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task.model; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Arrays; import java.util.Collections; diff --git a/openam-console/src/main/java/com/sun/identity/console/task/model/SocialAuthNModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/task/model/SocialAuthNModelImpl.java index aa9edec1d5..e19cdaa632 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/model/SocialAuthNModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/model/SocialAuthNModelImpl.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task.model; @@ -20,7 +21,7 @@ import com.sun.identity.console.base.model.AMConsoleException; import com.sun.identity.console.base.model.AMModelBase; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.util.Map; import java.util.ResourceBundle; import java.util.Set; diff --git a/openam-console/src/main/java/com/sun/identity/console/task/model/TaskModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/task/model/TaskModelImpl.java index 91ee455857..0902727e69 100644 --- a/openam-console/src/main/java/com/sun/identity/console/task/model/TaskModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/task/model/TaskModelImpl.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted 2011-2013 ForgeRock Inc. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.task.model; @@ -66,7 +67,7 @@ import java.util.Set; import java.util.StringTokenizer; import java.util.TreeSet; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class TaskModelImpl diff --git a/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCMapListTag.java b/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCMapListTag.java index 1c7114f998..efa63ddb1b 100644 --- a/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCMapListTag.java +++ b/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCMapListTag.java @@ -27,6 +27,7 @@ /* * Portions Copyrighted 2014 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.ui.taglib; @@ -41,9 +42,9 @@ import com.sun.web.ui.taglib.html.CCSelectTag; import com.sun.web.ui.taglib.html.CCTextFieldTag; import com.sun.web.ui.view.editablelist.CCEditableList; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.PageContext; -import javax.servlet.jsp.tagext.Tag; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.Tag; /** * This is the corresponding tag for CCMapListView. diff --git a/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCOrderedListTag.java b/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCOrderedListTag.java index b36fd13664..fc7015d8dc 100644 --- a/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCOrderedListTag.java +++ b/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCOrderedListTag.java @@ -27,6 +27,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.ui.taglib; @@ -41,9 +42,9 @@ import com.sun.web.ui.taglib.html.CCTextFieldTag; import com.sun.web.ui.taglib.orderablelist.CCOrderableListTag; import com.sun.web.ui.view.html.CCButton; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.PageContext; -import javax.servlet.jsp.tagext.Tag; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.Tag; /** * This is the corresponding tag for CCOrderedListView. diff --git a/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCUnOrderedListTag.java b/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCUnOrderedListTag.java index 4f66983a2d..d35973858d 100644 --- a/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCUnOrderedListTag.java +++ b/openam-console/src/main/java/com/sun/identity/console/ui/taglib/CCUnOrderedListTag.java @@ -23,15 +23,17 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * $Id: CCUnOrderedListTag.java,v 1.1 2008/07/02 17:21:46 veiming Exp $ + * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.ui.taglib; import com.iplanet.jato.view.View; import com.sun.web.ui.taglib.editablelist.CCEditableListTag; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.PageContext; -import javax.servlet.jsp.tagext.Tag; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.Tag; /** * This is the corresponding tag for CCUnOrderedListView. diff --git a/openam-console/src/main/java/com/sun/identity/console/user/UMChangeUserPasswordViewBean.java b/openam-console/src/main/java/com/sun/identity/console/user/UMChangeUserPasswordViewBean.java index b8d6c7f8b8..4fceabb1e2 100644 --- a/openam-console/src/main/java/com/sun/identity/console/user/UMChangeUserPasswordViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/user/UMChangeUserPasswordViewBean.java @@ -25,6 +25,7 @@ * $Id: UMChangeUserPasswordViewBean.java,v 1.6 2009/12/12 01:34:11 babysunil Exp $ * * Portions Copyrighted 2012-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.user; @@ -54,7 +55,7 @@ import java.text.MessageFormat; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class UMChangeUserPasswordViewBean extends RMRealmViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/user/UMUserPasswordResetOptionsViewBean.java b/openam-console/src/main/java/com/sun/identity/console/user/UMUserPasswordResetOptionsViewBean.java index 864a0fba3c..272f0a75e6 100644 --- a/openam-console/src/main/java/com/sun/identity/console/user/UMUserPasswordResetOptionsViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/user/UMUserPasswordResetOptionsViewBean.java @@ -24,6 +24,7 @@ * * $Id: UMUserPasswordResetOptionsViewBean.java,v 1.4 2008/09/22 20:17:37 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.user; @@ -51,7 +52,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import java.util.Iterator; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class UMUserPasswordResetOptionsViewBean extends RMRealmViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/user/UMUserResourceOfferingViewBean.java b/openam-console/src/main/java/com/sun/identity/console/user/UMUserResourceOfferingViewBean.java index faf39ca5d3..c8171f65c7 100644 --- a/openam-console/src/main/java/com/sun/identity/console/user/UMUserResourceOfferingViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/user/UMUserResourceOfferingViewBean.java @@ -24,6 +24,7 @@ * * $Id: UMUserResourceOfferingViewBean.java,v 1.4 2008/10/01 16:19:26 babysunil Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.user; @@ -50,7 +51,7 @@ import com.sun.web.ui.view.table.CCActionTable; import java.text.MessageFormat; import java.util.Iterator; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class UMUserResourceOfferingViewBean extends RMRealmViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/user/UMUserResourceOfferingViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/user/UMUserResourceOfferingViewBeanBase.java index d8851c014b..69c6ec0716 100644 --- a/openam-console/src/main/java/com/sun/identity/console/user/UMUserResourceOfferingViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/user/UMUserResourceOfferingViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: UMUserResourceOfferingViewBeanBase.java,v 1.3 2008/10/01 16:19:42 babysunil Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.user; @@ -41,7 +42,7 @@ import com.sun.web.ui.model.CCPageTitleModel; import com.sun.web.ui.view.alert.CCAlert; import java.io.InputStream; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class UMUserResourceOfferingViewBeanBase extends SMDiscoveryBootstrapRefOffViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/user/model/UMChangeUserPasswordModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/user/model/UMChangeUserPasswordModelImpl.java index 9c0deb7fde..90c61f30a0 100644 --- a/openam-console/src/main/java/com/sun/identity/console/user/model/UMChangeUserPasswordModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/user/model/UMChangeUserPasswordModelImpl.java @@ -25,6 +25,7 @@ * $Id: UMChangeUserPasswordModelImpl.java,v 1.3 2009/09/28 18:59:56 babysunil Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.user.model; @@ -40,7 +41,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/user/model/UMUserPasswordResetOptionsModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/user/model/UMUserPasswordResetOptionsModelImpl.java index a96e051102..0e85369f9f 100644 --- a/openam-console/src/main/java/com/sun/identity/console/user/model/UMUserPasswordResetOptionsModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/user/model/UMUserPasswordResetOptionsModelImpl.java @@ -24,6 +24,7 @@ * * $Id: UMUserPasswordResetOptionsModelImpl.java,v 1.5 2010/01/27 18:21:37 veiming Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.user.model; @@ -60,7 +61,7 @@ import java.util.ResourceBundle; import java.util.Set; import java.util.StringTokenizer; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/user/model/UMUserResourceOfferingModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/user/model/UMUserResourceOfferingModelImpl.java index ce39980b69..86075b16d5 100644 --- a/openam-console/src/main/java/com/sun/identity/console/user/model/UMUserResourceOfferingModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/user/model/UMUserResourceOfferingModelImpl.java @@ -24,6 +24,7 @@ * * $Id: UMUserResourceOfferingModelImpl.java,v 1.2 2008/06/25 05:49:49 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.user.model; @@ -38,7 +39,7 @@ import com.sun.identity.idm.IdUtils; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - LOG COMPLETE - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/version/VersionServlet.java b/openam-console/src/main/java/com/sun/identity/console/version/VersionServlet.java index 46b805e951..30196ec869 100644 --- a/openam-console/src/main/java/com/sun/identity/console/version/VersionServlet.java +++ b/openam-console/src/main/java/com/sun/identity/console/version/VersionServlet.java @@ -26,14 +26,14 @@ */ /** * Portions Copyrighted 2012 ForgeRock AS - * Portions Copyrighted 2024 3A Systems LLC + * Portions Copyrighted 2024-2025 3A Systems LLC */ package com.sun.identity.console.version; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; public class VersionServlet extends HttpServlet { diff --git a/openam-console/src/main/java/com/sun/identity/console/version/VersionViewBean.java b/openam-console/src/main/java/com/sun/identity/console/version/VersionViewBean.java index 50e0a5d4b8..6c52d93352 100644 --- a/openam-console/src/main/java/com/sun/identity/console/version/VersionViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/version/VersionViewBean.java @@ -25,11 +25,12 @@ * $Id: VersionViewBean.java,v 1.1 2009/08/05 20:15:51 veiming Exp $ * * Portions copyright 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.version; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.console.base.AMViewBeanBase; import com.sun.identity.console.base.model.AMAdminConstants; diff --git a/openam-console/src/main/java/com/sun/identity/console/webservices/WSAuthNServicesHandlersViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/webservices/WSAuthNServicesHandlersViewBeanBase.java index 0aeb92a27a..e1fff362be 100644 --- a/openam-console/src/main/java/com/sun/identity/console/webservices/WSAuthNServicesHandlersViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/webservices/WSAuthNServicesHandlersViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: WSAuthNServicesHandlersViewBeanBase.java,v 1.3 2008/11/26 18:21:43 farble1670 Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.webservices; @@ -46,7 +47,7 @@ import java.util.Map; import java.util.Iterator; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class WSAuthNServicesHandlersViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/webservices/WSAuthNServicesViewBean.java b/openam-console/src/main/java/com/sun/identity/console/webservices/WSAuthNServicesViewBean.java index 706c1723d2..cee1510599 100644 --- a/openam-console/src/main/java/com/sun/identity/console/webservices/WSAuthNServicesViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/webservices/WSAuthNServicesViewBean.java @@ -24,6 +24,7 @@ * * $Id: WSAuthNServicesViewBean.java,v 1.2 2008/06/25 05:49:50 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.webservices; @@ -49,7 +50,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class WSAuthNServicesViewBean extends AMServiceProfileViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/webservices/WSPPServiceDSAttributeMapListViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/webservices/WSPPServiceDSAttributeMapListViewBeanBase.java index cdc036901d..35a51731ea 100644 --- a/openam-console/src/main/java/com/sun/identity/console/webservices/WSPPServiceDSAttributeMapListViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/webservices/WSPPServiceDSAttributeMapListViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: WSPPServiceDSAttributeMapListViewBeanBase.java,v 1.2 2008/06/25 05:49:50 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.webservices; @@ -43,7 +44,7 @@ import com.sun.web.ui.view.pagetitle.CCPageTitle; import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class WSPPServiceDSAttributeMapListViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/webservices/WSPPServiceSupportedContainerViewBeanBase.java b/openam-console/src/main/java/com/sun/identity/console/webservices/WSPPServiceSupportedContainerViewBeanBase.java index 6822d2345e..82c2eeb529 100644 --- a/openam-console/src/main/java/com/sun/identity/console/webservices/WSPPServiceSupportedContainerViewBeanBase.java +++ b/openam-console/src/main/java/com/sun/identity/console/webservices/WSPPServiceSupportedContainerViewBeanBase.java @@ -24,6 +24,7 @@ * * $Id: WSPPServiceSupportedContainerViewBeanBase.java,v 1.2 2008/06/25 05:49:50 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.webservices; @@ -45,7 +46,7 @@ import java.util.Iterator; import java.util.Map; import java.util.StringTokenizer; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public abstract class WSPPServiceSupportedContainerViewBeanBase extends AMPrimaryMastHeadViewBean diff --git a/openam-console/src/main/java/com/sun/identity/console/webservices/WSPersonalProfileServiceViewBean.java b/openam-console/src/main/java/com/sun/identity/console/webservices/WSPersonalProfileServiceViewBean.java index ecc61f5172..c42c427ae7 100644 --- a/openam-console/src/main/java/com/sun/identity/console/webservices/WSPersonalProfileServiceViewBean.java +++ b/openam-console/src/main/java/com/sun/identity/console/webservices/WSPersonalProfileServiceViewBean.java @@ -24,6 +24,7 @@ * * $Id: WSPersonalProfileServiceViewBean.java,v 1.2 2008/06/25 05:49:50 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.webservices; @@ -49,7 +50,7 @@ import java.util.Map; import java.util.Set; import java.util.StringTokenizer; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class WSPersonalProfileServiceViewBean extends AMServiceProfileViewBeanBase diff --git a/openam-console/src/main/java/com/sun/identity/console/webservices/model/WSAuthNServicesModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/webservices/model/WSAuthNServicesModelImpl.java index c1f454b14d..af7237fb6a 100644 --- a/openam-console/src/main/java/com/sun/identity/console/webservices/model/WSAuthNServicesModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/webservices/model/WSAuthNServicesModelImpl.java @@ -24,6 +24,7 @@ * * $Id: WSAuthNServicesModelImpl.java,v 1.2 2008/06/25 05:49:51 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.webservices.model; @@ -33,7 +34,7 @@ import com.sun.identity.console.base.model.AMServiceProfileModelImpl; import com.sun.identity.console.property.PropertyXMLBuilder; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-console/src/main/java/com/sun/identity/console/webservices/model/WSPersonalProfileServiceModelImpl.java b/openam-console/src/main/java/com/sun/identity/console/webservices/model/WSPersonalProfileServiceModelImpl.java index 34a7538063..9135dc24a2 100644 --- a/openam-console/src/main/java/com/sun/identity/console/webservices/model/WSPersonalProfileServiceModelImpl.java +++ b/openam-console/src/main/java/com/sun/identity/console/webservices/model/WSPersonalProfileServiceModelImpl.java @@ -24,6 +24,7 @@ * * $Id: WSPersonalProfileServiceModelImpl.java,v 1.2 2008/06/25 05:49:51 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.console.webservices.model; @@ -34,7 +35,7 @@ import com.sun.identity.console.property.PropertyXMLBuilder; import com.sun.identity.liberty.ws.idpp.common.IDPPConstants; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /* - NEED NOT LOG - */ diff --git a/openam-core-rest/pom.xml b/openam-core-rest/pom.xml index d39f4f96b2..7d42a62518 100755 --- a/openam-core-rest/pom.xml +++ b/openam-core-rest/pom.xml @@ -13,6 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. --> 4.0.0 @@ -20,7 +21,7 @@ org.openidentityplatform.openam openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT OpenAM Core REST @@ -55,8 +56,8 @@ openam-i18n - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/CoreRestIdentityGuiceModule.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/CoreRestIdentityGuiceModule.java index b57bf25ec4..98c86bef11 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/CoreRestIdentityGuiceModule.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/CoreRestIdentityGuiceModule.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import java.util.Collections; import java.util.HashSet; import java.util.Set; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/IdentityResourceV1.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/IdentityResourceV1.java index fc29eec92e..0dd5d3b973 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/IdentityResourceV1.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/IdentityResourceV1.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2012-2016 ForgeRock AS. - * Portions Copyrighted 2022-2025 3A Systems, LLC. + * Portions copyright 2022-2025 3A Systems, LLC. */ package org.forgerock.openam.core.rest; @@ -32,7 +32,7 @@ import java.util.*; import java.util.concurrent.ConcurrentHashMap; -import javax.mail.MessagingException; +import jakarta.mail.MessagingException; import org.apache.commons.lang3.RandomStringUtils; import org.forgerock.guice.core.InjectorHolder; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/IdentityResourceV2.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/IdentityResourceV2.java index 613503b2d6..aab435d50b 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/IdentityResourceV2.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/IdentityResourceV2.java @@ -29,7 +29,7 @@ import static org.forgerock.openam.utils.Time.*; import static org.forgerock.util.promise.Promises.newResultPromise; -import javax.mail.MessagingException; +import jakarta.mail.MessagingException; import javax.security.auth.callback.Callback; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/SelfServiceUserUiRolePredicate.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/SelfServiceUserUiRolePredicate.java index f9b5d21b1e..f7f096f9ef 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/SelfServiceUserUiRolePredicate.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/SelfServiceUserUiRolePredicate.java @@ -1,7 +1,7 @@ package org.forgerock.openam.core.rest; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import com.iplanet.dpro.session.service.SessionService; import com.iplanet.sso.SSOException; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/SmsRestRouteProvider.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/SmsRestRouteProvider.java index 4c720e6b49..81af573da8 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/SmsRestRouteProvider.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/SmsRestRouteProvider.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest; @@ -30,7 +31,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.apache.commons.io.IOUtils; import org.forgerock.json.resource.RequestHandler; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AMAuthErrorCodeResponseStatusMapping.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AMAuthErrorCodeResponseStatusMapping.java index 29f63a40e9..05267eb3b7 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AMAuthErrorCodeResponseStatusMapping.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AMAuthErrorCodeResponseStatusMapping.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn; import com.sun.identity.authentication.service.AMAuthErrorCode; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.core.Response; import java.util.HashMap; import java.util.Map; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AuthIdHelper.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AuthIdHelper.java index f3a7aefc95..ddc1932682 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AuthIdHelper.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AuthIdHelper.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn; @@ -34,8 +34,8 @@ import java.util.Map; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.apache.commons.lang3.StringEscapeUtils; import org.forgerock.json.jose.builders.JwtBuilderFactory; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AuthenticationAccessAuditFilter.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AuthenticationAccessAuditFilter.java index 720605aa03..8501ffee8e 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AuthenticationAccessAuditFilter.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/AuthenticationAccessAuditFilter.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn; @@ -24,7 +25,7 @@ import static org.forgerock.openam.core.rest.authn.RestAuthenticationConstants.*; import static org.forgerock.openam.utils.JsonValueBuilder.toJsonValue; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.io.IOException; import java.util.Set; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/CoreRestAuthenticationGuiceModule.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/CoreRestAuthenticationGuiceModule.java index d237634b51..3c2d45cb6b 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/CoreRestAuthenticationGuiceModule.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/CoreRestAuthenticationGuiceModule.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn; @@ -23,8 +24,8 @@ import static org.forgerock.http.routing.Version.version; import static org.forgerock.openam.audit.AuditConstants.Component.AUTHENTICATION; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import java.util.Set; import com.google.inject.AbstractModule; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerFactory.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerFactory.java index c7a968ef1f..ee7b2c89bb 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerFactory.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerFactory.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn; @@ -41,7 +42,7 @@ import org.forgerock.openam.core.rest.authn.callbackhandlers.RestAuthX509CallbackHandler; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.callback.Callback; import javax.security.auth.callback.ChoiceCallback; import javax.security.auth.callback.ConfirmationCallback; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerManager.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerManager.java index 6891d34d20..f10c0d4f6e 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerManager.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerManager.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.ArrayList; import java.util.List; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthenticationHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthenticationHandler.java index 9c5550f99a..24191347c5 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthenticationHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/RestAuthenticationHandler.java @@ -17,16 +17,17 @@ * Copyright 2013-2015 ForgeRock AS. * Portions copyright 2019 Open Source Solution Technology Corporation >>>>>>> cafd23ed69... Remove an input parameter included in exception message (#123) + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn; import static org.forgerock.openam.core.rest.authn.RestAuthenticationConstants.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.security.SignatureException; import com.iplanet.sso.SSOToken; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/AbstractRestAuthCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/AbstractRestAuthCallbackHandler.java index 18c73e59d6..049c164775 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/AbstractRestAuthCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/AbstractRestAuthCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -26,8 +27,8 @@ import org.forgerock.openam.utils.JsonValueBuilder; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.text.MessageFormat; /** diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthCallbackHandler.java index 0213b83a4b..f46e4e499c 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -20,8 +21,8 @@ import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Implementations of this interface define how to update a Callback from the headers and request of a Rest call, diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthChoiceCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthChoiceCallbackHandler.java index f03f4dbb78..d6bba54c55 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthChoiceCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthChoiceCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -24,8 +25,8 @@ import org.forgerock.openam.utils.JsonValueBuilder; import javax.security.auth.callback.ChoiceCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Defines methods to update a ChoiceCallback from the headers and request of a Rest call and methods to convert a diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthConfirmationCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthConfirmationCallbackHandler.java index 49254c528a..6787f69f7e 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthConfirmationCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthConfirmationCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -24,8 +25,8 @@ import org.forgerock.openam.utils.JsonValueBuilder; import javax.security.auth.callback.ConfirmationCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Defines methods to update a ConfirmationCallback from the headers and request of a Rest call and methods to convert a diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHiddenValueCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHiddenValueCallbackHandler.java index e5ac6bb910..8ba17aae16 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHiddenValueCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHiddenValueCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -23,8 +24,8 @@ import org.forgerock.openam.core.rest.authn.exceptions.RestAuthResponseException; import org.forgerock.openam.utils.JsonValueBuilder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Defines methods to update a HiddenValueCallback from the request of a Rest call and methods to convert the diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHttpCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHttpCallbackHandler.java index e6a1fa5e1c..5020865925 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHttpCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHttpCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -23,8 +24,8 @@ import org.forgerock.openam.core.rest.authn.exceptions.RestAuthResponseException; import org.forgerock.openam.utils.JsonValueBuilder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.HashMap; import java.util.Map; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthLanguageCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthLanguageCallbackHandler.java index bb65cf8405..1676fc1e4d 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthLanguageCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthLanguageCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -25,8 +26,8 @@ import org.forgerock.openam.utils.JsonValueBuilder; import javax.security.auth.callback.LanguageCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.Locale; /** diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameCallbackHandler.java index f21f2ad0e2..316297357a 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameCallbackHandler.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. - * Portions Copyrighted 2018-2025 3A Systems, LLC. + * Portions copyright 2018-2025 3A Systems, LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -27,8 +27,8 @@ import org.forgerock.openam.utils.JsonValueBuilder; import javax.security.auth.callback.NameCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Defines methods to update a NameCallback from the headers and request of a Rest call and methods to convert a diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameValueOutputCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameValueOutputCallbackHandler.java index b21b58f216..b5cffa02ea 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameValueOutputCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameValueOutputCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2018 Open Identity Community. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -23,9 +24,8 @@ import com.sun.identity.authentication.callbacks.NameValueOutputCallback; -import javax.security.auth.callback.TextOutputCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** <<<<<<< HEAD diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPasswordCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPasswordCallbackHandler.java index 67bdc76f58..b562933d0b 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPasswordCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPasswordCallbackHandler.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -27,8 +27,8 @@ import org.forgerock.openam.utils.JsonValueBuilder; import javax.security.auth.callback.PasswordCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Defines methods to update a PasswordCallback from the headers and request of a Rest call and methods to convert a diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPollingWaitCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPollingWaitCallbackHandler.java index 1acf1f261e..2c5085ddac 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPollingWaitCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPollingWaitCallbackHandler.java @@ -12,20 +12,20 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; import com.sun.identity.shared.debug.Debug; -import org.forgerock.json.JsonException; import org.forgerock.json.JsonValue; import org.forgerock.openam.authentication.callbacks.PollingWaitCallback; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthResponseException; import org.forgerock.openam.utils.JsonValueBuilder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Defines methods to update a PollingWaitCallback from the headers and request of a Rest call and methods to convert a diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthRedirectCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthRedirectCallbackHandler.java index 6ff64ee22d..b4c7c1227c 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthRedirectCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthRedirectCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -19,8 +20,8 @@ import static org.forgerock.json.JsonValue.*; import com.sun.identity.authentication.spi.RedirectCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthResponseException; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextInputCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextInputCallbackHandler.java index 5425f89fbe..7e4599bc2d 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextInputCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextInputCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -24,8 +25,8 @@ import org.forgerock.openam.utils.JsonValueBuilder; import javax.security.auth.callback.TextInputCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Defines methods to update a TextInputCallback from the headers and request of a Rest call and methods to convert a diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextOutputCallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextOutputCallbackHandler.java index 0de135d680..ef418f31c0 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextOutputCallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextOutputCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -22,8 +23,8 @@ import org.forgerock.openam.utils.JsonValueBuilder; import javax.security.auth.callback.TextOutputCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Defines methods to convert a TextOutputCallback to a JSON representation. diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthX509CallbackHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthX509CallbackHandler.java index 501385efed..198c4183a0 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthX509CallbackHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthX509CallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -22,8 +23,8 @@ import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthResponseException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.security.cert.X509Certificate; /** @@ -35,7 +36,7 @@ public class RestAuthX509CallbackHandler extends AbstractRestAuthCallbackHandler private static final String CALLBACK_NAME = "X509CertificateCallback"; /** - * Checks the request for the presence of a parameter named 'javax.servlet.request.X509Certificate', if present + * Checks the request for the presence of a parameter named 'jakarta.servlet.request.X509Certificate', if present * and not null or empty takes the first certificate from the array and sets it on the X509CerificateCallback and * returns true. * @@ -45,7 +46,7 @@ public boolean updateCallbackFromRequest(HttpServletRequest request, HttpServletResponse response, X509CertificateCallback callback) { X509Certificate[] certificates = (X509Certificate[]) request.getAttribute( - "javax.servlet.request.X509Certificate"); + "jakarta.servlet.request.X509Certificate"); if (certificates != null && certificates.length > 0) { callback.setCertificate(certificates[0]); diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/LoginAuthenticator.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/LoginAuthenticator.java index 43d431c53d..ba1abd9bed 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/LoginAuthenticator.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/LoginAuthenticator.java @@ -13,7 +13,7 @@ * * Copyright 2013-2016 ForgeRock AS. * Portions Copyrighted 2014 Nomura Research Institute, Ltd - * Portions Copyrighted 2022-2025 3A Systems, LLC. + * Portions copyright 2022-2025 3A Systems, LLC. */ package org.forgerock.openam.core.rest.authn.core; @@ -32,9 +32,9 @@ import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; import org.forgerock.util.annotations.VisibleForTesting; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.Map; import java.util.Set; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/LoginConfiguration.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/LoginConfiguration.java index ec7b490147..6bf0f6c2ca 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/LoginConfiguration.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/LoginConfiguration.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.core; import com.sun.identity.authentication.client.AuthClientUtils; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Contains all the configuration required to start or continue a login process. diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/RestAuthHttpRequestWrapper.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/RestAuthHttpRequestWrapper.java index c3b9aecb8e..ec953f8fc6 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/RestAuthHttpRequestWrapper.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/RestAuthHttpRequestWrapper.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.core; import org.apache.commons.collections.iterators.IteratorEnumeration; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/wrappers/CoreServicesWrapper.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/wrappers/CoreServicesWrapper.java index 3db6f73f52..848eab4a6a 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/wrappers/CoreServicesWrapper.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/core/wrappers/CoreServicesWrapper.java @@ -12,17 +12,17 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.core.wrappers; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.google.inject.Singleton; import com.iplanet.dpro.session.SessionID; -import com.sun.identity.authentication.AuthContext; import com.sun.identity.authentication.client.AuthClientUtils; import com.sun.identity.authentication.server.AuthContextLocal; import com.sun.identity.authentication.service.AuthException; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/http/AuthenticationServiceV1.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/http/AuthenticationServiceV1.java index 3151ac705b..37b515da50 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/http/AuthenticationServiceV1.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/http/AuthenticationServiceV1.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.http; @@ -31,10 +32,10 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; -import javax.servlet.http.HttpServletResponse; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.http.header.AcceptLanguageHeader; import org.forgerock.http.header.ContentTypeHeader; import org.forgerock.http.header.MalformedHeaderException; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/http/AuthenticationServiceV2.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/http/AuthenticationServiceV2.java index db9afd96a4..58ba552dcb 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/http/AuthenticationServiceV2.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/authn/http/AuthenticationServiceV2.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.http; import static org.forgerock.json.JsonValue.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.Map; import org.forgerock.http.protocol.Request; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/cts/CoreRestCtsGuiceModule.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/cts/CoreRestCtsGuiceModule.java index 40b453ba2c..836df5ea31 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/cts/CoreRestCtsGuiceModule.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/cts/CoreRestCtsGuiceModule.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.cts; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.openam.cts.CoreTokenConfig; import org.forgerock.openam.cts.utils.JSONSerialisation; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/cts/CoreTokenResourceAuthzModule.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/cts/CoreTokenResourceAuthzModule.java index 44da8a5037..fde2b80839 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/cts/CoreTokenResourceAuthzModule.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/cts/CoreTokenResourceAuthzModule.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.cts; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.authz.filter.api.AuthorizationResult; import org.forgerock.json.resource.ResourceException; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/dashboard/DashboardResource.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/dashboard/DashboardResource.java index 6980c40b39..465137a314 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/dashboard/DashboardResource.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/dashboard/DashboardResource.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2012-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.dashboard; @@ -26,8 +27,8 @@ import java.util.HashMap; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.CollectionProvider; import org.forgerock.api.annotations.Handler; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/CoreRestDevicesGuiceModule.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/CoreRestDevicesGuiceModule.java index 20e8e2f924..31aa61fd0e 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/CoreRestDevicesGuiceModule.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/CoreRestDevicesGuiceModule.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices; @@ -25,9 +26,9 @@ import com.sun.identity.sm.SMSException; import com.sun.identity.sm.ServiceConfigManager; import java.security.AccessController; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.openam.core.rest.devices.deviceprint.TrustedDevicesDao; import org.forgerock.openam.core.rest.devices.oath.OathDeviceSettings; import org.forgerock.openam.core.rest.devices.oath.OathDevicesDao; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/deviceprint/TrustedDevicesDao.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/deviceprint/TrustedDevicesDao.java index 80670f7301..5b3c899167 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/deviceprint/TrustedDevicesDao.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/deviceprint/TrustedDevicesDao.java @@ -13,11 +13,12 @@ * * Copyright 2014-2016 ForgeRock AS. * Portions Copyrighted 2015 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.deviceprint; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import org.forgerock.openam.core.rest.devices.UserDevicesDao; import org.forgerock.openam.core.rest.devices.services.AuthenticatorDeviceServiceFactory; import org.forgerock.openam.core.rest.devices.services.deviceprint.TrustedDeviceService; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/deviceprint/TrustedDevicesResource.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/deviceprint/TrustedDevicesResource.java index e1e8231004..63a1828540 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/deviceprint/TrustedDevicesResource.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/deviceprint/TrustedDevicesResource.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.deviceprint; @@ -29,7 +30,7 @@ import java.text.SimpleDateFormat; import java.util.Date; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.api.annotations.ApiError; import org.forgerock.api.annotations.CollectionProvider; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/oath/OathDevicesDao.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/oath/OathDevicesDao.java index 2e6288f1ad..b407cd8097 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/oath/OathDevicesDao.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/oath/OathDevicesDao.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.oath; import static org.forgerock.openam.core.rest.devices.services.oath.AuthenticatorOathServiceFactory.FACTORY_NAME; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.core.rest.devices.UserDevicesDao; import org.forgerock.openam.core.rest.devices.services.AuthenticatorDeviceServiceFactory; import org.forgerock.openam.core.rest.devices.services.oath.AuthenticatorOathService; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/oath/OathDevicesResource.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/oath/OathDevicesResource.java index c2a34015de..892885e4a6 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/oath/OathDevicesResource.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/oath/OathDevicesResource.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.oath; @@ -32,8 +33,8 @@ import com.sun.identity.shared.debug.Debug; import com.sun.identity.sm.SMSException; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.Action; import org.forgerock.api.annotations.Actions; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/push/PushDevicesDao.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/push/PushDevicesDao.java index 7ce56e40ca..3341eecd4f 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/push/PushDevicesDao.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/push/PushDevicesDao.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.push; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.core.rest.devices.UserDevicesDao; import org.forgerock.openam.core.rest.devices.services.AuthenticatorDeviceServiceFactory; import org.forgerock.openam.core.rest.devices.services.push.AuthenticatorPushService; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/push/PushDevicesResource.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/push/PushDevicesResource.java index ecd33e1d12..3cf58fcdbc 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/push/PushDevicesResource.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/push/PushDevicesResource.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.push; @@ -30,8 +31,8 @@ import com.sun.identity.idm.IdRepoException; import com.sun.identity.shared.debug.Debug; import com.sun.identity.sm.SMSException; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.Action; import org.forgerock.api.annotations.ApiError; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/deviceprint/TrustedDeviceServiceFactory.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/deviceprint/TrustedDeviceServiceFactory.java index 13a99c0a22..62549f1994 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/deviceprint/TrustedDeviceServiceFactory.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/deviceprint/TrustedDeviceServiceFactory.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.services.deviceprint; import com.sun.identity.sm.ServiceConfigManager; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import org.forgerock.openam.core.rest.devices.services.DeviceServiceFactory; /** diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/oath/AuthenticatorOathService.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/oath/AuthenticatorOathService.java index 1e446ff164..0d95a2c77f 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/oath/AuthenticatorOathService.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/oath/AuthenticatorOathService.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.services.oath; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/oath/AuthenticatorOathServiceFactory.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/oath/AuthenticatorOathServiceFactory.java index 63ef122572..05ba9f0458 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/oath/AuthenticatorOathServiceFactory.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/oath/AuthenticatorOathServiceFactory.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.services.oath; import com.iplanet.sso.SSOException; import com.sun.identity.sm.SMSException; import com.sun.identity.sm.ServiceConfigManager; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import org.forgerock.openam.core.rest.devices.services.DeviceServiceFactory; /** diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/push/AuthenticatorPushService.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/push/AuthenticatorPushService.java index 64eb1f0de2..3aed55ffe3 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/push/AuthenticatorPushService.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/push/AuthenticatorPushService.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.services.push; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/push/AuthenticatorPushServiceFactory.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/push/AuthenticatorPushServiceFactory.java index 4db49320ac..605a3ade72 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/push/AuthenticatorPushServiceFactory.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/devices/services/push/AuthenticatorPushServiceFactory.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.devices.services.push; import com.iplanet.sso.SSOException; import com.sun.identity.sm.SMSException; import com.sun.identity.sm.ServiceConfigManager; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import org.forgerock.openam.core.rest.devices.services.DeviceServiceFactory; /** diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/DocsAccessAuditFilter.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/DocsAccessAuditFilter.java index aca7dd31cf..49ac4ccd2d 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/DocsAccessAuditFilter.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/DocsAccessAuditFilter.java @@ -12,10 +12,11 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.docs; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.audit.AbstractHttpAccessAuditFilter; import org.forgerock.openam.audit.AuditConstants; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/api/ApiDocsService.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/api/ApiDocsService.java index 3ee6c0668d..c24a4e807d 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/api/ApiDocsService.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/api/ApiDocsService.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.docs.api; @@ -38,8 +39,8 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.asciidoctor.Asciidoctor; import org.asciidoctor.AttributesBuilder; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/api/ApiService.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/api/ApiService.java index 0dc052939f..7e85ea01c7 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/api/ApiService.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/docs/api/ApiService.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.docs.api; @@ -23,8 +24,8 @@ import java.util.Set; import java.util.regex.Pattern; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.transform.LocalizableOperation; import com.google.common.collect.Lists; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/record/DefaultDebugRecorder.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/record/DefaultDebugRecorder.java index f8b859dd31..fc65fcfb17 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/record/DefaultDebugRecorder.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/record/DefaultDebugRecorder.java @@ -13,6 +13,7 @@ * * Copyright 2015-2016 ForgeRock AS. * Portions Copyrighted 2015 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.record; @@ -38,8 +39,8 @@ import org.json.JSONException; import org.json.JSONObject; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import java.io.File; import java.io.FileWriter; import java.io.IOException; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/record/RecordResource.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/record/RecordResource.java index cc7adb455c..7aecdd3773 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/record/RecordResource.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/record/RecordResource.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.record; @@ -19,7 +20,7 @@ import static org.forgerock.util.promise.Promises.newResultPromise; import static org.forgerock.openam.i18n.apidescriptor.ApiDescriptorConstants.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.api.annotations.Action; import org.forgerock.api.annotations.Actions; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/server/ServerInfoResource.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/server/ServerInfoResource.java index 1ff5a38f1a..52f2909f5a 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/server/ServerInfoResource.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/server/ServerInfoResource.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.server; @@ -31,8 +32,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.ApiError; import org.forgerock.api.annotations.CollectionProvider; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/CoreRestSessionGuiceModule.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/CoreRestSessionGuiceModule.java index c6b6bf917e..f22ded5c46 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/CoreRestSessionGuiceModule.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/CoreRestSessionGuiceModule.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.session; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import java.util.ArrayList; import java.util.List; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResource.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResource.java index 370401612a..f2dde7599d 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResource.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResource.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.session; @@ -36,7 +37,7 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.api.annotations.Action; import org.forgerock.api.annotations.Actions; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResourceAuthzModule.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResourceAuthzModule.java index ae67658ff2..bdfeeaed7c 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResourceAuthzModule.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResourceAuthzModule.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.session; -import javax.inject.Inject; +import jakarta.inject.Inject; import com.iplanet.sso.SSOException; import com.iplanet.sso.SSOTokenManager; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResourceV2.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResourceV2.java index 26221628a4..c9baa97d54 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResourceV2.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/SessionResourceV2.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.session; @@ -22,7 +23,7 @@ import static org.forgerock.openam.session.SessionConstants.JSON_SESSION_USERNAME; import static org.forgerock.util.promise.Promises.newResultPromise; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.Collection; import java.util.List; import java.util.Map; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/action/LogoutActionHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/action/LogoutActionHandler.java index 9263416222..d0fdb18117 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/action/LogoutActionHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/action/LogoutActionHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.session.action; @@ -19,10 +20,10 @@ import static org.forgerock.json.resource.Responses.newActionResponse; import static org.forgerock.util.promise.Promises.newResultPromise; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpServletResponseWrapper; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponseWrapper; import java.util.HashMap; import java.util.Map; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/action/UnsupportedResponse.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/action/UnsupportedResponse.java index eb1d6f398c..f0416a693f 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/action/UnsupportedResponse.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/action/UnsupportedResponse.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.session.action; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.util.Collection; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/query/SessionQueryManager.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/query/SessionQueryManager.java index 5b1c6c9628..1fe186caeb 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/query/SessionQueryManager.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/session/query/SessionQueryManager.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.session.query; @@ -19,7 +20,7 @@ import com.iplanet.dpro.session.share.SessionInfo; import com.sun.identity.shared.debug.Debug; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.text.MessageFormat; import java.util.Collection; import java.util.LinkedList; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/AuthenticationModuleRealmSmsHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/AuthenticationModuleRealmSmsHandler.java index 34a02e1177..a25ae54d3d 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/AuthenticationModuleRealmSmsHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/AuthenticationModuleRealmSmsHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -35,8 +36,8 @@ import java.util.Locale; import java.util.ResourceBundle; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.Handler; import org.forgerock.api.annotations.Operation; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/CoreRestSmsGuiceModule.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/CoreRestSmsGuiceModule.java index 31aa9afd3d..08486da999 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/CoreRestSmsGuiceModule.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/CoreRestSmsGuiceModule.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -20,8 +21,8 @@ import static org.forgerock.openam.forgerockrest.utils.MatchingResourcePath.resourcePath; import static org.forgerock.openam.rest.RealmRoutingFactory.REALM_ROUTE; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import java.io.IOException; import java.security.AccessController; import java.util.HashSet; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/ServersResourceProvider.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/ServersResourceProvider.java index d71b367d4b..0e11ff704d 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/ServersResourceProvider.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/ServersResourceProvider.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -54,8 +55,8 @@ import java.util.Set; import java.util.TreeSet; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.Action; import org.forgerock.api.annotations.ApiError; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/ServicesRealmSmsHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/ServicesRealmSmsHandler.java index da8391e0c9..b6da8a0d4c 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/ServicesRealmSmsHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/ServicesRealmSmsHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -34,8 +35,8 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.Create; import org.forgerock.api.annotations.Handler; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SitesResourceProvider.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SitesResourceProvider.java index 3786c19142..8e2d65d29e 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SitesResourceProvider.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SitesResourceProvider.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -60,8 +61,8 @@ import java.util.ResourceBundle; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.Action; import org.forgerock.api.annotations.Actions; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsCollectionProvider.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsCollectionProvider.java index 9d9f4adb51..f344e241d9 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsCollectionProvider.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsCollectionProvider.java @@ -14,6 +14,7 @@ * Copyright 2015-2016 ForgeRock AS. * Portions Copyrighted 2015 Nomura Research Institute, Ltd. * Portions Copyrighted 2019 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -52,8 +53,8 @@ import java.util.TreeSet; import java.util.regex.Pattern; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.Action; import org.forgerock.api.annotations.CollectionProvider; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsConsoleServiceConfig.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsConsoleServiceConfig.java index 65665b38ca..7412f35c7e 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsConsoleServiceConfig.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsConsoleServiceConfig.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -25,7 +26,7 @@ import org.w3c.dom.NodeList; import org.xml.sax.SAXException; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import java.io.IOException; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsConsoleServiceNameFilter.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsConsoleServiceNameFilter.java index 1b6856b318..b7df116235 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsConsoleServiceNameFilter.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsConsoleServiceNameFilter.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -33,8 +34,8 @@ import java.util.Map; import java.util.MissingResourceException; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.sm.ServiceSchemaManagerFactory; import org.forgerock.openam.utils.CollectionUtils; import org.forgerock.openam.utils.StringUtils; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsGlobalSingletonProvider.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsGlobalSingletonProvider.java index 30d22012ef..8c39107e1f 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsGlobalSingletonProvider.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsGlobalSingletonProvider.java @@ -12,13 +12,11 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; -import static org.forgerock.api.enums.CreateMode.ID_FROM_CLIENT; -import static org.forgerock.api.models.Create.create; -import static org.forgerock.api.models.Delete.delete; import static org.forgerock.api.models.Read.read; import static org.forgerock.api.models.Update.update; @@ -28,8 +26,8 @@ import java.util.Set; import javax.annotation.Nullable; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.Handler; import org.forgerock.api.annotations.Operation; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsJsonConverter.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsJsonConverter.java index 2bb38c15d4..6e89a3379c 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsJsonConverter.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsJsonConverter.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Portions Copyrighted 2017-2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -21,7 +21,7 @@ import static org.forgerock.json.JsonValue.object; import java.util.LinkedHashMap; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsRequestHandler.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsRequestHandler.java index 0a38dd0593..fb162cb56b 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsRequestHandler.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsRequestHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -47,8 +48,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.models.ApiDescription; import org.forgerock.authz.filter.crest.api.CrestAuthorizationModule; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsServerPropertiesResource.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsServerPropertiesResource.java index ff70f73bb6..33694d33d7 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsServerPropertiesResource.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsServerPropertiesResource.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -64,8 +65,8 @@ import java.util.ResourceBundle; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPath; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsServiceHandlerFunction.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsServiceHandlerFunction.java index 813d00ea55..8ceaf26590 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsServiceHandlerFunction.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsServiceHandlerFunction.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -21,9 +22,8 @@ import java.util.Set; import javax.annotation.Nullable; -import javax.inject.Named; +import jakarta.inject.Named; -import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.inject.Inject; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsSingletonProvider.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsSingletonProvider.java index 52111ba09a..0e2a1a06aa 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsSingletonProvider.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/SmsSingletonProvider.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms; @@ -36,8 +37,8 @@ import java.util.Set; import javax.annotation.Nullable; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.api.annotations.Create; import org.forgerock.api.annotations.Delete; @@ -65,7 +66,6 @@ import org.forgerock.json.resource.ResourceResponse; import org.forgerock.json.resource.UpdateRequest; import org.forgerock.openam.identity.idm.AMIdentityRepositoryFactory; -import org.forgerock.openam.rest.RestUtils; import org.forgerock.openam.rest.resource.SSOTokenContext; import org.forgerock.services.context.Context; import org.forgerock.util.Reject; diff --git a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/tree/SmsRouteTreeBuilder.java b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/tree/SmsRouteTreeBuilder.java index 4a5a18bda4..f6676d6659 100644 --- a/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/tree/SmsRouteTreeBuilder.java +++ b/openam-core-rest/src/main/java/org/forgerock/openam/core/rest/sms/tree/SmsRouteTreeBuilder.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.sms.tree; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerManagerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerManagerTest.java index aa9eb02206..070ef3f52d 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerManagerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/RestAuthCallbackHandlerManagerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn; @@ -25,9 +26,9 @@ import org.testng.annotations.Test; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.ws.rs.core.HttpHeaders; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.ws.rs.core.HttpHeaders; import java.util.LinkedHashMap; import static org.mockito.BDDMockito.given; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/RestAuthenticationHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/RestAuthenticationHandlerTest.java index afb6972091..7158c54a19 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/RestAuthenticationHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/RestAuthenticationHandlerTest.java @@ -17,6 +17,7 @@ * Copyright 2013-2015 ForgeRock AS. * Portions copyright 2019 Open Source Solution Technology Corporation >>>>>>> cafd23ed69... Remove an input parameter included in exception message (#123) + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn; @@ -28,8 +29,8 @@ >>>>>>> cafd23ed69... Remove an input parameter included in exception message (# import static org.testng.Assert.*; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.security.SignatureException; import java.util.Collections; @@ -41,7 +42,6 @@ >>>>>>> cafd23ed69... Remove an input parameter included in exception message (# import com.sun.identity.authentication.spi.AuthLoginException; import com.sun.identity.authentication.spi.PagePropertiesCallback; import com.sun.identity.shared.locale.L10NMessageImpl; -import org.assertj.core.api.Assertions; import org.forgerock.json.JsonValue; import org.forgerock.json.jose.jws.SignedJwt; import org.forgerock.json.jose.jwt.JwtClaimsSet; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/AbstractRestAuthCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/AbstractRestAuthCallbackHandlerTest.java index 69fedc01d7..febebf6ff0 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/AbstractRestAuthCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/AbstractRestAuthCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -24,8 +25,8 @@ import org.testng.annotations.Test; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.LinkedHashMap; import java.util.Map; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthChoiceCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthChoiceCallbackHandlerTest.java index 856e8804a3..897d28aa10 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthChoiceCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthChoiceCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -26,8 +27,8 @@ import static org.testng.Assert.assertFalse; import javax.security.auth.callback.ChoiceCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.json.JsonValueException; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthConfirmationCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthConfirmationCallbackHandlerTest.java index b2360dc465..5b2f2bb96f 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthConfirmationCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthConfirmationCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -22,8 +23,8 @@ import static org.testng.Assert.assertFalse; import javax.security.auth.callback.ConfirmationCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHttpCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHttpCallbackHandlerTest.java index 8b0f384d03..c5e7fda529 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHttpCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthHttpCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -27,8 +28,8 @@ import java.util.LinkedHashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthLanguageCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthLanguageCallbackHandlerTest.java index 6e292e1fb3..dfd65517e2 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthLanguageCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthLanguageCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -24,8 +25,8 @@ import java.util.Locale; import javax.security.auth.callback.LanguageCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameCallbackHandlerTest.java index 6cbff59fd1..6654c454c6 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -25,8 +26,8 @@ import static org.mockito.Mockito.verify; import javax.security.auth.callback.NameCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameValueOutputCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameValueOutputCallbackHandlerTest.java index 55ccbd58b2..ba82cb72ef 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameValueOutputCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthNameValueOutputCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2018 Open Identity Community. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -21,8 +22,8 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPasswordCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPasswordCallbackHandlerTest.java index c92cba69f1..802269a0c6 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPasswordCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthPasswordCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -24,8 +25,8 @@ import static org.mockito.Mockito.verify; import javax.security.auth.callback.PasswordCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthRedirectCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthRedirectCallbackHandlerTest.java index 0983aceb68..57b8610e7a 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthRedirectCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthRedirectCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -27,8 +28,8 @@ import com.sun.identity.authentication.spi.RedirectCallback; import java.util.Collections; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; import org.forgerock.openam.utils.JsonValueBuilder; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextInputCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextInputCallbackHandlerTest.java index 22d09d662c..b7227a6d89 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextInputCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextInputCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -22,8 +23,8 @@ import static org.testng.Assert.assertFalse; import javax.security.auth.callback.TextInputCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextOutputCallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextOutputCallbackHandlerTest.java index a42138ca69..eb0927a981 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextOutputCallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthTextOutputCallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -22,8 +23,8 @@ import static org.testng.Assert.assertTrue; import javax.security.auth.callback.TextOutputCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthX509CallbackHandlerTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthX509CallbackHandlerTest.java index b081bdb5da..5290092a08 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthX509CallbackHandlerTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/callbackhandlers/RestAuthX509CallbackHandlerTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.callbackhandlers; @@ -25,8 +26,8 @@ import java.security.cert.X509Certificate; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.json.JsonValue; import org.forgerock.openam.core.rest.authn.exceptions.RestAuthException; @@ -69,7 +70,7 @@ public void shouldUpdateCallbackFromRequest() throws RestAuthResponseException, X509Certificate x509Certificate = mock(X509Certificate.class); X509Certificate[] x509Certificates = new X509Certificate[]{x509Certificate}; - given(request.getAttribute("javax.servlet.request.X509Certificate")).willReturn(x509Certificates); + given(request.getAttribute("jakarta.servlet.request.X509Certificate")).willReturn(x509Certificates); //When boolean updated = restAuthX509CallbackHandler.updateCallbackFromRequest(request, response, @@ -92,7 +93,7 @@ public void shouldUpdateCallbackFromRequestWithMultipleX509Certificates() X509Certificate x509Certificate2 = mock(X509Certificate.class); X509Certificate[] x509Certificates = new X509Certificate[]{x509Certificate, x509Certificate2}; - given(request.getAttribute("javax.servlet.request.X509Certificate")).willReturn(x509Certificates); + given(request.getAttribute("jakarta.servlet.request.X509Certificate")).willReturn(x509Certificates); //When boolean updated = restAuthX509CallbackHandler.updateCallbackFromRequest(request, response, @@ -113,7 +114,7 @@ public void shouldNotUpdateCallbackFromRequestWithNoX509Certificate() X509CertificateCallback x509CertificateCallback = mock(X509CertificateCallback.class); X509Certificate[] x509Certificates = new X509Certificate[]{}; - given(request.getAttribute("javax.servlet.request.X509Certificate")).willReturn(x509Certificates); + given(request.getAttribute("jakarta.servlet.request.X509Certificate")).willReturn(x509Certificates); //When boolean updated = restAuthX509CallbackHandler.updateCallbackFromRequest(request, response, diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/core/LoginAuthenticatorTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/core/LoginAuthenticatorTest.java index 1454f4f364..856cb57b1d 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/core/LoginAuthenticatorTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/core/LoginAuthenticatorTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.core; @@ -21,8 +22,8 @@ import static org.mockito.Mockito.*; import static org.testng.Assert.*; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Collections; import java.util.HashMap; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/core/LoginConfigurationTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/core/LoginConfigurationTest.java index cc49066ffd..2413606fbf 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/core/LoginConfigurationTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/authn/core/LoginConfigurationTest.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.authn.core; import org.testng.annotations.Test; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import static org.mockito.Mockito.*; import static org.testng.Assert.*; diff --git a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/session/SessionResourceTest.java b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/session/SessionResourceTest.java index d5df85fe63..cb48628ca6 100644 --- a/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/session/SessionResourceTest.java +++ b/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/session/SessionResourceTest.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.rest.session; @@ -48,8 +49,8 @@ import java.util.List; import java.util.Set; import java.util.concurrent.ExecutionException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.http.session.Session; import org.forgerock.http.session.SessionContext; import org.forgerock.json.JsonValue; diff --git a/openam-core/pom.xml b/openam-core/pom.xml index 410e3968a6..9ead484132 100755 --- a/openam-core/pom.xml +++ b/openam-core/pom.xml @@ -13,7 +13,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2011-2016 ForgeRock AS. - * Portions copyright 2017-2024 3A Systems, LLC + * Portions copyright 2017-2025 3A Systems, LLC --> 4.0.0 @@ -22,7 +22,7 @@ org.openidentityplatform.openam openam - 15.2.3-SNAPSHOT + 16.0.0-SNAPSHOT @@ -245,24 +245,27 @@ - org.openidentityplatform.openam.shaded + org.openidentityplatform.openam.jakarta jato-shaded - org.openidentityplatform.external.com.sun.web.ui + org.openidentityplatform.openam.jakarta cc + org.apache.click - click-extras + click-nodeps + ${click.version} org.apache.click - click-nodeps + click-extras + ${click.version} @@ -312,19 +315,28 @@ org.slf4j log4j-over-slf4j - - javax.xml - jaxrpc-api - + + + + + + + + + + + + + + - - com.sun.xml.rpc + org.openidentityplatform.openam.jakarta jaxrpc-impl - com.sun.xml.rpc + org.openidentityplatform.openam.jakarta jaxrpc-spi @@ -355,19 +367,19 @@ - javax.servlet - javax.servlet-api + jakarta.servlet + jakarta.servlet-api provided - javax.servlet.jsp - jsp-api + jakarta.servlet.jsp + jakarta.servlet.jsp-api com.sun.mail - javax.mail + jakarta.mail @@ -383,7 +395,6 @@ com.google.inject guice - no_aop org.openidentityplatform.commons.guice @@ -438,18 +449,18 @@ - - javax.xml.bind - jaxb-api - - - com.sun.xml.bind - jaxb-core - - - com.sun.xml.bind - jaxb-impl - + + javax.xml.bind + jaxb-api + + + com.sun.xml.bind + jaxb-core + + + com.sun.xml.bind + jaxb-impl + diff --git a/openam-core/src/main/java/com/iplanet/am/sdk/ldap/EmailNotificationHelper.java b/openam-core/src/main/java/com/iplanet/am/sdk/ldap/EmailNotificationHelper.java index 891745b598..2588c23e54 100644 --- a/openam-core/src/main/java/com/iplanet/am/sdk/ldap/EmailNotificationHelper.java +++ b/openam-core/src/main/java/com/iplanet/am/sdk/ldap/EmailNotificationHelper.java @@ -25,6 +25,7 @@ * $Id: EmailNotificationHelper.java,v 1.5 2009/01/28 05:34:48 ww203982 Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.am.sdk.ldap; @@ -51,7 +52,7 @@ import java.util.Map; import java.util.Set; import java.util.StringTokenizer; -import javax.mail.MessagingException; +import jakarta.mail.MessagingException; /** * This class has the functionality to send email notifications to the users diff --git a/openam-core/src/main/java/com/iplanet/am/util/AMClientDetector.java b/openam-core/src/main/java/com/iplanet/am/util/AMClientDetector.java index 538f43f09f..c8d29868c2 100644 --- a/openam-core/src/main/java/com/iplanet/am/util/AMClientDetector.java +++ b/openam-core/src/main/java/com/iplanet/am/util/AMClientDetector.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2010-2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.am.util; @@ -42,7 +43,7 @@ import java.security.AccessController; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * This is an utility to get the client type. This utility executes Client diff --git a/openam-core/src/main/java/com/iplanet/am/util/AMSendMail.java b/openam-core/src/main/java/com/iplanet/am/util/AMSendMail.java index f016dcb92a..12a263b314 100644 --- a/openam-core/src/main/java/com/iplanet/am/util/AMSendMail.java +++ b/openam-core/src/main/java/com/iplanet/am/util/AMSendMail.java @@ -26,17 +26,18 @@ * * Portions Copyrighted 2011-2016 ForgeRock AS. * Portions Copyrighted 2019 Open Source Solution Technology Corporation. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.am.util; import com.sun.identity.shared.Constants; import java.util.Properties; -import javax.mail.Message; -import javax.mail.MessagingException; -import javax.mail.Session; -import javax.mail.Transport; -import javax.mail.internet.InternetAddress; -import javax.mail.internet.MimeMessage; +import jakarta.mail.Message; +import jakarta.mail.MessagingException; +import jakarta.mail.Session; +import jakarta.mail.Transport; +import jakarta.mail.internet.InternetAddress; +import jakarta.mail.internet.MimeMessage; /* diff --git a/openam-core/src/main/java/com/iplanet/am/util/AMUserNamePasswordAuthenticator.java b/openam-core/src/main/java/com/iplanet/am/util/AMUserNamePasswordAuthenticator.java index dfb16f8bb4..0611f74bca 100644 --- a/openam-core/src/main/java/com/iplanet/am/util/AMUserNamePasswordAuthenticator.java +++ b/openam-core/src/main/java/com/iplanet/am/util/AMUserNamePasswordAuthenticator.java @@ -28,10 +28,11 @@ /** * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.am.util; -import javax.mail.PasswordAuthentication; +import jakarta.mail.PasswordAuthentication; /* * This is an implementation for javax.mail.Authenticator to do @@ -40,7 +41,7 @@ */ public class AMUserNamePasswordAuthenticator - extends javax.mail.Authenticator { + extends jakarta.mail.Authenticator { private String userName; private String userPassword; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/SessionID.java b/openam-core/src/main/java/com/iplanet/dpro/session/SessionID.java index 7f12dabfd3..6f1cf6e901 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/SessionID.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/SessionID.java @@ -25,6 +25,7 @@ * $Id: SessionID.java,v 1.10 2009/10/02 23:45:42 qcheng Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session; @@ -39,7 +40,7 @@ import java.security.SecureRandom; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.openam.utils.PerThreadCache; import org.forgerock.openam.utils.StringUtils; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/monitoring/SessionMonitoringStore.java b/openam-core/src/main/java/com/iplanet/dpro/session/monitoring/SessionMonitoringStore.java index b3f9cdbfb4..ec7b6b0afb 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/monitoring/SessionMonitoringStore.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/monitoring/SessionMonitoringStore.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package com.iplanet.dpro.session.monitoring; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; /** * The store for session monitoring information. Each of the operations which can be applied to sessions diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/monitoring/SessionMonitoringTimingStore.java b/openam-core/src/main/java/com/iplanet/dpro/session/monitoring/SessionMonitoringTimingStore.java index c9df4161e1..9e3f177fd4 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/monitoring/SessionMonitoringTimingStore.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/monitoring/SessionMonitoringTimingStore.java @@ -12,10 +12,11 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package com.iplanet.dpro.session.monitoring; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.shared.monitoring.AbstractTimingStore; /** diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/operations/ServerSessionOperationStrategy.java b/openam-core/src/main/java/com/iplanet/dpro/session/operations/ServerSessionOperationStrategy.java index 51d227c13e..a2c5d7238c 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/operations/ServerSessionOperationStrategy.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/operations/ServerSessionOperationStrategy.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.iplanet.dpro.session.operations; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.session.SessionConstants; import org.forgerock.openam.sso.providers.stateless.StatelessSessionManager; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/operations/strategies/LocalOperations.java b/openam-core/src/main/java/com/iplanet/dpro/session/operations/strategies/LocalOperations.java index 5d6e1e2c85..4b9d6e3ad6 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/operations/strategies/LocalOperations.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/operations/strategies/LocalOperations.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.iplanet.dpro.session.operations.strategies; @@ -23,8 +24,8 @@ import java.text.MessageFormat; import java.util.Collection; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.dpro.session.InvalidSessionIdException; import org.forgerock.openam.dpro.session.PartialSession; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/operations/strategies/StatelessOperations.java b/openam-core/src/main/java/com/iplanet/dpro/session/operations/strategies/StatelessOperations.java index 042943e77e..bc21086f03 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/operations/strategies/StatelessOperations.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/operations/strategies/StatelessOperations.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.iplanet.dpro.session.operations.strategies; @@ -21,7 +22,7 @@ import java.util.Collection; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.blacklist.Blacklist; import org.forgerock.openam.blacklist.BlacklistException; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/AuthenticationSessionStore.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/AuthenticationSessionStore.java index 0a68c4dc29..99c89f004d 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/AuthenticationSessionStore.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/AuthenticationSessionStore.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; @@ -19,11 +20,10 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.forgerock.openam.session.service.SessionAccessManager; import org.forgerock.util.Reject; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/DsameAdminTokenProvider.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/DsameAdminTokenProvider.java index bb93f90613..2cfd8a8096 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/DsameAdminTokenProvider.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/DsameAdminTokenProvider.java @@ -25,14 +25,15 @@ * $Id: SessionService.java,v 1.37 2010/02/03 03:52:54 bina Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; import java.security.AccessController; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import com.iplanet.sso.SSOException; import com.iplanet.sso.SSOToken; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/InternalSessionEventBroker.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/InternalSessionEventBroker.java index e73eea0e6a..f8b6574545 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/InternalSessionEventBroker.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/InternalSessionEventBroker.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; -import javax.inject.Singleton; -import javax.inject.Inject; +import jakarta.inject.Singleton; +import jakarta.inject.Inject; /** * Propagates {@link InternalSessionEvent} to fixed set of observers. diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/InternalSessionFactory.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/InternalSessionFactory.java index 3864a3995e..b9c5363c77 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/InternalSessionFactory.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/InternalSessionFactory.java @@ -25,14 +25,14 @@ * $Id: SessionService.java,v 1.37 2010/02/03 03:52:54 bina Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. - * Portions Copyrighted 2023 3A Systems LLC + * Portions Copyrighted 2023-2025 3A Systems LLC */ package com.iplanet.dpro.session.service; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.session.SessionConstants; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionAuditor.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionAuditor.java index 05ad35a305..5599780593 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionAuditor.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionAuditor.java @@ -27,8 +27,8 @@ import java.security.AccessController; import java.security.PrivilegedAction; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.apache.commons.lang3.StringUtils; import org.forgerock.openam.audit.AMActivityAuditEventBuilder; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionLogging.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionLogging.java index 9443d62623..af8ea2ea2a 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionLogging.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionLogging.java @@ -26,6 +26,7 @@ * * Portions Copyrighted 2010-2016 ForgeRock AS. * Portions Copyrighted 2022 Open Identity Platform Community + * Portions copyright 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; @@ -35,9 +36,9 @@ import java.util.Date; import java.util.StringTokenizer; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.openam.session.SessionEventType; import org.forgerock.openam.utils.StringUtils; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionMaxStats.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionMaxStats.java index 5e3dc11697..61869c3414 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionMaxStats.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionMaxStats.java @@ -25,11 +25,12 @@ * $Id: SessionMaxStats.java,v 1.4 2008/06/25 05:41:31 qcheng Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.forgerock.openam.session.service.SessionAccessManager; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionMaxStatsSetupListener.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionMaxStatsSetupListener.java index 2ef332a4e9..7d133952c7 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionMaxStatsSetupListener.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionMaxStatsSetupListener.java @@ -25,14 +25,15 @@ * $Id: SessionService.java,v 1.37 2010/02/03 03:52:54 bina Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; import static com.iplanet.dpro.session.service.SessionConstants.SESSION_DEBUG; import static com.iplanet.dpro.session.service.SessionConstants.STATS_MASTER_TABLE; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.session.service.SessionAccessManager; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionNotificationPublisher.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionNotificationPublisher.java index e6c7fb6fd0..93723cd832 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionNotificationPublisher.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionNotificationPublisher.java @@ -12,15 +12,16 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; import static org.forgerock.json.JsonValue.*; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.json.JsonValue; import org.forgerock.openam.notifications.NotificationBroker; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionNotificationSender.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionNotificationSender.java index 87954615fc..fefca9c7ed 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionNotificationSender.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionNotificationSender.java @@ -26,6 +26,7 @@ * * Portions Copyrighted 2010-2016 ForgeRock AS. * Portions Copyrighted 2022 Open Identity Platform Community + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; @@ -34,9 +35,9 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.util.thread.listener.ShutdownListener; import org.forgerock.util.thread.listener.ShutdownManager; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionRequestHandler.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionRequestHandler.java index f70e8026de..56546925c3 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionRequestHandler.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionRequestHandler.java @@ -25,6 +25,7 @@ * $Id: SessionRequestHandler.java,v 1.9 2009/04/02 04:11:44 ericow Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; @@ -35,9 +36,9 @@ import java.util.List; import java.util.Map; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.dpro.session.InvalidSessionIdException; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionServerConfig.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionServerConfig.java index 9d1f036e06..8a240e4a74 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionServerConfig.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionServerConfig.java @@ -25,6 +25,7 @@ * $Id: SessionService.java,v 1.37 2010/02/03 03:52:54 bina Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; @@ -41,9 +42,9 @@ import org.forgerock.openam.session.SessionConstants; import org.forgerock.openam.session.SessionServiceURLService; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import java.net.MalformedURLException; import java.net.URL; import java.util.Collection; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionService.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionService.java index 81b3076d1e..4dc2bb52cd 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionService.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionService.java @@ -25,15 +25,15 @@ * $Id: SessionService.java,v 1.37 2010/02/03 03:52:54 bina Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. - * Portions Copyrighted 2023 3A Systems LLC + * Portions Copyrighted 2023-2025 3A Systems LLC */ package com.iplanet.dpro.session.service; import java.util.Collection; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.dpro.session.PartialSession; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionServiceConfig.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionServiceConfig.java index d6acccae31..cee92c813b 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionServiceConfig.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionServiceConfig.java @@ -27,6 +27,7 @@ * Portions Copyrighted 2010-2016 ForgeRock AS. * Portions Copyrighted 2016 Nomura Research Institute, Ltd. * Portions Copyrighted 2023 Open Identity Platform Community. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; @@ -43,9 +44,9 @@ import java.util.concurrent.CopyOnWriteArraySet; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.openam.sso.providers.stateless.JwtSessionMapper; import org.forgerock.openam.sso.providers.stateless.JwtSessionMapperConfig; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionTimeoutHandlerExecutor.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionTimeoutHandlerExecutor.java index e92fd2c0f5..9e9b11d852 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionTimeoutHandlerExecutor.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/SessionTimeoutHandlerExecutor.java @@ -25,6 +25,7 @@ * $Id: SessionService.java,v 1.37 2010/02/03 03:52:54 bina Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; @@ -36,12 +37,11 @@ import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.session.*; import org.forgerock.openam.session.service.SessionTimeoutHandler; diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/service/WebtopNamingSiteUtils.java b/openam-core/src/main/java/com/iplanet/dpro/session/service/WebtopNamingSiteUtils.java index 34df12950e..537264de0c 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/service/WebtopNamingSiteUtils.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/service/WebtopNamingSiteUtils.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session.service; @@ -25,8 +26,8 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.session.SessionConstants; /** diff --git a/openam-core/src/main/java/com/iplanet/dpro/session/share/SessionEncodeURL.java b/openam-core/src/main/java/com/iplanet/dpro/session/share/SessionEncodeURL.java index 9ba8b51958..1ebc9b9f85 100644 --- a/openam-core/src/main/java/com/iplanet/dpro/session/share/SessionEncodeURL.java +++ b/openam-core/src/main/java/com/iplanet/dpro/session/share/SessionEncodeURL.java @@ -25,6 +25,7 @@ * $Id: SessionEncodeURL.java,v 1.7 2008/08/19 19:08:41 veiming Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.dpro.session.share; @@ -34,7 +35,7 @@ import com.sun.identity.shared.encode.URLEncDec; import com.sun.identity.session.util.SessionUtils; import java.util.Hashtable; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * SessionEncodeURL class encodes the URL diff --git a/openam-core/src/main/java/com/iplanet/services/cdm/ClientDetectionDefaultImpl.java b/openam-core/src/main/java/com/iplanet/services/cdm/ClientDetectionDefaultImpl.java index 615dc69e32..254abb6e69 100644 --- a/openam-core/src/main/java/com/iplanet/services/cdm/ClientDetectionDefaultImpl.java +++ b/openam-core/src/main/java/com/iplanet/services/cdm/ClientDetectionDefaultImpl.java @@ -24,6 +24,7 @@ * * $Id: ClientDetectionDefaultImpl.java,v 1.5 2008/06/25 05:41:32 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.services.cdm; @@ -31,7 +32,7 @@ import com.iplanet.am.util.AMClientDetector; import com.sun.identity.shared.debug.Debug; import java.util.Iterator; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * The ClientDetectionInterface interface needs to be implemented diff --git a/openam-core/src/main/java/com/iplanet/services/cdm/ClientDetectionInterface.java b/openam-core/src/main/java/com/iplanet/services/cdm/ClientDetectionInterface.java index 92bb969f27..4943debd45 100644 --- a/openam-core/src/main/java/com/iplanet/services/cdm/ClientDetectionInterface.java +++ b/openam-core/src/main/java/com/iplanet/services/cdm/ClientDetectionInterface.java @@ -24,11 +24,12 @@ * * $Id: ClientDetectionInterface.java,v 1.3 2008/06/25 05:41:32 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.services.cdm; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * The ClientDetectionInterface interface needs to be implemented diff --git a/openam-core/src/main/java/com/iplanet/services/comm/client/PLLClient.java b/openam-core/src/main/java/com/iplanet/services/comm/client/PLLClient.java index aa210647e4..9c0320d730 100644 --- a/openam-core/src/main/java/com/iplanet/services/comm/client/PLLClient.java +++ b/openam-core/src/main/java/com/iplanet/services/comm/client/PLLClient.java @@ -28,6 +28,7 @@ /** * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.services.comm.client; @@ -53,7 +54,7 @@ import java.util.Map; import java.util.StringTokenizer; import java.util.Vector; -import javax.servlet.http.Cookie; +import jakarta.servlet.http.Cookie; import org.forgerock.http.header.TransactionIdHeader; import org.forgerock.openam.audit.context.AuditRequestContext; diff --git a/openam-core/src/main/java/com/iplanet/services/comm/client/PLLNotificationServlet.java b/openam-core/src/main/java/com/iplanet/services/comm/client/PLLNotificationServlet.java index bcc39b0311..0ef4687bc8 100644 --- a/openam-core/src/main/java/com/iplanet/services/comm/client/PLLNotificationServlet.java +++ b/openam-core/src/main/java/com/iplanet/services/comm/client/PLLNotificationServlet.java @@ -25,6 +25,7 @@ * $Id: PLLNotificationServlet.java,v 1.6 2008/08/19 19:08:43 veiming Exp $ * * Portions Copyrighted 2011-2014 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.services.comm.client; @@ -36,11 +37,11 @@ import com.sun.identity.shared.locale.L10NMessageImpl; import java.io.InputStream; import java.util.Vector; -import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * diff --git a/openam-core/src/main/java/com/iplanet/services/comm/server/PLLAuditor.java b/openam-core/src/main/java/com/iplanet/services/comm/server/PLLAuditor.java index dacbeb31cd..2e41fe0457 100644 --- a/openam-core/src/main/java/com/iplanet/services/comm/server/PLLAuditor.java +++ b/openam-core/src/main/java/com/iplanet/services/comm/server/PLLAuditor.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.iplanet.services.comm.server; @@ -38,7 +39,7 @@ import org.forgerock.openam.audit.AuditEventPublisher; import org.forgerock.openam.audit.context.AuditRequestContext; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Responsible for publishing audit access events for individual PLL request. diff --git a/openam-core/src/main/java/com/iplanet/services/comm/server/PLLRequestServlet.java b/openam-core/src/main/java/com/iplanet/services/comm/server/PLLRequestServlet.java index 4aa52dc098..1e7576d4ae 100644 --- a/openam-core/src/main/java/com/iplanet/services/comm/server/PLLRequestServlet.java +++ b/openam-core/src/main/java/com/iplanet/services/comm/server/PLLRequestServlet.java @@ -25,6 +25,7 @@ * $Id: PLLRequestServlet.java,v 1.9 2009/02/12 17:24:13 bina Exp $ * * Portions Copyrighted 2012-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.services.comm.server; @@ -43,11 +44,11 @@ import java.io.InputStream; import java.io.OutputStreamWriter; import java.util.Hashtable; -import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * diff --git a/openam-core/src/main/java/com/iplanet/services/comm/server/RequestHandler.java b/openam-core/src/main/java/com/iplanet/services/comm/server/RequestHandler.java index 2ad87553da..3786616603 100644 --- a/openam-core/src/main/java/com/iplanet/services/comm/server/RequestHandler.java +++ b/openam-core/src/main/java/com/iplanet/services/comm/server/RequestHandler.java @@ -25,15 +25,16 @@ * $Id: RequestHandler.java,v 1.2 2008/06/25 05:41:35 qcheng Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.services.comm.server; import com.iplanet.services.comm.share.Request; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.iplanet.services.comm.share.ResponseSet; diff --git a/openam-core/src/main/java/com/iplanet/services/naming/ServiceListeners.java b/openam-core/src/main/java/com/iplanet/services/naming/ServiceListeners.java index 86d6bfffdc..d3f7e0b6d8 100644 --- a/openam-core/src/main/java/com/iplanet/services/naming/ServiceListeners.java +++ b/openam-core/src/main/java/com/iplanet/services/naming/ServiceListeners.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.iplanet.services.naming; @@ -22,7 +23,7 @@ import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; +import jakarta.inject.Inject; import com.iplanet.sso.SSOException; import com.iplanet.sso.SSOToken; diff --git a/openam-core/src/main/java/com/iplanet/services/naming/service/NamingService.java b/openam-core/src/main/java/com/iplanet/services/naming/service/NamingService.java index 146958b5eb..2795baf845 100644 --- a/openam-core/src/main/java/com/iplanet/services/naming/service/NamingService.java +++ b/openam-core/src/main/java/com/iplanet/services/naming/service/NamingService.java @@ -25,6 +25,7 @@ * $Id: NamingService.java,v 1.13 2009/04/07 22:30:07 beomsuk Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.services.naming.service; @@ -59,9 +60,9 @@ import org.forgerock.openam.session.SessionCookies; import org.forgerock.openam.utils.CollectionUtils; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.net.MalformedURLException; import java.net.URL; import java.security.AccessController; diff --git a/openam-core/src/main/java/com/iplanet/services/util/CookieUtils.java b/openam-core/src/main/java/com/iplanet/services/util/CookieUtils.java index 3f0e27a40a..18a0a6217b 100644 --- a/openam-core/src/main/java/com/iplanet/services/util/CookieUtils.java +++ b/openam-core/src/main/java/com/iplanet/services/util/CookieUtils.java @@ -24,6 +24,7 @@ * * $Id: CookieUtils.java,v 1.3 2008/06/25 05:41:41 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.services.util; @@ -36,8 +37,8 @@ import java.util.HashSet; import java.util.Set; import java.util.StringTokenizer; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; /** * Implements utility methods for handling Cookie. diff --git a/openam-core/src/main/java/com/iplanet/sso/SSOTokenManager.java b/openam-core/src/main/java/com/iplanet/sso/SSOTokenManager.java index 3bfc6c2bc1..c3d023b361 100644 --- a/openam-core/src/main/java/com/iplanet/sso/SSOTokenManager.java +++ b/openam-core/src/main/java/com/iplanet/sso/SSOTokenManager.java @@ -25,6 +25,7 @@ * $Id: SSOTokenManager.java,v 1.7 2009/02/18 23:59:36 qcheng Exp $ * * Portions copyright 2014-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.sso; @@ -289,7 +290,7 @@ private SSOProvider getProvider(SSOToken token) throws SSOException { * */ public SSOToken createSSOToken( - javax.servlet.http.HttpServletRequest request) + jakarta.servlet.http.HttpServletRequest request) throws UnsupportedOperationException, SSOException { for (SSOProviderPlugin ssoProvider : getSsoProviderPlugins()) { diff --git a/openam-core/src/main/java/com/iplanet/sso/providers/dpro/SSOProviderImpl.java b/openam-core/src/main/java/com/iplanet/sso/providers/dpro/SSOProviderImpl.java index 2daf81c275..1e5af06217 100644 --- a/openam-core/src/main/java/com/iplanet/sso/providers/dpro/SSOProviderImpl.java +++ b/openam-core/src/main/java/com/iplanet/sso/providers/dpro/SSOProviderImpl.java @@ -28,6 +28,7 @@ /** * Portions copyright 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.iplanet.sso.providers.dpro; @@ -35,7 +36,7 @@ import java.util.HashSet; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.openam.session.SessionCache; import org.forgerock.openam.utils.ClientUtils; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/AuthContext.java b/openam-core/src/main/java/com/sun/identity/authentication/AuthContext.java index 522ba64110..4e5701bfaf 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/AuthContext.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/AuthContext.java @@ -25,6 +25,7 @@ * $Id: AuthContext.java,v 1.25 2009/11/21 01:12:59 qcheng Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication; @@ -64,8 +65,8 @@ import javax.security.auth.Subject; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.ByteArrayInputStream; import java.io.IOException; import java.lang.reflect.Constructor; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/UI/LoginLogoutMapping.java b/openam-core/src/main/java/com/sun/identity/authentication/UI/LoginLogoutMapping.java index 80c2f539a8..3cf832d066 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/UI/LoginLogoutMapping.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/UI/LoginLogoutMapping.java @@ -25,6 +25,7 @@ * $Id: LoginLogoutMapping.java,v 1.11 2009/06/03 20:46:50 veiming Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.UI; @@ -35,8 +36,8 @@ import com.sun.identity.shared.debug.Debug; import java.util.Locale; import java.util.ResourceBundle; -import javax.servlet.*; -import javax.servlet.http.*; +import jakarta.servlet.*; +import jakarta.servlet.http.*; /** * diff --git a/openam-core/src/main/java/com/sun/identity/authentication/audit/AuthenticationModuleEventAuditor.java b/openam-core/src/main/java/com/sun/identity/authentication/audit/AuthenticationModuleEventAuditor.java index f924a5af4d..272c168126 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/audit/AuthenticationModuleEventAuditor.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/audit/AuthenticationModuleEventAuditor.java @@ -12,11 +12,10 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.authentication.audit; -import static com.sun.identity.authentication.util.ISAuthConstants.SHARED_STATE_USERNAME; -import static java.util.Collections.emptyMap; import static org.forgerock.audit.events.AuthenticationAuditEventBuilder.Status.*; import static org.forgerock.openam.audit.AuditConstants.AUTHENTICATION_TOPIC; import static org.forgerock.openam.audit.AuditConstants.Component.AUTHENTICATION; @@ -24,7 +23,6 @@ import static org.forgerock.openam.audit.AuditConstants.EventName.AM_LOGIN_MODULE_COMPLETED; import static org.forgerock.openam.audit.AuditConstants.LOGIN_MODULE_CONTROL_FLAG; import static org.forgerock.openam.audit.context.AuditRequestContext.getTransactionIdValue; -import static org.forgerock.openam.utils.StringUtils.isEmpty; import static org.forgerock.openam.utils.StringUtils.isNotEmpty; import com.sun.identity.authentication.service.LoginState; @@ -35,9 +33,8 @@ import org.forgerock.openam.audit.context.AuditRequestContext; import org.forgerock.openam.audit.model.AuthenticationAuditEntry; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.security.Principal; -import java.util.Map; /** * This auditor is specifically aimed at constructing and logging authentication events for login modules. diff --git a/openam-core/src/main/java/com/sun/identity/authentication/audit/AuthenticationProcessEventAuditor.java b/openam-core/src/main/java/com/sun/identity/authentication/audit/AuthenticationProcessEventAuditor.java index 3059891234..03043afe9e 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/audit/AuthenticationProcessEventAuditor.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/audit/AuthenticationProcessEventAuditor.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Portions Copyrighted 2023 3A Systems LLC + * Portions Copyrighted 2023-2025 3A Systems LLC */ package com.sun.identity.authentication.audit; @@ -42,7 +42,7 @@ import org.forgerock.openam.audit.AuditEventPublisher; import org.forgerock.openam.audit.model.AuthenticationAuditEntry; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.security.Principal; import java.util.Collections; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/client/AuthClientUtils.java b/openam-core/src/main/java/com/sun/identity/authentication/client/AuthClientUtils.java index 4394ce8541..bec53e2b6a 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/client/AuthClientUtils.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/client/AuthClientUtils.java @@ -26,6 +26,7 @@ * * Portions Copyrighted 2010-2016 ForgeRock AS. * Portions Copyrighted 2019 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.client; @@ -55,7 +56,6 @@ import com.sun.identity.common.ISLocaleContext; import com.sun.identity.common.RequestUtils; import com.sun.identity.common.ResourceLookup; -import com.sun.identity.idm.IdUtils; import com.sun.identity.policy.PolicyException; import com.sun.identity.policy.PolicyUtils; import com.sun.identity.policy.plugins.AuthSchemeCondition; @@ -80,10 +80,10 @@ import org.forgerock.openam.utils.ClientUtils; import org.forgerock.openam.utils.StringUtils; -import javax.servlet.ServletContext; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; @@ -1671,7 +1671,7 @@ public static String constructLoginURL(HttpServletRequest request) { String encoding = (clientEncoding != null) ? clientEncoding : "UTF-8"; boolean encoded = Boolean.parseBoolean(request.getParameter("encoded")); - if (request.getAttribute("javax.servlet.forward.servlet_path") != null) { + if (request.getAttribute("jakarta.servlet.forward.servlet_path") != null) { //this is a forwarded request, we should only save the forwarded URL. queryString.append(request.getQueryString()); if (queryString.length() > 0) { @@ -2289,7 +2289,7 @@ public static String getAuthCookieValue(HttpServletRequest request) { /** * @deprecated use {@link #getDomainNameByRequest( - * javax.servlet.http.HttpServletRequest, java.util.Map)} instead. + * jakarta.servlet.http.HttpServletRequest, java.util.Map)} instead. */ public static String getDomainNameByRequest(Map requestHash) { String realm = getRealmFromPolicyAdvice(requestHash); diff --git a/openam-core/src/main/java/com/sun/identity/authentication/internal/AuthSSOProvider.java b/openam-core/src/main/java/com/sun/identity/authentication/internal/AuthSSOProvider.java index 28d7bf4f2d..2efe120218 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/internal/AuthSSOProvider.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/internal/AuthSSOProvider.java @@ -25,13 +25,14 @@ * $Id: AuthSSOProvider.java,v 1.2 2008/06/25 05:41:53 qcheng Exp $ * * Portions copyright 2014-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.internal; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.iplanet.sso.SSOException; import com.iplanet.sso.SSOProvider; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/server/AuthContextLocal.java b/openam-core/src/main/java/com/sun/identity/authentication/server/AuthContextLocal.java index 33faf58397..26f7b8c974 100755 --- a/openam-core/src/main/java/com/sun/identity/authentication/server/AuthContextLocal.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/server/AuthContextLocal.java @@ -25,6 +25,7 @@ * $Id: AuthContextLocal.java,v 1.12 2009/05/21 21:57:34 qcheng Exp $ * * Portions Copyright 2013-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.server; @@ -39,7 +40,7 @@ import javax.security.auth.Subject; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import com.iplanet.sso.SSOToken; import com.sun.identity.authentication.AuthContext; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLHandler.java b/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLHandler.java index 70d3015cd6..20c3e5133d 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLHandler.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLHandler.java @@ -25,6 +25,7 @@ * $Id: AuthXMLHandler.java,v 1.20 2009/04/29 18:07:03 qcheng Exp $ * * Portions Copyrighted 2010-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.server; @@ -75,9 +76,9 @@ import javax.security.auth.callback.ChoiceCallback; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.session.SessionServiceURLService; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLRequest.java b/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLRequest.java index 77ce2503d9..f752d94e49 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLRequest.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLRequest.java @@ -24,6 +24,7 @@ * * $Id: AuthXMLRequest.java,v 1.10 2009/08/17 21:17:50 mrudul_uchil Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ /* @@ -36,8 +37,8 @@ import javax.security.auth.Subject; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.sun.identity.authentication.AuthContext; import com.sun.identity.authentication.service.AuthException; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLRequestParser.java b/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLRequestParser.java index dff75eca9f..7bc1d3a0bc 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLRequestParser.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLRequestParser.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted 2010-2012 ForgeRock Inc + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.server; @@ -35,8 +36,8 @@ import java.io.ByteArrayInputStream; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.w3c.dom.Document; import org.w3c.dom.Element; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLResponse.java b/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLResponse.java index 4b36a344ae..0ab5d78d58 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLResponse.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/server/AuthXMLResponse.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.server; @@ -39,8 +40,8 @@ import javax.security.auth.Subject; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.iplanet.dpro.session.service.InternalSession; import com.iplanet.am.util.SystemProperties; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/service/AMLoginContext.java b/openam-core/src/main/java/com/sun/identity/authentication/service/AMLoginContext.java index ae32805d71..d78f422d59 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/service/AMLoginContext.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/service/AMLoginContext.java @@ -27,7 +27,7 @@ * Portions Copyrighted 2011-2016 ForgeRock AS. * Portions Copyrighted 2014 Nomura Research Institute, Ltd * Portions Copyrighted 2019 Open Source Solution Technology Corporation - * Portions Copyrighted 2023 3A Systems LLC + * Portions Copyrighted 2023-2025 3A Systems LLC */ package com.sun.identity.authentication.service; @@ -55,7 +55,7 @@ import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag; import javax.security.auth.login.Configuration; import javax.security.auth.login.LoginException; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.audit.AuditConstants.AuthenticationFailureReason; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/service/AuthD.java b/openam-core/src/main/java/com/sun/identity/authentication/service/AuthD.java index 21a69505b6..31a61bc660 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/service/AuthD.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/service/AuthD.java @@ -26,7 +26,7 @@ * * Portions Copyrighted 2010-2016 ForgeRock AS. * Portions Copyrighted 2016 Nomura Research Institute, Ltd. - * Portions Copyrighted 2023 3A Systems LLC + * Portions Copyrighted 2023-2025 3A Systems LLC */ package com.sun.identity.authentication.service; @@ -44,8 +44,8 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.authentication.service.AuthSessionFactory; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/service/AuthServletContextListener.java b/openam-core/src/main/java/com/sun/identity/authentication/service/AuthServletContextListener.java index 03fb309050..73bb064e13 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/service/AuthServletContextListener.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/service/AuthServletContextListener.java @@ -25,12 +25,13 @@ * $Id: AuthServletContextListener.java,v 1.1 2009/12/14 23:40:35 mrudul_uchil Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.service; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; /** * The AuthServletContextListener class is used to reset the diff --git a/openam-core/src/main/java/com/sun/identity/authentication/service/AuthUtils.java b/openam-core/src/main/java/com/sun/identity/authentication/service/AuthUtils.java index 82ebca0551..38dd1caa88 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/service/AuthUtils.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/service/AuthUtils.java @@ -25,6 +25,7 @@ * $Id: AuthUtils.java,v 1.33 2009/12/15 16:39:47 qcheng Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.service; @@ -40,9 +41,9 @@ import java.util.StringTokenizer; import javax.security.auth.callback.Callback; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.session.SessionServiceURLService; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/service/LoginState.java b/openam-core/src/main/java/com/sun/identity/authentication/service/LoginState.java index 23a0d7b1d9..d3192ab268 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/service/LoginState.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/service/LoginState.java @@ -63,9 +63,9 @@ import javax.security.auth.Subject; import javax.security.auth.callback.Callback; import javax.security.auth.callback.NameCallback; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import com.google.common.base.Joiner; @@ -4202,7 +4202,7 @@ Set getDomainAuthenticators() { public X509Certificate getX509Certificate(HttpServletRequest servletrequest) { if ((servletrequest != null) && (servletrequest.isSecure())) { Object obj = servletrequest.getAttribute( - "javax.servlet.request.X509Certificate"); + "jakarta.servlet.request.X509Certificate"); X509Certificate[] allCerts = (X509Certificate[]) obj; if ((allCerts != null) && (allCerts.length != 0)) { if (DEBUG.messageEnabled()) { diff --git a/openam-core/src/main/java/com/sun/identity/authentication/share/AuthXMLUtils.java b/openam-core/src/main/java/com/sun/identity/authentication/share/AuthXMLUtils.java index 019dde8f3b..303f194ae8 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/share/AuthXMLUtils.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/share/AuthXMLUtils.java @@ -25,6 +25,7 @@ * $Id: AuthXMLUtils.java,v 1.10 2009/06/19 20:39:09 qcheng Exp $ * * Portions Copyrighted 2010-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.share; @@ -68,8 +69,8 @@ import javax.security.auth.callback.PasswordCallback; import javax.security.auth.callback.TextInputCallback; import javax.security.auth.callback.TextOutputCallback; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.openam.utils.IOUtils; import org.w3c.dom.Node; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/share/RedirectCallbackHandler.java b/openam-core/src/main/java/com/sun/identity/authentication/share/RedirectCallbackHandler.java index e35909c46d..dd33050895 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/share/RedirectCallbackHandler.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/share/RedirectCallbackHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.authentication.share; @@ -22,9 +23,9 @@ import java.io.IOException; import java.util.HashMap; import java.util.Map; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.openam.authentication.RedirectException; /** diff --git a/openam-core/src/main/java/com/sun/identity/authentication/spi/AMLoginModule.java b/openam-core/src/main/java/com/sun/identity/authentication/spi/AMLoginModule.java index 3435251702..b6e8d2fe55 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/spi/AMLoginModule.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/spi/AMLoginModule.java @@ -25,6 +25,7 @@ * $Id: AMLoginModule.java,v 1.22 2009/11/21 01:11:56 222713 Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.spi; @@ -57,8 +58,8 @@ import javax.security.auth.callback.UnsupportedCallbackException; import javax.security.auth.login.LoginException; import javax.security.auth.spi.LoginModule; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.audit.AuditConstants; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/spi/AMModuleProperties.java b/openam-core/src/main/java/com/sun/identity/authentication/spi/AMModuleProperties.java index a7fb857d01..29e6bebfb4 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/spi/AMModuleProperties.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/spi/AMModuleProperties.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted 2011-16 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.spi; @@ -55,7 +56,7 @@ import javax.security.auth.callback.PasswordCallback; import javax.security.auth.callback.TextInputCallback; import javax.security.auth.callback.TextOutputCallback; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; import javax.xml.parsers.DocumentBuilder; import org.forgerock.openam.authentication.callbacks.PollingWaitCallback; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/spi/AMPostAuthProcessInterface.java b/openam-core/src/main/java/com/sun/identity/authentication/spi/AMPostAuthProcessInterface.java index 63495e75c0..01c7bf9187 100755 --- a/openam-core/src/main/java/com/sun/identity/authentication/spi/AMPostAuthProcessInterface.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/spi/AMPostAuthProcessInterface.java @@ -25,14 +25,15 @@ * $Id: AMPostAuthProcessInterface.java,v 1.5 2009/01/16 23:31:34 higapa Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.spi; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.iplanet.sso.SSOToken; diff --git a/openam-core/src/main/java/com/sun/identity/authentication/spi/HttpCallback.java b/openam-core/src/main/java/com/sun/identity/authentication/spi/HttpCallback.java index 27284c7641..15b0cb7bff 100644 --- a/openam-core/src/main/java/com/sun/identity/authentication/spi/HttpCallback.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/spi/HttpCallback.java @@ -24,6 +24,7 @@ * * $Id: HttpCallback.java,v 1.4 2009/07/28 19:40:45 beomsuk Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ @@ -31,7 +32,7 @@ import java.io.Serializable; import javax.security.auth.callback.Callback; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; /** * HttpCallback class implements Callback diff --git a/openam-core/src/main/java/com/sun/identity/authentication/spi/ReplayPasswd.java b/openam-core/src/main/java/com/sun/identity/authentication/spi/ReplayPasswd.java index 230ec4607a..ac297a6bbc 100755 --- a/openam-core/src/main/java/com/sun/identity/authentication/spi/ReplayPasswd.java +++ b/openam-core/src/main/java/com/sun/identity/authentication/spi/ReplayPasswd.java @@ -25,6 +25,7 @@ * $Id: ReplayPasswd.java,v 1.6 2009/11/04 22:50:35 manish_rustagi Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.authentication.spi; @@ -50,9 +51,9 @@ import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import javax.crypto.spec.SecretKeySpec; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.Cookie; import org.forgerock.openam.utils.StringUtils; diff --git a/openam-core/src/main/java/com/sun/identity/common/ISAccountLockout.java b/openam-core/src/main/java/com/sun/identity/common/ISAccountLockout.java index 3513e08ec9..aaf75d5861 100644 --- a/openam-core/src/main/java/com/sun/identity/common/ISAccountLockout.java +++ b/openam-core/src/main/java/com/sun/identity/common/ISAccountLockout.java @@ -25,13 +25,14 @@ * $Id: ISAccountLockout.java,v 1.15 2009/03/07 08:01:50 veiming Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.common; import static org.forgerock.openam.utils.Time.*; import com.iplanet.am.util.AMSendMail; -import javax.mail.MessagingException; +import jakarta.mail.MessagingException; import com.iplanet.sso.SSOException; import com.sun.identity.authentication.spi.AMAuthCallBackImpl; import com.sun.identity.authentication.spi.AMAuthCallBackException; diff --git a/openam-core/src/main/java/com/sun/identity/common/ISLocaleContext.java b/openam-core/src/main/java/com/sun/identity/common/ISLocaleContext.java index 986d00a763..2882fb0491 100644 --- a/openam-core/src/main/java/com/sun/identity/common/ISLocaleContext.java +++ b/openam-core/src/main/java/com/sun/identity/common/ISLocaleContext.java @@ -25,6 +25,7 @@ * $Id: ISLocaleContext.java,v 1.14 2008/08/19 19:09:00 veiming Exp $ * * Portions Copyright 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.common; @@ -50,7 +51,7 @@ import java.security.AccessController; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; /** * Sets the locale suitable for the given situation. Each response to end-user diff --git a/openam-core/src/main/java/com/sun/identity/common/ISValidUtils.java b/openam-core/src/main/java/com/sun/identity/common/ISValidUtils.java index 1f0fbde805..2f15be368d 100644 --- a/openam-core/src/main/java/com/sun/identity/common/ISValidUtils.java +++ b/openam-core/src/main/java/com/sun/identity/common/ISValidUtils.java @@ -24,13 +24,14 @@ * * $Id: ISValidUtils.java,v 1.2 2008/06/25 05:42:26 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.common; import java.util.Iterator; -import javax.xml.bind.DatatypeConverter; +import jakarta.xml.bind.DatatypeConverter; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; diff --git a/openam-core/src/main/java/com/sun/identity/common/MonitoringConfiguration.java b/openam-core/src/main/java/com/sun/identity/common/MonitoringConfiguration.java index bc1f77e207..8d08430c62 100644 --- a/openam-core/src/main/java/com/sun/identity/common/MonitoringConfiguration.java +++ b/openam-core/src/main/java/com/sun/identity/common/MonitoringConfiguration.java @@ -24,15 +24,16 @@ * * $Id: MonitoringConfiguration.java,v 1.1 2009/06/19 02:29:39 bigfatrat Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.common; import com.sun.identity.setup.AMSetupServlet; import com.iplanet.services.naming.WebtopNaming; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; /** diff --git a/openam-core/src/main/java/com/sun/identity/common/RequestUtils.java b/openam-core/src/main/java/com/sun/identity/common/RequestUtils.java index 6e541545eb..3bbffdfb76 100644 --- a/openam-core/src/main/java/com/sun/identity/common/RequestUtils.java +++ b/openam-core/src/main/java/com/sun/identity/common/RequestUtils.java @@ -25,6 +25,7 @@ * $Id: RequestUtils.java,v 1.5 2008/08/19 19:09:00 veiming Exp $ * * Portions Copyrighted 2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. * */ @@ -32,7 +33,7 @@ import java.util.StringTokenizer; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.shared.Constants; import com.sun.identity.shared.debug.Debug; diff --git a/openam-core/src/main/java/com/sun/identity/common/ResourceLookup.java b/openam-core/src/main/java/com/sun/identity/common/ResourceLookup.java index 69691e828a..bb9175cd88 100644 --- a/openam-core/src/main/java/com/sun/identity/common/ResourceLookup.java +++ b/openam-core/src/main/java/com/sun/identity/common/ResourceLookup.java @@ -25,12 +25,12 @@ * $Id: ResourceLookup.java,v 1.7 2009/05/02 22:12:04 kevinserwin Exp $ * * Portions Copyrighted 2014 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.common; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; -import com.iplanet.am.util.SystemProperties; import com.sun.identity.shared.Constants; import com.sun.identity.shared.debug.Debug; import com.sun.identity.shared.search.FileLookup; @@ -40,10 +40,9 @@ import java.net.URL; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; import java.util.concurrent.TimeUnit; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; /** * ResourceLookup is a partial replacement for implementation of FileLookup. It diff --git a/openam-core/src/main/java/com/sun/identity/config/DefaultSummary.java b/openam-core/src/main/java/com/sun/identity/config/DefaultSummary.java index 0cab0e73bd..7288a3f45a 100644 --- a/openam-core/src/main/java/com/sun/identity/config/DefaultSummary.java +++ b/openam-core/src/main/java/com/sun/identity/config/DefaultSummary.java @@ -25,6 +25,7 @@ * $Id: DefaultSummary.java,v 1.13 2009/01/05 23:17:09 veiming Exp $ * * Portions Copyrighted 2010-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.config; @@ -35,10 +36,10 @@ import com.sun.identity.setup.HttpServletRequestWrapper; import com.sun.identity.setup.HttpServletResponseWrapper; import com.sun.identity.setup.SetupConstants; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.shared.Constants; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.control.ActionLink; public class DefaultSummary extends ProtectedPage { diff --git a/openam-core/src/main/java/com/sun/identity/config/Options.java b/openam-core/src/main/java/com/sun/identity/config/Options.java index 0a5230c533..8c4a3e63d8 100644 --- a/openam-core/src/main/java/com/sun/identity/config/Options.java +++ b/openam-core/src/main/java/com/sun/identity/config/Options.java @@ -32,7 +32,7 @@ import com.sun.identity.config.util.TemplatedPage; import com.sun.identity.setup.AMSetupServlet; import com.sun.identity.setup.EmbeddedOpenDS; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.control.ActionLink; import org.forgerock.openam.upgrade.VersionUtils; public class Options extends TemplatedPage { diff --git a/openam-core/src/main/java/com/sun/identity/config/SetupWriter.java b/openam-core/src/main/java/com/sun/identity/config/SetupWriter.java index 0db54a0e4c..dee77557c4 100644 --- a/openam-core/src/main/java/com/sun/identity/config/SetupWriter.java +++ b/openam-core/src/main/java/com/sun/identity/config/SetupWriter.java @@ -30,6 +30,7 @@ * Portions Copyrighted 2011 ForgeRock AS */ package com.sun.identity.config; + import java.io.CharArrayWriter; import java.io.Writer; import java.io.IOException; diff --git a/openam-core/src/main/java/com/sun/identity/config/util/AjaxPage.java b/openam-core/src/main/java/com/sun/identity/config/util/AjaxPage.java index 692ee09b07..76697d76c0 100644 --- a/openam-core/src/main/java/com/sun/identity/config/util/AjaxPage.java +++ b/openam-core/src/main/java/com/sun/identity/config/util/AjaxPage.java @@ -25,6 +25,7 @@ * $Id: AjaxPage.java,v 1.24 2010/01/04 19:15:16 veiming Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.config.util; @@ -49,11 +50,11 @@ import java.util.MissingResourceException; import java.util.ResourceBundle; import java.util.concurrent.TimeUnit; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; -import org.apache.click.Page; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.Page; +import org.openidentityplatform.openam.click.control.ActionLink; import org.forgerock.openam.ldap.LDAPRequests; import org.forgerock.opendj.ldap.Connection; import org.forgerock.opendj.ldap.ConnectionFactory; diff --git a/openam-core/src/main/java/com/sun/identity/config/wizard/LDAPStoreWizardPage.java b/openam-core/src/main/java/com/sun/identity/config/wizard/LDAPStoreWizardPage.java index afd183acea..5536149cb5 100644 --- a/openam-core/src/main/java/com/sun/identity/config/wizard/LDAPStoreWizardPage.java +++ b/openam-core/src/main/java/com/sun/identity/config/wizard/LDAPStoreWizardPage.java @@ -31,7 +31,7 @@ import com.sun.identity.config.pojos.LDAPStore; import com.sun.identity.config.util.ProtectedPage; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.control.ActionLink; /* * LDAPStoreWizardPage is the base for Step 3. diff --git a/openam-core/src/main/java/com/sun/identity/config/wizard/Step1.java b/openam-core/src/main/java/com/sun/identity/config/wizard/Step1.java index 59d1b2aa15..004f4c1635 100644 --- a/openam-core/src/main/java/com/sun/identity/config/wizard/Step1.java +++ b/openam-core/src/main/java/com/sun/identity/config/wizard/Step1.java @@ -31,7 +31,7 @@ import com.sun.identity.config.SessionAttributeNames; import com.sun.identity.config.util.ProtectedPage; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.control.ActionLink; /** * This is the first step in the advanced configuration flow. diff --git a/openam-core/src/main/java/com/sun/identity/config/wizard/Step2.java b/openam-core/src/main/java/com/sun/identity/config/wizard/Step2.java index 4e4703ca6d..34cc0ce668 100644 --- a/openam-core/src/main/java/com/sun/identity/config/wizard/Step2.java +++ b/openam-core/src/main/java/com/sun/identity/config/wizard/Step2.java @@ -38,7 +38,7 @@ import java.net.MalformedURLException; import java.net.URL; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.control.ActionLink; import org.forgerock.openam.utils.StringUtils; public class Step2 extends ProtectedPage { diff --git a/openam-core/src/main/java/com/sun/identity/config/wizard/Step3.java b/openam-core/src/main/java/com/sun/identity/config/wizard/Step3.java index 467d89dcd4..caf0f3e495 100644 --- a/openam-core/src/main/java/com/sun/identity/config/wizard/Step3.java +++ b/openam-core/src/main/java/com/sun/identity/config/wizard/Step3.java @@ -41,8 +41,8 @@ import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Map; -import org.apache.click.Context; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.Context; +import org.openidentityplatform.openam.click.control.ActionLink; import org.forgerock.openam.ldap.LDAPUtils; import org.forgerock.opendj.ldap.Connection; import org.forgerock.opendj.ldap.DN; diff --git a/openam-core/src/main/java/com/sun/identity/config/wizard/Step4.java b/openam-core/src/main/java/com/sun/identity/config/wizard/Step4.java index abb2829a71..3d759a3ed2 100644 --- a/openam-core/src/main/java/com/sun/identity/config/wizard/Step4.java +++ b/openam-core/src/main/java/com/sun/identity/config/wizard/Step4.java @@ -40,8 +40,8 @@ import javax.naming.directory.Attributes; import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext; -import org.apache.click.Context; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.Context; +import org.openidentityplatform.openam.click.control.ActionLink; import org.forgerock.openam.ldap.LDAPRequests; import org.forgerock.openam.ldap.LDAPUtils; import org.forgerock.opendj.ldap.Connection; diff --git a/openam-core/src/main/java/com/sun/identity/config/wizard/Step5.java b/openam-core/src/main/java/com/sun/identity/config/wizard/Step5.java index 1f621b4a24..49877744ad 100644 --- a/openam-core/src/main/java/com/sun/identity/config/wizard/Step5.java +++ b/openam-core/src/main/java/com/sun/identity/config/wizard/Step5.java @@ -32,7 +32,7 @@ import java.net.MalformedURLException; import java.net.URL; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.control.ActionLink; import com.sun.identity.config.SessionAttributeNames; import com.sun.identity.config.util.ProtectedPage; diff --git a/openam-core/src/main/java/com/sun/identity/config/wizard/Step6.java b/openam-core/src/main/java/com/sun/identity/config/wizard/Step6.java index bbf481a9f4..012cd0b07c 100644 --- a/openam-core/src/main/java/com/sun/identity/config/wizard/Step6.java +++ b/openam-core/src/main/java/com/sun/identity/config/wizard/Step6.java @@ -31,7 +31,7 @@ import com.sun.identity.config.SessionAttributeNames; import com.sun.identity.config.util.ProtectedPage; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.control.ActionLink; /** * This is the first step in the advanced configuration flow. diff --git a/openam-core/src/main/java/com/sun/identity/config/wizard/Step7.java b/openam-core/src/main/java/com/sun/identity/config/wizard/Step7.java index 747be00bbb..1dd7506dd5 100644 --- a/openam-core/src/main/java/com/sun/identity/config/wizard/Step7.java +++ b/openam-core/src/main/java/com/sun/identity/config/wizard/Step7.java @@ -29,7 +29,7 @@ package com.sun.identity.config.wizard; -import org.apache.click.Context; +import org.openidentityplatform.openam.click.Context; import com.sun.identity.config.SessionAttributeNames; import com.sun.identity.config.util.ProtectedPage; diff --git a/openam-core/src/main/java/com/sun/identity/config/wizard/Wizard.java b/openam-core/src/main/java/com/sun/identity/config/wizard/Wizard.java index ffbde0f262..24e87770d0 100644 --- a/openam-core/src/main/java/com/sun/identity/config/wizard/Wizard.java +++ b/openam-core/src/main/java/com/sun/identity/config/wizard/Wizard.java @@ -25,6 +25,7 @@ * $Id: Wizard.java,v 1.27 2009/01/17 02:05:35 kevinserwin Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.config.wizard; @@ -32,9 +33,9 @@ import java.util.HashMap; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; -import org.apache.click.control.ActionLink; +import org.openidentityplatform.openam.click.control.ActionLink; import com.sun.identity.config.SessionAttributeNames; import com.sun.identity.config.util.ProtectedPage; diff --git a/openam-core/src/main/java/com/sun/identity/entitlement/opensso/EntitlementService.java b/openam-core/src/main/java/com/sun/identity/entitlement/opensso/EntitlementService.java index d524fc4b72..b7a704212d 100644 --- a/openam-core/src/main/java/com/sun/identity/entitlement/opensso/EntitlementService.java +++ b/openam-core/src/main/java/com/sun/identity/entitlement/opensso/EntitlementService.java @@ -25,6 +25,7 @@ * $Id: EntitlementService.java,v 1.13 2010/01/08 23:59:32 veiming Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.entitlement.opensso; @@ -45,7 +46,7 @@ import java.util.Set; import java.util.logging.Level; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; import org.forgerock.json.JsonValue; diff --git a/openam-core/src/main/java/com/sun/identity/entitlement/util/NetworkMonitor.java b/openam-core/src/main/java/com/sun/identity/entitlement/util/NetworkMonitor.java index a78a3c67be..d05dfa3d1a 100644 --- a/openam-core/src/main/java/com/sun/identity/entitlement/util/NetworkMonitor.java +++ b/openam-core/src/main/java/com/sun/identity/entitlement/util/NetworkMonitor.java @@ -25,6 +25,7 @@ * $Id: NetworkMonitor.java,v 1.2 2009/12/17 18:03:51 veiming Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.entitlement.util; @@ -39,10 +40,10 @@ import java.util.LinkedList; import java.util.Set; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.sun.identity.entitlement.EntitlementConfiguration; diff --git a/openam-core/src/main/java/com/sun/identity/idm/AMIdentityRepository.java b/openam-core/src/main/java/com/sun/identity/idm/AMIdentityRepository.java index cafa5b9ecc..6604c3c2c5 100644 --- a/openam-core/src/main/java/com/sun/identity/idm/AMIdentityRepository.java +++ b/openam-core/src/main/java/com/sun/identity/idm/AMIdentityRepository.java @@ -25,6 +25,7 @@ * $Id: AMIdentityRepository.java,v 1.21 2010/01/06 01:58:26 veiming Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.idm; @@ -37,7 +38,7 @@ import java.util.Set; import javax.annotation.Nullable; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.callback.Callback; import org.forgerock.guice.core.InjectorHolder; diff --git a/openam-core/src/main/java/com/sun/identity/idm/common/IdRepoUtils.java b/openam-core/src/main/java/com/sun/identity/idm/common/IdRepoUtils.java index ad4107aa4e..bd1f07f837 100644 --- a/openam-core/src/main/java/com/sun/identity/idm/common/IdRepoUtils.java +++ b/openam-core/src/main/java/com/sun/identity/idm/common/IdRepoUtils.java @@ -25,6 +25,7 @@ * $Id: IdRepoUtils.java,v 1.3 2010/01/06 22:31:55 veiming Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.idm.common; @@ -64,7 +65,7 @@ import java.util.Set; import java.util.StringTokenizer; import java.util.concurrent.TimeUnit; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; import org.forgerock.openam.ldap.LDAPRequests; import org.forgerock.openam.ldap.LDAPURL; diff --git a/openam-core/src/main/java/com/sun/identity/idm/plugins/internal/AgentsRepo.java b/openam-core/src/main/java/com/sun/identity/idm/plugins/internal/AgentsRepo.java index 4d7a673c1a..b3d7e53dfe 100644 --- a/openam-core/src/main/java/com/sun/identity/idm/plugins/internal/AgentsRepo.java +++ b/openam-core/src/main/java/com/sun/identity/idm/plugins/internal/AgentsRepo.java @@ -26,11 +26,11 @@ * * Portions Copyrighted 2012-2015 ForgeRock AS. * Portions Copyrighted 2012 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.idm.plugins.internal; -import static com.google.inject.name.Names.named; import static org.forgerock.json.JsonValue.field; import static org.forgerock.json.JsonValue.json; import static org.forgerock.json.JsonValue.object; @@ -46,7 +46,7 @@ import java.util.Map; import java.util.Set; -import javax.inject.Named; +import jakarta.inject.Named; import javax.security.auth.callback.Callback; import javax.security.auth.callback.NameCallback; import javax.security.auth.callback.PasswordCallback; @@ -88,7 +88,6 @@ import com.sun.identity.sm.ServiceSchemaManager; import org.forgerock.guice.core.InjectorHolder; -import org.forgerock.json.JsonValue; import org.forgerock.openam.ldap.LDAPUtils; import org.forgerock.openam.notifications.LocalOnly; import org.forgerock.openam.notifications.NotificationBroker; diff --git a/openam-core/src/main/java/com/sun/identity/idsvcs/IdentityServicesServlet.java b/openam-core/src/main/java/com/sun/identity/idsvcs/IdentityServicesServlet.java index 0db55e8431..b86bc92c4f 100644 --- a/openam-core/src/main/java/com/sun/identity/idsvcs/IdentityServicesServlet.java +++ b/openam-core/src/main/java/com/sun/identity/idsvcs/IdentityServicesServlet.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.idsvcs; @@ -37,11 +38,11 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; -import javax.servlet.ServletConfig; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Provides implementation for returning WSDL. diff --git a/openam-core/src/main/java/com/sun/identity/idsvcs/rest/IdentityServicesHandler.java b/openam-core/src/main/java/com/sun/identity/idsvcs/rest/IdentityServicesHandler.java index 8b4d875a8e..73503fb5fa 100644 --- a/openam-core/src/main/java/com/sun/identity/idsvcs/rest/IdentityServicesHandler.java +++ b/openam-core/src/main/java/com/sun/identity/idsvcs/rest/IdentityServicesHandler.java @@ -29,16 +29,17 @@ /* * Portions Copyrighted 2011-2015 ForgeRock AS. * Portions Copyrighted 2012 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.idsvcs.rest; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; @@ -89,7 +90,7 @@ public class IdentityServicesHandler extends HttpServlet { /** * Loads the init parameters for use in the HTTP methods. * - * @see javax.servlet.GenericServlet#init() + * @see jakarta.servlet.GenericServlet#init() */ public void init() throws ServletException { super.init(); @@ -114,7 +115,7 @@ public void init() throws ServletException { * Determines unmarshalls the request and executes the proper method based * on the request parameters. * - * @see javax.servlet.http.HttpServlet#service(HttpServletRequest request, + * @see jakarta.servlet.http.HttpServlet#service(HttpServletRequest request, * HttpServletResponse response) */ protected void service(HttpServletRequest request, diff --git a/openam-core/src/main/java/com/sun/identity/log/service/LogService.java b/openam-core/src/main/java/com/sun/identity/log/service/LogService.java index e0bfd98e93..90254987b4 100644 --- a/openam-core/src/main/java/com/sun/identity/log/service/LogService.java +++ b/openam-core/src/main/java/com/sun/identity/log/service/LogService.java @@ -25,6 +25,7 @@ * $Id: LogService.java,v 1.5 2009/12/15 18:00:14 bigfatrat Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.log.service; @@ -32,10 +33,10 @@ import java.io.ByteArrayInputStream; import java.net.InetAddress; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.ServletContext; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletContext; import com.iplanet.dpro.parser.WebtopParser; import com.iplanet.services.comm.server.RequestHandler; diff --git a/openam-core/src/main/java/com/sun/identity/monitoring/AgentShutdownServletContextListener.java b/openam-core/src/main/java/com/sun/identity/monitoring/AgentShutdownServletContextListener.java index 822933a161..af06ef55c4 100644 --- a/openam-core/src/main/java/com/sun/identity/monitoring/AgentShutdownServletContextListener.java +++ b/openam-core/src/main/java/com/sun/identity/monitoring/AgentShutdownServletContextListener.java @@ -24,12 +24,13 @@ * * $Id: AgentShutdownServletContextListener.java,v 1.1 2009/06/19 02:23:15 bigfatrat Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.monitoring; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; /** * The AgentShutdownServletContextListener class is used to diff --git a/openam-core/src/main/java/com/sun/identity/password/plugins/EmailPassword.java b/openam-core/src/main/java/com/sun/identity/password/plugins/EmailPassword.java index b061815aee..4802b88b84 100644 --- a/openam-core/src/main/java/com/sun/identity/password/plugins/EmailPassword.java +++ b/openam-core/src/main/java/com/sun/identity/password/plugins/EmailPassword.java @@ -27,6 +27,7 @@ */ /** * Portions Copyrighted 2013 ForgeRock, Inc. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.password.plugins; @@ -44,8 +45,8 @@ import java.util.Locale; import java.util.Set; import java.util.ResourceBundle; -import javax.mail.SendFailedException; -import javax.mail.MessagingException; +import jakarta.mail.SendFailedException; +import jakarta.mail.MessagingException; /** * EmailPassword defines a set of methods diff --git a/openam-core/src/main/java/com/sun/identity/password/ui/PWResetServlet.java b/openam-core/src/main/java/com/sun/identity/password/ui/PWResetServlet.java index 7467604336..4ad462b723 100644 --- a/openam-core/src/main/java/com/sun/identity/password/ui/PWResetServlet.java +++ b/openam-core/src/main/java/com/sun/identity/password/ui/PWResetServlet.java @@ -26,6 +26,7 @@ * * Portions Copyrighted 2012-2015 ForgeRock AS. * Portions Copyrighted 2012 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.password.ui; @@ -41,9 +42,9 @@ import com.sun.identity.shared.debug.Debug; import java.io.IOException; import java.io.UnsupportedEncodingException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpSession; /** * PWResetServlet is the controller Servlet for the diff --git a/openam-core/src/main/java/com/sun/identity/password/ui/PWResetUserValidationViewBean.java b/openam-core/src/main/java/com/sun/identity/password/ui/PWResetUserValidationViewBean.java index cfef9e8071..74d52a74f2 100644 --- a/openam-core/src/main/java/com/sun/identity/password/ui/PWResetUserValidationViewBean.java +++ b/openam-core/src/main/java/com/sun/identity/password/ui/PWResetUserValidationViewBean.java @@ -43,7 +43,7 @@ import com.sun.identity.password.ui.model.PWResetModel; import com.sun.identity.password.ui.model.PWResetUserValidationModel; import com.sun.identity.password.ui.model.PWResetUserValidationModelImpl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.shared.debug.Debug; import java.util.Hashtable; diff --git a/openam-core/src/main/java/com/sun/identity/password/ui/model/PWResetModelImpl.java b/openam-core/src/main/java/com/sun/identity/password/ui/model/PWResetModelImpl.java index b83c1069f5..0c06c13bf2 100644 --- a/openam-core/src/main/java/com/sun/identity/password/ui/model/PWResetModelImpl.java +++ b/openam-core/src/main/java/com/sun/identity/password/ui/model/PWResetModelImpl.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.password.ui.model; @@ -53,7 +54,7 @@ import java.util.MissingResourceException; import java.util.ResourceBundle; import java.util.Set; -import javax.mail.MessagingException; +import jakarta.mail.MessagingException; /** * PWResetModelImpl defines the basic and commonly used diff --git a/openam-core/src/main/java/com/sun/identity/policy/remote/PolicyRequestHandler.java b/openam-core/src/main/java/com/sun/identity/policy/remote/PolicyRequestHandler.java index 33bfdf97c7..5561e1decd 100644 --- a/openam-core/src/main/java/com/sun/identity/policy/remote/PolicyRequestHandler.java +++ b/openam-core/src/main/java/com/sun/identity/policy/remote/PolicyRequestHandler.java @@ -25,6 +25,7 @@ * $Id: PolicyRequestHandler.java,v 1.8 2008/12/04 00:38:52 dillidorai Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.policy.remote; @@ -70,9 +71,9 @@ import org.forgerock.openam.utils.CollectionUtils; import javax.security.auth.Subject; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.Collections; import java.util.HashMap; diff --git a/openam-core/src/main/java/com/sun/identity/policy/util/Gateway.java b/openam-core/src/main/java/com/sun/identity/policy/util/Gateway.java index 5d52034394..60f381e88b 100644 --- a/openam-core/src/main/java/com/sun/identity/policy/util/Gateway.java +++ b/openam-core/src/main/java/com/sun/identity/policy/util/Gateway.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted [2011] [ForgeRock AS] + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.policy.util; @@ -39,12 +40,12 @@ import java.util.Map; import java.util.Set; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.RequestDispatcher; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.sun.identity.shared.debug.Debug; import com.iplanet.am.util.SystemProperties; diff --git a/openam-core/src/main/java/com/sun/identity/session/util/SessionUtils.java b/openam-core/src/main/java/com/sun/identity/session/util/SessionUtils.java index 47dde473c8..c0a24c1601 100644 --- a/openam-core/src/main/java/com/sun/identity/session/util/SessionUtils.java +++ b/openam-core/src/main/java/com/sun/identity/session/util/SessionUtils.java @@ -26,6 +26,7 @@ * * Portions Copyrighted 2013-2015 ForgeRock AS. * Portions Copyrighted 2015 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.session.util; @@ -56,7 +57,7 @@ import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.utils.ClientUtils; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.net.InetAddress; import java.net.URL; import java.nio.charset.StandardCharsets; diff --git a/openam-core/src/main/java/com/sun/identity/setup/AMSetupFilter.java b/openam-core/src/main/java/com/sun/identity/setup/AMSetupFilter.java index 6c85fb9a9c..61890087d9 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/AMSetupFilter.java +++ b/openam-core/src/main/java/com/sun/identity/setup/AMSetupFilter.java @@ -25,6 +25,7 @@ * $Id: AMSetupFilter.java,v 1.12 2008/07/13 06:06:49 kevinserwin Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.setup; @@ -33,15 +34,15 @@ import java.text.DateFormat; import java.util.Collection; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.openam.utils.CollectionUtils; import org.forgerock.openam.utils.StringUtils; diff --git a/openam-core/src/main/java/com/sun/identity/setup/AMSetupManager.java b/openam-core/src/main/java/com/sun/identity/setup/AMSetupManager.java index c1e0cb8e99..8870db9a66 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/AMSetupManager.java +++ b/openam-core/src/main/java/com/sun/identity/setup/AMSetupManager.java @@ -12,15 +12,16 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.setup; import java.io.File; -import javax.inject.Inject; -import javax.inject.Singleton; -import javax.servlet.ServletContext; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import jakarta.servlet.ServletContext; import org.forgerock.openam.upgrade.VersionUtils; diff --git a/openam-core/src/main/java/com/sun/identity/setup/AMSetupServlet.java b/openam-core/src/main/java/com/sun/identity/setup/AMSetupServlet.java index 4cad12276b..42fe3107fa 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/AMSetupServlet.java +++ b/openam-core/src/main/java/com/sun/identity/setup/AMSetupServlet.java @@ -80,12 +80,12 @@ import javax.naming.directory.Attributes; import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext; -import javax.servlet.ServletConfig; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.forgerock.guice.core.InjectorHolder; diff --git a/openam-core/src/main/java/com/sun/identity/setup/AMSetupUtils.java b/openam-core/src/main/java/com/sun/identity/setup/AMSetupUtils.java index 6c364f3dc3..0a0db8a53f 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/AMSetupUtils.java +++ b/openam-core/src/main/java/com/sun/identity/setup/AMSetupUtils.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.setup; @@ -23,7 +24,7 @@ import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLHandshakeException; import javax.net.ssl.SSLSession; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; diff --git a/openam-core/src/main/java/com/sun/identity/setup/ConfiguratorPlugin.java b/openam-core/src/main/java/com/sun/identity/setup/ConfiguratorPlugin.java index c770602803..cb57267735 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/ConfiguratorPlugin.java +++ b/openam-core/src/main/java/com/sun/identity/setup/ConfiguratorPlugin.java @@ -24,12 +24,13 @@ * * $Id: ConfiguratorPlugin.java,v 1.4 2008/06/25 05:44:02 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.setup; import com.iplanet.sso.SSOToken; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; public interface ConfiguratorPlugin { /** diff --git a/openam-core/src/main/java/com/sun/identity/setup/ConfigureData.java b/openam-core/src/main/java/com/sun/identity/setup/ConfigureData.java index 42969a5185..f196885c03 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/ConfigureData.java +++ b/openam-core/src/main/java/com/sun/identity/setup/ConfigureData.java @@ -25,6 +25,7 @@ * $Id: ConfigureData.java,v 1.11 2009/05/02 23:05:13 kevinserwin Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.setup; @@ -34,7 +35,6 @@ import com.sun.identity.policy.PolicyException; import com.sun.identity.policy.PolicyManager; import com.sun.identity.policy.PolicyUtils; -import com.sun.identity.sm.DNMapper; import com.sun.identity.sm.OrganizationConfigManager; import com.sun.identity.sm.SMSException; import com.sun.identity.sm.SchemaType; @@ -51,7 +51,7 @@ import java.util.Map; import java.util.Set; import java.util.StringTokenizer; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; /** * Configures product bootstrap data. diff --git a/openam-core/src/main/java/com/sun/identity/setup/EmbeddedOpenDS.java b/openam-core/src/main/java/com/sun/identity/setup/EmbeddedOpenDS.java index 9204cdb7e5..851c7608d0 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/EmbeddedOpenDS.java +++ b/openam-core/src/main/java/com/sun/identity/setup/EmbeddedOpenDS.java @@ -65,7 +65,7 @@ import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; import com.google.common.io.ByteStreams; import org.forgerock.i18n.LocalizableMessage; diff --git a/openam-core/src/main/java/com/sun/identity/setup/HttpServletRequestWrapper.java b/openam-core/src/main/java/com/sun/identity/setup/HttpServletRequestWrapper.java index efa17fb2be..b2281db57c 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/HttpServletRequestWrapper.java +++ b/openam-core/src/main/java/com/sun/identity/setup/HttpServletRequestWrapper.java @@ -27,6 +27,7 @@ */ /** * Portions Copyrighted 2013 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.setup; @@ -34,7 +35,7 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; public class HttpServletRequestWrapper implements IHttpServletRequest { diff --git a/openam-core/src/main/java/com/sun/identity/setup/HttpServletResponseWrapper.java b/openam-core/src/main/java/com/sun/identity/setup/HttpServletResponseWrapper.java index bc22a48798..e318838dd5 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/HttpServletResponseWrapper.java +++ b/openam-core/src/main/java/com/sun/identity/setup/HttpServletResponseWrapper.java @@ -24,11 +24,12 @@ * * $Id: HttpServletResponseWrapper.java,v 1.2 2008/06/25 05:44:02 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.setup; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; public class HttpServletResponseWrapper implements IHttpServletResponse { diff --git a/openam-core/src/main/java/com/sun/identity/setup/LDIFTemplates.java b/openam-core/src/main/java/com/sun/identity/setup/LDIFTemplates.java index ff857577d5..db9be36d8e 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/LDIFTemplates.java +++ b/openam-core/src/main/java/com/sun/identity/setup/LDIFTemplates.java @@ -25,6 +25,7 @@ * $Id: LDIFTemplates.java,v 1.5 2009/10/27 05:33:39 hengming Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.setup; @@ -37,7 +38,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; /** * This utility class manages LDIF template files. diff --git a/openam-core/src/main/java/com/sun/identity/setup/ServiceXMLTemplates.java b/openam-core/src/main/java/com/sun/identity/setup/ServiceXMLTemplates.java index ec5f929985..119ce8d868 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/ServiceXMLTemplates.java +++ b/openam-core/src/main/java/com/sun/identity/setup/ServiceXMLTemplates.java @@ -25,6 +25,7 @@ * $Id: ServiceXMLTemplates.java,v 1.2 2009/05/02 23:07:18 kevinserwin Exp $ * * Portions Copyrighted 2011-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.setup; @@ -37,7 +38,7 @@ import java.io.InputStreamReader; import java.util.Iterator; import java.util.Set; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; /** * This utility class manages service XML template files. diff --git a/openam-core/src/main/java/com/sun/identity/setup/SetSetupProgress.java b/openam-core/src/main/java/com/sun/identity/setup/SetSetupProgress.java index 9cf13b9360..394908bd76 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/SetSetupProgress.java +++ b/openam-core/src/main/java/com/sun/identity/setup/SetSetupProgress.java @@ -28,6 +28,7 @@ /* * Portions Copyrighted 2011 ForgeRock AS + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.setup; @@ -35,10 +36,10 @@ import com.sun.identity.config.SetupWriter; import java.io.IOException; import java.io.PrintWriter; -import javax.servlet.*; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.*; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; public class SetSetupProgress extends HttpServlet { diff --git a/openam-core/src/main/java/com/sun/identity/setup/SystemStartupGuiceModule.java b/openam-core/src/main/java/com/sun/identity/setup/SystemStartupGuiceModule.java index 7c0c5336d3..3bcdcabd6e 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/SystemStartupGuiceModule.java +++ b/openam-core/src/main/java/com/sun/identity/setup/SystemStartupGuiceModule.java @@ -12,14 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.setup; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; import com.google.inject.PrivateModule; -import com.sun.identity.setup.AMSetupManager; /** * Root Guice module for the independent injector for system startup. diff --git a/openam-core/src/main/java/com/sun/identity/setup/SystemStartupInjectorHolder.java b/openam-core/src/main/java/com/sun/identity/setup/SystemStartupInjectorHolder.java index b2f9a251bf..b58f2087f4 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/SystemStartupInjectorHolder.java +++ b/openam-core/src/main/java/com/sun/identity/setup/SystemStartupInjectorHolder.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.setup; -import javax.servlet.FilterConfig; -import javax.servlet.ServletContextEvent; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletContextEvent; import com.google.inject.Injector; import com.google.inject.Key; diff --git a/openam-core/src/main/java/com/sun/identity/setup/SystemStartupInjectorListener.java b/openam-core/src/main/java/com/sun/identity/setup/SystemStartupInjectorListener.java index 0de75a201d..c780c393eb 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/SystemStartupInjectorListener.java +++ b/openam-core/src/main/java/com/sun/identity/setup/SystemStartupInjectorListener.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package com.sun.identity.setup; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; import com.google.inject.Guice; diff --git a/openam-core/src/main/java/com/sun/identity/setup/UserIdRepo.java b/openam-core/src/main/java/com/sun/identity/setup/UserIdRepo.java index 7475f9eaa6..5d207ab9da 100644 --- a/openam-core/src/main/java/com/sun/identity/setup/UserIdRepo.java +++ b/openam-core/src/main/java/com/sun/identity/setup/UserIdRepo.java @@ -25,6 +25,7 @@ * $Id: UserIdRepo.java,v 1.21 2009/12/23 00:22:34 goodearth Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.setup; @@ -38,7 +39,6 @@ import com.sun.identity.idm.IdConstants; import com.sun.identity.shared.Constants; import com.sun.identity.shared.StringUtils; -import com.sun.identity.shared.debug.Debug; import com.sun.identity.shared.xml.XMLUtils; import com.sun.identity.sm.AttributeSchema; import com.sun.identity.sm.OrganizationConfigManager; @@ -65,8 +65,8 @@ import java.util.Set; import java.util.StringTokenizer; import java.util.concurrent.TimeUnit; -import javax.net.ssl.SSLContext; -import javax.servlet.ServletContext; + +import jakarta.servlet.ServletContext; import org.forgerock.openam.ldap.LDAPRequests; import org.forgerock.openam.ldap.LDAPUtils; diff --git a/openam-core/src/main/java/com/sun/identity/sm/OrganizationConfigManager.java b/openam-core/src/main/java/com/sun/identity/sm/OrganizationConfigManager.java index 138d77e0d7..9196523969 100644 --- a/openam-core/src/main/java/com/sun/identity/sm/OrganizationConfigManager.java +++ b/openam-core/src/main/java/com/sun/identity/sm/OrganizationConfigManager.java @@ -25,13 +25,14 @@ * $Id: OrganizationConfigManager.java,v 1.31 2010/01/20 17:01:36 veiming Exp $ * * Portions Copyrighted 2011-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.sm; import static com.iplanet.ums.IUMSConstants.*; import static com.sun.identity.idm.IdConstants.*; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; @@ -49,12 +50,10 @@ import com.iplanet.am.util.SystemProperties; import com.iplanet.sso.SSOException; import com.iplanet.sso.SSOToken; -import com.iplanet.ums.IUMSConstants; import com.sun.identity.authentication.util.ISAuthConstants; import com.sun.identity.common.CaseInsensitiveHashSet; import com.sun.identity.delegation.DelegationException; import com.sun.identity.delegation.DelegationUtils; -import com.sun.identity.idm.IdConstants; import com.sun.identity.idm.IdRepoException; import com.sun.identity.idm.plugins.internal.AgentsRepo; import com.sun.identity.shared.Constants; diff --git a/openam-core/src/main/java/com/sun/identity/sm/SMServlet.java b/openam-core/src/main/java/com/sun/identity/sm/SMServlet.java index f3fcf121a8..616861d4c4 100644 --- a/openam-core/src/main/java/com/sun/identity/sm/SMServlet.java +++ b/openam-core/src/main/java/com/sun/identity/sm/SMServlet.java @@ -24,6 +24,7 @@ * * $Id: SMServlet.java,v 1.4 2008/06/25 05:44:05 qcheng Exp $ * + * Portions Copyrighted 2025 3A Systems LLC. */ package com.sun.identity.sm; @@ -31,10 +32,10 @@ import java.io.IOException; import java.io.PrintWriter; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.sun.identity.shared.debug.Debug; import com.iplanet.am.util.SystemProperties; diff --git a/openam-core/src/main/java/org/forgerock/openam/agent/TokenRestrictionResolver.java b/openam-core/src/main/java/org/forgerock/openam/agent/TokenRestrictionResolver.java index 5f6e850694..0a373bc96a 100644 --- a/openam-core/src/main/java/org/forgerock/openam/agent/TokenRestrictionResolver.java +++ b/openam-core/src/main/java/org/forgerock/openam/agent/TokenRestrictionResolver.java @@ -14,6 +14,7 @@ * Copyright 2016 ForgeRock AS. * Portions Copyrighted 2012 Open Source Solution Technology Corporation * Portions 2006 Sun Microsystems Inc. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.agent; @@ -29,7 +30,7 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.identity.idm.AMIdentityRepositoryFactory; import org.forgerock.openam.identity.idm.IdentityUtils; diff --git a/openam-core/src/main/java/org/forgerock/openam/auditors/RepoAuditor.java b/openam-core/src/main/java/org/forgerock/openam/auditors/RepoAuditor.java index a2feafbe44..49eaa540d6 100644 --- a/openam-core/src/main/java/org/forgerock/openam/auditors/RepoAuditor.java +++ b/openam-core/src/main/java/org/forgerock/openam/auditors/RepoAuditor.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Copyright 2019 3A-Systems LLC + * Portions copyright 2019-2025 3A Systems LLC. */ package org.forgerock.openam.auditors; @@ -23,14 +23,13 @@ import java.io.IOException; import java.util.Collections; -import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.TreeMap; import javax.annotation.Nullable; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.json.JsonValue; import org.forgerock.openam.audit.AMAuditEventBuilderUtils; @@ -45,7 +44,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.inject.assistedinject.Assisted; import com.iplanet.sso.SSOToken; -import com.sun.identity.common.CaseInsensitiveHashMap; import com.sun.identity.entitlement.opensso.SubjectUtils; import com.sun.identity.shared.debug.Debug; diff --git a/openam-core/src/main/java/org/forgerock/openam/auditors/SMSAuditor.java b/openam-core/src/main/java/org/forgerock/openam/auditors/SMSAuditor.java index ffb87bad6c..ff7c0fddc0 100644 --- a/openam-core/src/main/java/org/forgerock/openam/auditors/SMSAuditor.java +++ b/openam-core/src/main/java/org/forgerock/openam/auditors/SMSAuditor.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.auditors; @@ -21,7 +22,7 @@ import com.sun.identity.common.CaseInsensitiveHashMap; import com.sun.identity.shared.debug.Debug; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.audit.AuditConstants; import org.forgerock.openam.audit.AuditEventFactory; @@ -31,7 +32,7 @@ import org.forgerock.opendj.ldap.RDN; import javax.annotation.Nullable; -import javax.inject.Named; +import jakarta.inject.Named; import javax.naming.NamingException; import javax.naming.directory.Attribute; import javax.naming.directory.DirContext; diff --git a/openam-core/src/main/java/org/forgerock/openam/authentication/service/AuthSessionFactory.java b/openam-core/src/main/java/org/forgerock/openam/authentication/service/AuthSessionFactory.java index eea1423e5c..32b70aec10 100644 --- a/openam-core/src/main/java/org/forgerock/openam/authentication/service/AuthSessionFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/authentication/service/AuthSessionFactory.java @@ -12,14 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. - * Portions Copyrighted 2024 3A Systems LLC + * Portions Copyrighted 2024-2025 3A Systems LLC */ package org.forgerock.openam.authentication.service; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.openam.session.SessionConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/authentication/service/AuthUtilsWrapper.java b/openam-core/src/main/java/org/forgerock/openam/authentication/service/AuthUtilsWrapper.java index 2a687c3c47..8a18d64b86 100644 --- a/openam-core/src/main/java/org/forgerock/openam/authentication/service/AuthUtilsWrapper.java +++ b/openam-core/src/main/java/org/forgerock/openam/authentication/service/AuthUtilsWrapper.java @@ -12,6 +12,7 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.service; @@ -20,8 +21,8 @@ import com.sun.identity.authentication.service.AuthUtils; import com.sun.identity.authentication.spi.AMPostAuthProcessInterface; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * Wrapper class around AuthUtils to facilitate testing. diff --git a/openam-core/src/main/java/org/forgerock/openam/authentication/service/JAASModuleDetector.java b/openam-core/src/main/java/org/forgerock/openam/authentication/service/JAASModuleDetector.java index 125c3390cb..f34c243761 100644 --- a/openam-core/src/main/java/org/forgerock/openam/authentication/service/JAASModuleDetector.java +++ b/openam-core/src/main/java/org/forgerock/openam/authentication/service/JAASModuleDetector.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.service; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import javax.security.auth.login.AppConfigurationEntry; import javax.security.auth.login.Configuration; diff --git a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteCookie.java b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteCookie.java index bf29afb0e3..5d8a7d7fdd 100644 --- a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteCookie.java +++ b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteCookie.java @@ -21,12 +21,13 @@ * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.service.protocol; import java.io.Serializable; -import javax.servlet.http.Cookie; +import jakarta.servlet.http.Cookie; /** * Encapsulates a Cookie making it Serializable. diff --git a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteHttpServletRequest.java b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteHttpServletRequest.java index bbbd1a2324..c077334234 100644 --- a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteHttpServletRequest.java +++ b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteHttpServletRequest.java @@ -21,6 +21,7 @@ * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.service.protocol; @@ -37,13 +38,14 @@ import java.util.Map; import java.util.Set; import java.util.Vector; -import javax.servlet.ServletException; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; -import javax.servlet.http.HttpUpgradeHandler; -import javax.servlet.http.Part; + +import jakarta.servlet.ServletException; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; +import jakarta.servlet.http.HttpUpgradeHandler; +import jakarta.servlet.http.Part; /** * This class encapsulates a HttpServletRequest extending from RemoteServletRequest. @@ -51,6 +53,7 @@ * content handled sensibly. */ public class RemoteHttpServletRequest extends RemoteServletRequest implements HttpServletRequest, Serializable { + public static final long serialVersionUID = 42L; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteHttpServletResponse.java b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteHttpServletResponse.java index 2393408fbe..e611668f90 100644 --- a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteHttpServletResponse.java +++ b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteHttpServletResponse.java @@ -21,6 +21,7 @@ * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.service.protocol; @@ -35,8 +36,8 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.openam.utils.CollectionUtils; /** @@ -135,23 +136,23 @@ public String encodeRedirectURL(String url) { /** * The default behavior of this method is to call encodeUrl(String url) * on the wrapped response object. Not Serialized. - * + * * @return The encoded URL, null if unavailable. */ public String encodeUrl(String url) { return this._getHttpServletResponse() != null ? this._getHttpServletResponse().encodeUrl(url) : null; } - + /** * The default behavior of this method is to return encodeRedirectUrl(String url) * on the wrapped response object. Not Serialized. - * + * * @return The encoded redirect URL, null if not available. */ public String encodeRedirectUrl(String url) { return this._getHttpServletResponse() != null ? this._getHttpServletResponse().encodeRedirectUrl(url) : null; } - + /** * The default behavior of this method is to call sendError(int sc, String msg) * on the wrapped response object. Not serialized. @@ -345,7 +346,7 @@ public void setStatus(int sc) { /** * The default behavior of this method is to call setStatus(int sc, String sm) * on the wrapped response object. Not Serialized. - * + * * @param sc The status code of the response */ public void setStatus(int sc, String sm) { diff --git a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteServletRequest.java b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteServletRequest.java index 36b72a0f05..a65b25bfcd 100644 --- a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteServletRequest.java +++ b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteServletRequest.java @@ -21,6 +21,7 @@ * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.service.protocol; @@ -36,13 +37,13 @@ import java.util.Map; import java.util.Set; import java.util.Vector; -import javax.servlet.AsyncContext; -import javax.servlet.DispatcherType; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletContext; -import javax.servlet.ServletInputStream; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; +import jakarta.servlet.AsyncContext; +import jakarta.servlet.DispatcherType; +import jakarta.servlet.RequestDispatcher; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletInputStream; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; /** * This class encapsulates a ServletRequest allowing its state to be serialized. @@ -536,17 +537,17 @@ public boolean isSecure() { public RequestDispatcher getRequestDispatcher(String path) { return request != null ? this.request.getRequestDispatcher(path) : null; } - + /** * The default behavior of this method is to return getRealPath(String path) * on the wrapped request object. Not serialized, null post serialization. - * + * * @return The real path of the request. */ public String getRealPath(String path) { return request != null ? this.request.getRealPath(path) : null; - } - + } + /** * Tests if an object implements the java.io.Serializable interface. * diff --git a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteServletResponse.java b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteServletResponse.java index 2cfb56d05e..d7a5505533 100644 --- a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteServletResponse.java +++ b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteServletResponse.java @@ -21,6 +21,7 @@ * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.service.protocol; @@ -30,8 +31,8 @@ import java.io.Serializable; import java.util.Locale; -import javax.servlet.ServletOutputStream; -import javax.servlet.ServletResponse; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.ServletResponse; /** * Encapsulates the transferable state of a ServletResponse object. diff --git a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteSession.java b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteSession.java index ef213aea80..d4258ebe0a 100644 --- a/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteSession.java +++ b/openam-core/src/main/java/org/forgerock/openam/authentication/service/protocol/RemoteSession.java @@ -21,6 +21,7 @@ * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.authentication.service.protocol; @@ -36,10 +37,9 @@ import java.util.Set; import java.util.Vector; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpSession; -import javax.servlet.http.HttpSessionContext; - +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSessionContext; /** * Facade for the standard servlet HttpSession object. diff --git a/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/header/CCHtmlHeaderTag.java b/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/header/CCHtmlHeaderTag.java index b669398300..fc669bd7ab 100644 --- a/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/header/CCHtmlHeaderTag.java +++ b/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/header/CCHtmlHeaderTag.java @@ -21,15 +21,17 @@ * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * + * Portions Copyrighted 2025 3A Systems LLC. */ + package org.forgerock.openam.console.ui.taglib.header; import com.iplanet.am.util.SystemProperties; import com.iplanet.jato.view.View; import com.sun.identity.shared.Constants; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.PageContext; -import javax.servlet.jsp.tagext.Tag; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.Tag; import org.forgerock.openam.utils.StringUtils; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/masthead/CCPrimaryMastheadTag.java b/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/masthead/CCPrimaryMastheadTag.java index 8fcff5db2a..ee95127408 100644 --- a/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/masthead/CCPrimaryMastheadTag.java +++ b/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/masthead/CCPrimaryMastheadTag.java @@ -21,14 +21,14 @@ * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * - * Portions Copyrighted 2024 3A Systems LLC + * Portions Copyrighted 2024-2025 3A Systems LLC */ package org.forgerock.openam.console.ui.taglib.masthead; import com.iplanet.am.util.SystemProperties; import com.iplanet.jato.util.NonSyncStringBuffer; import com.sun.identity.shared.Constants; -import javax.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspException; /** * diff --git a/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/propertysheet/CCPropertySheetTag.java b/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/propertysheet/CCPropertySheetTag.java index dc5bc25fca..349c7e2c86 100644 --- a/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/propertysheet/CCPropertySheetTag.java +++ b/openam-core/src/main/java/org/forgerock/openam/console/ui/taglib/propertysheet/CCPropertySheetTag.java @@ -25,6 +25,7 @@ /** * Portions Copyrighted 2012 Open Source Solution Technology Corporation + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.console.ui.taglib.propertysheet; @@ -47,9 +48,9 @@ import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.tagext.BodyContent; -import javax.servlet.jsp.tagext.BodyTag; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTag; import org.w3c.dom.Node; import org.w3c.dom.NodeList; diff --git a/openam-core/src/main/java/org/forgerock/openam/core/CoreServicesWrapper.java b/openam-core/src/main/java/org/forgerock/openam/core/CoreServicesWrapper.java index 423f089b5e..4f7bc1c83d 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/CoreServicesWrapper.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/CoreServicesWrapper.java @@ -12,14 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.security.AccessController; -import java.util.Hashtable; import java.util.Map; import java.util.Set; @@ -39,7 +39,6 @@ import com.sun.identity.sm.DNMapper; import com.sun.identity.sm.SMSException; import com.sun.identity.sm.ServiceConfigManager; -import org.forgerock.openam.core.realms.Realm; /** * A wrapper class around core static class and methods. @@ -53,7 +52,7 @@ public class CoreServicesWrapper { * Gets the Session Id from the HttpServletRequest. * * {@link com.sun.identity.authentication.service.AuthUtils#getSessionIDFromRequest( - * javax.servlet.http.HttpServletRequest)} + * jakarta.servlet.http.HttpServletRequest)} * * @param request The HttpServletRequest. * @return The SessionID from the request. @@ -65,7 +64,7 @@ public SessionID getSessionIDFromRequest(HttpServletRequest request) { /** * Gets the environment map from a HttpServletRequest. * - * {@link com.sun.identity.authentication.client.AuthClientUtils#getEnvMap(javax.servlet.http.HttpServletRequest)} + * {@link com.sun.identity.authentication.client.AuthClientUtils#getEnvMap(jakarta.servlet.http.HttpServletRequest)} * * @param request The HttpServletRequest. * @return The environment map. diff --git a/openam-core/src/main/java/org/forgerock/openam/core/CoreWrapper.java b/openam-core/src/main/java/org/forgerock/openam/core/CoreWrapper.java index 329433d6cb..39f8b618cb 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/CoreWrapper.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/CoreWrapper.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core; @@ -20,7 +21,7 @@ import java.util.Collection; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.iplanet.sso.SSOException; import com.iplanet.sso.SSOToken; diff --git a/openam-core/src/main/java/org/forgerock/openam/core/guice/CTSObjectMapperProvider.java b/openam-core/src/main/java/org/forgerock/openam/core/guice/CTSObjectMapperProvider.java index 964cac3c7c..7d78f08673 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/guice/CTSObjectMapperProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/guice/CTSObjectMapperProvider.java @@ -13,6 +13,7 @@ * * Copyright 2013-2016 ForgeRock AS. * Portions Copyrighted 2015 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.guice; @@ -21,11 +22,10 @@ import java.util.HashSet; import java.util.Set; -import javax.inject.Provider; +import jakarta.inject.Provider; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.Version; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; diff --git a/openam-core/src/main/java/org/forgerock/openam/core/guice/CoreGuiceModule.java b/openam-core/src/main/java/org/forgerock/openam/core/guice/CoreGuiceModule.java index bccb2ead77..f42534487c 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/guice/CoreGuiceModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/guice/CoreGuiceModule.java @@ -13,6 +13,7 @@ * * Copyright 2013-2016 ForgeRock AS. * Portions Copyrighted 2015 Nomura Research Institute, Ltd. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.guice; @@ -24,10 +25,10 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; -import javax.servlet.ServletContext; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; +import jakarta.servlet.ServletContext; import org.forgerock.guice.core.GuiceModule; import org.forgerock.guice.core.InjectorHolder; diff --git a/openam-core/src/main/java/org/forgerock/openam/core/guice/DataLayerGuiceModule.java b/openam-core/src/main/java/org/forgerock/openam/core/guice/DataLayerGuiceModule.java index 40b272ef4d..f8ef72eda0 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/guice/DataLayerGuiceModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/guice/DataLayerGuiceModule.java @@ -12,15 +12,16 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.guice; import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.guice.core.GuiceModule; import org.forgerock.guice.core.InjectorHolder; diff --git a/openam-core/src/main/java/org/forgerock/openam/core/guice/OpenAMServletContextListener.java b/openam-core/src/main/java/org/forgerock/openam/core/guice/OpenAMServletContextListener.java index 4369542c4a..1af4fb30b7 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/guice/OpenAMServletContextListener.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/guice/OpenAMServletContextListener.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. +* Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.guice; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; /** * Stores the ServletContext into the ServletContextCache for reference diff --git a/openam-core/src/main/java/org/forgerock/openam/core/guice/ServletContextCache.java b/openam-core/src/main/java/org/forgerock/openam/core/guice/ServletContextCache.java index 12e5e932ff..23d461d9a7 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/guice/ServletContextCache.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/guice/ServletContextCache.java @@ -12,10 +12,11 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. +* Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.guice; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; /** * Captures our ServletContext via a ServetContextListener. diff --git a/openam-core/src/main/java/org/forgerock/openam/core/realms/CachingRealmLookup.java b/openam-core/src/main/java/org/forgerock/openam/core/realms/CachingRealmLookup.java index de2db099d4..92ba45c83d 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/realms/CachingRealmLookup.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/realms/CachingRealmLookup.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.realms; -import javax.inject.Provider; -import javax.inject.Singleton; +import jakarta.inject.Provider; +import jakarta.inject.Singleton; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/openam-core/src/main/java/org/forgerock/openam/core/realms/DefaultRealmLookup.java b/openam-core/src/main/java/org/forgerock/openam/core/realms/DefaultRealmLookup.java index 62fa010d46..83ff76d7df 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/realms/DefaultRealmLookup.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/realms/DefaultRealmLookup.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.realms; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Provider; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Provider; +import jakarta.inject.Singleton; import java.util.Collections; import java.util.Map; import java.util.Set; diff --git a/openam-core/src/main/java/org/forgerock/openam/core/realms/Realm.java b/openam-core/src/main/java/org/forgerock/openam/core/realms/Realm.java index c7f2b3b9d7..17c4e2d796 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/realms/Realm.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/realms/Realm.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.core.realms; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.core.CoreWrapper; import org.forgerock.util.Reject; diff --git a/openam-core/src/main/java/org/forgerock/openam/core/realms/RealmGuiceModule.java b/openam-core/src/main/java/org/forgerock/openam/core/realms/RealmGuiceModule.java index babb8a4e3e..6903ed8e8a 100644 --- a/openam-core/src/main/java/org/forgerock/openam/core/realms/RealmGuiceModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/core/realms/RealmGuiceModule.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.core.realms; -import javax.inject.Named; -import javax.inject.Provider; -import javax.inject.Singleton; +import jakarta.inject.Named; +import jakarta.inject.Provider; +import jakarta.inject.Singleton; import java.security.AccessController; import java.security.PrivilegedAction; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/CTSPersistentStoreImpl.java b/openam-core/src/main/java/org/forgerock/openam/cts/CTSPersistentStoreImpl.java index c0c5bacca5..c7e01c8fb2 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/CTSPersistentStoreImpl.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/CTSPersistentStoreImpl.java @@ -12,12 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2012-2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collection; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/CoreTokenServiceGuiceModule.java b/openam-core/src/main/java/org/forgerock/openam/cts/CoreTokenServiceGuiceModule.java index 4b17b42a9a..20177bd514 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/CoreTokenServiceGuiceModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/CoreTokenServiceGuiceModule.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts; @@ -19,9 +20,9 @@ import java.util.Map; import java.util.concurrent.ExecutorService; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.guice.core.GuiceModule; import org.forgerock.openam.audit.context.AMExecutorServiceFactory; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/adapters/JavaBeanAdapter.java b/openam-core/src/main/java/org/forgerock/openam/cts/adapters/JavaBeanAdapter.java index 55ae5ac0db..81f9887983 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/adapters/JavaBeanAdapter.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/adapters/JavaBeanAdapter.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.adapters; @@ -29,7 +30,7 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.cts.api.filter.TokenFilter; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/adapters/OAuthAdapter.java b/openam-core/src/main/java/org/forgerock/openam/cts/adapters/OAuthAdapter.java index 0ec5878282..708bb8a8e0 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/adapters/OAuthAdapter.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/adapters/OAuthAdapter.java @@ -12,15 +12,15 @@ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions copyright [year] [name of copyright owner]". + * + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.cts.adapters; import java.util.Collection; -import java.util.HashSet; -import java.util.List; import java.util.Map; -import java.util.Set; -import javax.inject.Inject; + +import jakarta.inject.Inject; import org.forgerock.json.JsonValue; import org.forgerock.openam.cts.api.fields.OAuthTokenField; import org.forgerock.openam.cts.api.tokens.Token; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/adapters/SAMLAdapter.java b/openam-core/src/main/java/org/forgerock/openam/cts/adapters/SAMLAdapter.java index a8c6115755..6fc2175fb5 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/adapters/SAMLAdapter.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/adapters/SAMLAdapter.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.adapters; import java.text.MessageFormat; import java.util.Calendar; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.cts.api.CoreTokenConstants; import org.forgerock.openam.cts.api.fields.SAMLTokenField; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/adapters/SessionAdapter.java b/openam-core/src/main/java/org/forgerock/openam/cts/adapters/SessionAdapter.java index d4cce655d8..ca829641cf 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/adapters/SessionAdapter.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/adapters/SessionAdapter.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.adapters; @@ -22,7 +23,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.core.DNWrapper; import org.forgerock.openam.cts.CoreTokenConfig; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/api/tokens/TokenIdFactory.java b/openam-core/src/main/java/org/forgerock/openam/cts/api/tokens/TokenIdFactory.java index 0cde795597..5c59d936d8 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/api/tokens/TokenIdFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/api/tokens/TokenIdFactory.java @@ -12,10 +12,11 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.api.tokens; -import javax.inject.Inject; +import jakarta.inject.Inject; import com.iplanet.dpro.session.SessionID; import com.iplanet.dpro.session.service.InternalSession; import org.forgerock.openam.cts.api.fields.OAuthTokenField; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/CTSAsyncConnectionModule.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/CTSAsyncConnectionModule.java index 7c54b0e028..3ba5e2b22a 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/CTSAsyncConnectionModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/CTSAsyncConnectionModule.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl; import java.util.concurrent.ExecutorService; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.cts.api.CoreTokenConstants; import org.forgerock.openam.cts.impl.queue.config.CTSQueueConfiguration; @@ -51,7 +52,7 @@ protected void configureTaskExecutor(PrivateBinder binder) { } @Override - protected Class> getConnectionFactoryProviderType() { + protected Class> getConnectionFactoryProviderType() { return CTSConnectionFactoryProvider.class; } diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/CTSDataLayerConfiguration.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/CTSDataLayerConfiguration.java index 9cb22b2d44..d47f22f21f 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/CTSDataLayerConfiguration.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/CTSDataLayerConfiguration.java @@ -12,13 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.lang3.StringUtils; import org.forgerock.openam.cts.api.CoreTokenConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/CoreTokenAdapter.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/CoreTokenAdapter.java index 8a66a04963..10a508ccf3 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/CoreTokenAdapter.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/CoreTokenAdapter.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collection; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/LDAPConfig.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/LDAPConfig.java index 99ef58561e..e1f1c47bc3 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/LDAPConfig.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/LDAPConfig.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. - * Portions Copyrighted 2020-2025 3A Systems, LLC. + * Portions copyright 2020-2025 3A Systems, LLC. */ package org.forgerock.openam.cts.impl; @@ -24,8 +24,8 @@ import org.forgerock.opendj.ldap.DN; import org.forgerock.util.annotations.VisibleForTesting; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; /** * Responsible for storing the configuration required by the LDAP implementation of the diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/LdapAdapter.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/LdapAdapter.java index 856638cd4a..d4d9d08699 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/LdapAdapter.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/LdapAdapter.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl; @@ -23,7 +24,7 @@ import java.util.Collections; import java.util.Map; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.audit.context.AuditRequestContext; import org.forgerock.openam.cts.api.filter.TokenFilter; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/CTSWorkerPastExpiryDateQuery.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/CTSWorkerPastExpiryDateQuery.java index 434ef114c2..f64b9e99c9 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/CTSWorkerPastExpiryDateQuery.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/CTSWorkerPastExpiryDateQuery.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl.query.worker.queries; @@ -25,7 +26,7 @@ import org.forgerock.util.Reject; import org.forgerock.util.query.QueryFilter; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.Calendar; import static org.forgerock.openam.sm.datalayer.api.ConnectionType.CTS_EXPIRY_DATE_WORKER; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/MaxSessionTimeExpiredQuery.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/MaxSessionTimeExpiredQuery.java index 965d9dae82..85c16b3353 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/MaxSessionTimeExpiredQuery.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/MaxSessionTimeExpiredQuery.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. - * Portions Copyrighted 2023 3A Systems LLC. + * Portions Copyrighted 2023-2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl.query.worker.queries; @@ -23,7 +23,7 @@ import java.util.Calendar; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.cts.CoreTokenConfig; import org.forgerock.openam.cts.api.fields.SessionTokenField; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/SessionIdleTimeExpiredQuery.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/SessionIdleTimeExpiredQuery.java index c5003e0bd6..1586bfa7a4 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/SessionIdleTimeExpiredQuery.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/query/worker/queries/SessionIdleTimeExpiredQuery.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. - * Portions Copyrighted 2023 3A Systems LLC. + * Portions Copyrighted 2023-2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl.query.worker.queries; @@ -23,7 +23,7 @@ import java.util.Calendar; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.cts.CoreTokenConfig; import org.forgerock.openam.cts.api.fields.SessionTokenField; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/AsyncResultHandlerFactory.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/AsyncResultHandlerFactory.java index d0b7c946bd..eec892ad37 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/AsyncResultHandlerFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/AsyncResultHandlerFactory.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl.queue; import com.sun.identity.shared.debug.Debug; import java.util.Collection; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.cts.api.CoreTokenConstants; import org.forgerock.openam.cts.api.tokens.Token; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/DeleteOnQueryResultHandler.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/DeleteOnQueryResultHandler.java index 1f51ae606a..f5a43b0b0c 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/DeleteOnQueryResultHandler.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/DeleteOnQueryResultHandler.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl.queue; import com.google.inject.name.Named; import com.sun.identity.shared.debug.Debug; import java.util.Collection; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.cts.api.CoreTokenConstants; import org.forgerock.openam.sm.datalayer.api.ResultHandler; import org.forgerock.openam.tokens.CoreTokenField; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/TaskDispatcher.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/TaskDispatcher.java index e7e64964b6..2f78023c08 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/TaskDispatcher.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/TaskDispatcher.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl.queue; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import java.util.Collection; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/config/CTSQueueConfiguration.java b/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/config/CTSQueueConfiguration.java index cf66702ffc..0908b18b3e 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/config/CTSQueueConfiguration.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/impl/queue/config/CTSQueueConfiguration.java @@ -12,13 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.impl.queue.config; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; -import java.text.MessageFormat; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import com.iplanet.am.util.SystemProperties; import com.sun.identity.shared.debug.Debug; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/CTSMonitoringStoreImpl.java b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/CTSMonitoringStoreImpl.java index ed0da87d66..8a516a1f72 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/CTSMonitoringStoreImpl.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/CTSMonitoringStoreImpl.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.monitoring.impl; @@ -28,9 +29,9 @@ import org.forgerock.openam.cts.monitoring.impl.operations.TokenOperationsStore; import org.forgerock.openam.cts.monitoring.impl.reaper.ReaperMonitor; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.RejectedExecutionException; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/connections/ConnectionStore.java b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/connections/ConnectionStore.java index be9fbbe473..fe46b54305 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/connections/ConnectionStore.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/connections/ConnectionStore.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.monitoring.impl.connections; -import javax.inject.Inject; +import jakarta.inject.Inject; /** * A data structure that stores the cumulative count and rate for CTS connections. diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/operations/TokenOperationsStore.java b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/operations/TokenOperationsStore.java index e58c8172d5..fe73f074b5 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/operations/TokenOperationsStore.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/operations/TokenOperationsStore.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.monitoring.impl.operations; @@ -19,7 +20,7 @@ import org.forgerock.openam.cts.CTSOperation; import org.forgerock.openam.tokens.TokenType; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import java.util.HashMap; import java.util.Map; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/persistence/CtsPersistenceOperationsDelegate.java b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/persistence/CtsPersistenceOperationsDelegate.java index 01fb224b6e..93084e38cd 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/persistence/CtsPersistenceOperationsDelegate.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/persistence/CtsPersistenceOperationsDelegate.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.monitoring.impl.persistence; @@ -24,7 +25,7 @@ import org.forgerock.openam.sm.datalayer.api.query.PartialToken; import org.forgerock.openam.utils.TimeUtils; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.ArrayList; import java.util.Calendar; import java.util.Collection; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/persistence/CtsPersistenceOperationsMonitor.java b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/persistence/CtsPersistenceOperationsMonitor.java index f5d0962364..45e3a3bc0b 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/persistence/CtsPersistenceOperationsMonitor.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/persistence/CtsPersistenceOperationsMonitor.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.monitoring.impl.persistence; import org.forgerock.openam.tokens.TokenType; import org.forgerock.openam.cts.exceptions.CoreTokenException; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.Collection; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/queue/MonitoredResultHandlerFactory.java b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/queue/MonitoredResultHandlerFactory.java index 61203353d7..8abb485b55 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/queue/MonitoredResultHandlerFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/monitoring/impl/queue/MonitoredResultHandlerFactory.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.monitoring.impl.queue; @@ -24,7 +25,7 @@ import org.forgerock.openam.cts.impl.queue.ResultHandlerFactory; import org.forgerock.openam.cts.monitoring.CTSOperationsMonitoringStore; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.Collection; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/utils/JSONSerialisation.java b/openam-core/src/main/java/org/forgerock/openam/cts/utils/JSONSerialisation.java index a12a64cb5d..196c05b3e6 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/utils/JSONSerialisation.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/utils/JSONSerialisation.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.utils; import java.io.IOException; import java.text.MessageFormat; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.cts.api.CoreTokenConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/utils/LdapTokenAttributeConversion.java b/openam-core/src/main/java/org/forgerock/openam/cts/utils/LdapTokenAttributeConversion.java index c442d967ae..88b60d0367 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/utils/LdapTokenAttributeConversion.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/utils/LdapTokenAttributeConversion.java @@ -21,7 +21,7 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.cts.api.CoreTokenConstants; import org.forgerock.openam.cts.api.fields.CoreTokenFieldTypes; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/TokenBlobStrategy.java b/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/TokenBlobStrategy.java index 54a1538234..bbd0367149 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/TokenBlobStrategy.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/TokenBlobStrategy.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2014 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.utils.blob; import org.forgerock.openam.cts.CoreTokenConfig; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/TokenStrategyFactory.java b/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/TokenStrategyFactory.java index a80e9c2e86..7ebbe45442 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/TokenStrategyFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/TokenStrategyFactory.java @@ -12,10 +12,12 @@ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions copyright [year] [name of copyright owner]". + * + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.utils.blob; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.cts.CoreTokenConfig; import org.forgerock.openam.cts.utils.blob.strategies.AttributeCompressionStrategy; import org.forgerock.openam.cts.utils.blob.strategies.CompressionStrategy; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/strategies/AttributeCompressionStrategy.java b/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/strategies/AttributeCompressionStrategy.java index 679fd608ef..58dfd22768 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/strategies/AttributeCompressionStrategy.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/strategies/AttributeCompressionStrategy.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2014 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.utils.blob.strategies; @@ -24,7 +25,7 @@ import org.forgerock.openam.cts.utils.blob.TokenStrategyFailedException; import org.forgerock.util.Reject; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.io.UnsupportedEncodingException; import java.lang.reflect.Field; import java.lang.reflect.Modifier; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/strategies/EncryptionStrategy.java b/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/strategies/EncryptionStrategy.java index 9e830cfb97..46a852f2d8 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/strategies/EncryptionStrategy.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/utils/blob/strategies/EncryptionStrategy.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.utils.blob.strategies; @@ -25,7 +26,7 @@ import org.forgerock.util.Reject; import javax.annotation.concurrent.ThreadSafe; -import javax.inject.Inject; +import jakarta.inject.Inject; import java.security.AccessController; import java.security.PrivilegedActionException; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/CTSWorkerDeleteProcess.java b/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/CTSWorkerDeleteProcess.java index b2a56f73eb..501fae030b 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/CTSWorkerDeleteProcess.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/CTSWorkerDeleteProcess.java @@ -12,15 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.worker.process; import java.util.Collection; import java.util.concurrent.CountDownLatch; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.lang3.time.StopWatch; import org.forgerock.openam.cts.api.CoreTokenConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/CTSWorkerProcessGuiceModule.java b/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/CTSWorkerProcessGuiceModule.java index bc72af5e60..7c6a968b2b 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/CTSWorkerProcessGuiceModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/CTSWorkerProcessGuiceModule.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.worker.process; @@ -19,8 +20,8 @@ import static org.forgerock.openam.session.SessionEventType.IDLE_TIMEOUT; import static org.forgerock.openam.session.SessionEventType.MAX_TIMEOUT; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import com.google.inject.AbstractModule; import com.google.inject.Provides; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/MaxSessionTimeExpiredProcess.java b/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/MaxSessionTimeExpiredProcess.java index ecd5b491fb..f7bcdfe2e7 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/MaxSessionTimeExpiredProcess.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/MaxSessionTimeExpiredProcess.java @@ -12,15 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.worker.process; import java.util.Collection; import java.util.concurrent.CountDownLatch; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.lang3.time.StopWatch; import org.forgerock.openam.cts.api.CoreTokenConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/SessionExpiryBatchHandler.java b/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/SessionExpiryBatchHandler.java index 796d1d994f..13a2c08af0 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/SessionExpiryBatchHandler.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/SessionExpiryBatchHandler.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.worker.process; @@ -21,8 +22,8 @@ import java.util.Collection; import java.util.concurrent.CountDownLatch; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import com.google.inject.Module; import org.forgerock.openam.cts.adapters.SessionAdapter; diff --git a/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/SessionIdleTimeExpiredProcess.java b/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/SessionIdleTimeExpiredProcess.java index d47a2e11aa..616c8a0791 100644 --- a/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/SessionIdleTimeExpiredProcess.java +++ b/openam-core/src/main/java/org/forgerock/openam/cts/worker/process/SessionIdleTimeExpiredProcess.java @@ -12,15 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.cts.worker.process; import java.util.Collection; import java.util.concurrent.CountDownLatch; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.lang3.time.StopWatch; import org.forgerock.openam.cts.api.CoreTokenConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/dpro/session/PartialSessionFactory.java b/openam-core/src/main/java/org/forgerock/openam/dpro/session/PartialSessionFactory.java index b38a46dc91..fc446162dc 100644 --- a/openam-core/src/main/java/org/forgerock/openam/dpro/session/PartialSessionFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/dpro/session/PartialSessionFactory.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.dpro.session; @@ -19,9 +20,9 @@ import java.util.Calendar; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.openam.core.DNWrapper; import org.forgerock.openam.cts.api.fields.SessionTokenField; diff --git a/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/EvaluationMonitoringStore.java b/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/EvaluationMonitoringStore.java index 76f3656567..3d70200970 100644 --- a/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/EvaluationMonitoringStore.java +++ b/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/EvaluationMonitoringStore.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2014 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.entitlement.monitoring; import java.util.concurrent.atomic.AtomicLong; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.shared.monitoring.RateTimer; import org.forgerock.openam.shared.monitoring.RateWindow; diff --git a/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/EvaluationTimingStore.java b/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/EvaluationTimingStore.java index 2298f23689..073fe68e51 100644 --- a/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/EvaluationTimingStore.java +++ b/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/EvaluationTimingStore.java @@ -12,10 +12,11 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.entitlement.monitoring; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/InternalEvaluationTimingStore.java b/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/InternalEvaluationTimingStore.java index 5c8b97a3b0..a28d5b3be8 100644 --- a/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/InternalEvaluationTimingStore.java +++ b/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/InternalEvaluationTimingStore.java @@ -12,10 +12,11 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.entitlement.monitoring; -import javax.inject.Inject; +import jakarta.inject.Inject; import javax.security.auth.Subject; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/PolicyMonitorImpl.java b/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/PolicyMonitorImpl.java index de02d19dcb..534f2960b7 100644 --- a/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/PolicyMonitorImpl.java +++ b/openam-core/src/main/java/org/forgerock/openam/entitlement/monitoring/PolicyMonitorImpl.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.entitlement.monitoring; @@ -19,9 +20,9 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.RejectedExecutionException; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import javax.security.auth.Subject; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/headers/SetHeadersFilter.java b/openam-core/src/main/java/org/forgerock/openam/headers/SetHeadersFilter.java index 850d851143..9c7870d038 100644 --- a/openam-core/src/main/java/org/forgerock/openam/headers/SetHeadersFilter.java +++ b/openam-core/src/main/java/org/forgerock/openam/headers/SetHeadersFilter.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.headers; @@ -23,14 +24,14 @@ import java.util.Map; import java.util.Set; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; /** * SetHeadersFilter is a servlet Filter for setting arbitrary headers for web resources. This filter adds headers keys diff --git a/openam-core/src/main/java/org/forgerock/openam/identity/idm/AMIdentityRepositoryListenerInitializer.java b/openam-core/src/main/java/org/forgerock/openam/identity/idm/AMIdentityRepositoryListenerInitializer.java index 662749c972..e5102d8275 100644 --- a/openam-core/src/main/java/org/forgerock/openam/identity/idm/AMIdentityRepositoryListenerInitializer.java +++ b/openam-core/src/main/java/org/forgerock/openam/identity/idm/AMIdentityRepositoryListenerInitializer.java @@ -12,25 +12,21 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.identity.idm; -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; -import java.security.AccessController; -import java.util.HashSet; import java.util.Set; import com.google.inject.Key; import com.google.inject.TypeLiteral; -import com.iplanet.sso.SSOToken; import com.sun.identity.idm.AMIdentityRepository; -import com.sun.identity.idm.IdEventListener; import com.sun.identity.idm.IdRepoCreationListener; import com.sun.identity.log.spi.Debug; -import com.sun.identity.security.AdminTokenAction; import org.forgerock.guice.core.InjectorHolder; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/identity/idm/IdentityUtils.java b/openam-core/src/main/java/org/forgerock/openam/identity/idm/IdentityUtils.java index 3e7d1827a6..2906be3004 100644 --- a/openam-core/src/main/java/org/forgerock/openam/identity/idm/IdentityUtils.java +++ b/openam-core/src/main/java/org/forgerock/openam/identity/idm/IdentityUtils.java @@ -13,10 +13,11 @@ * * Copyright 2016 ForgeRock AS. * Portions Copyrighted 2005 Sun Microsystems Inc. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.identity.idm; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import com.iplanet.sso.SSOException; import com.iplanet.sso.SSOToken; diff --git a/openam-core/src/main/java/org/forgerock/openam/notifications/NotificationsConfig.java b/openam-core/src/main/java/org/forgerock/openam/notifications/NotificationsConfig.java index 004cad609f..7ab97d0b92 100644 --- a/openam-core/src/main/java/org/forgerock/openam/notifications/NotificationsConfig.java +++ b/openam-core/src/main/java/org/forgerock/openam/notifications/NotificationsConfig.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.notifications; import static com.sun.identity.shared.Constants.NOTIFICATIONS_AGENTS_ENABLED; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import com.iplanet.am.util.SystemProperties; import com.sun.identity.common.configuration.ConfigurationListener; diff --git a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/BaseURLProvider.java b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/BaseURLProvider.java index 71d207c0a8..b450ead316 100644 --- a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/BaseURLProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/BaseURLProvider.java @@ -12,12 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Portions copyright 2023 3A Systems LLC. + * Portions copyright 2023-2025 3A Systems LLC. */ package org.forgerock.openam.services.baseurl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import java.net.URI; import org.forgerock.json.resource.http.HttpContext; diff --git a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/BaseURLProviderFactory.java b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/BaseURLProviderFactory.java index f1d1ced946..cb39f2429c 100644 --- a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/BaseURLProviderFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/BaseURLProviderFactory.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.services.baseurl; @@ -27,10 +28,10 @@ import java.security.AccessController; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; -import javax.servlet.ServletContext; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; +import jakarta.servlet.ServletContext; import org.forgerock.openam.core.CoreWrapper; import org.forgerock.openam.core.guice.ServletContextCache; diff --git a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/ExtensionBaseURLProvider.java b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/ExtensionBaseURLProvider.java index e4a78deeea..c82aca3540 100644 --- a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/ExtensionBaseURLProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/ExtensionBaseURLProvider.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.services.baseurl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.json.resource.http.HttpContext; diff --git a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/FixedBaseURLProvider.java b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/FixedBaseURLProvider.java index 5ebd5a8918..20fcb3cbaa 100644 --- a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/FixedBaseURLProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/FixedBaseURLProvider.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.services.baseurl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.json.resource.http.HttpContext; import org.forgerock.openam.utils.OpenAMSettings; diff --git a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/ForwardedHeaderBaseURLProvider.java b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/ForwardedHeaderBaseURLProvider.java index d003bc54cb..75cf4ca3f4 100644 --- a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/ForwardedHeaderBaseURLProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/ForwardedHeaderBaseURLProvider.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.services.baseurl; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.json.resource.http.HttpContext; import org.forgerock.openam.utils.ForwardedHeader; diff --git a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/RequestValuesBaseURLProvider.java b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/RequestValuesBaseURLProvider.java index 8a3cd50fc4..ff7e2a899b 100644 --- a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/RequestValuesBaseURLProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/RequestValuesBaseURLProvider.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.services.baseurl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.shared.debug.Debug; import org.forgerock.json.resource.http.HttpContext; @@ -27,7 +28,7 @@ /** * A {@link BaseURLProvider} implementation that uses the scheme, serverName and serverPort properties of - * the {@link javax.servlet.http.HttpServletRequest}. + * the {@link jakarta.servlet.http.HttpServletRequest}. */ public class RequestValuesBaseURLProvider extends BaseURLProvider { diff --git a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/XForwardedHeadersBaseURLProvider.java b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/XForwardedHeadersBaseURLProvider.java index b16e325f8b..3ce432dadc 100644 --- a/openam-core/src/main/java/org/forgerock/openam/services/baseurl/XForwardedHeadersBaseURLProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/services/baseurl/XForwardedHeadersBaseURLProvider.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.services.baseurl; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import com.sun.identity.shared.debug.Debug; import org.forgerock.json.resource.http.HttpContext; diff --git a/openam-core/src/main/java/org/forgerock/openam/services/email/MailServer.java b/openam-core/src/main/java/org/forgerock/openam/services/email/MailServer.java index 11c79e596f..b993aeabbc 100644 --- a/openam-core/src/main/java/org/forgerock/openam/services/email/MailServer.java +++ b/openam-core/src/main/java/org/forgerock/openam/services/email/MailServer.java @@ -20,11 +20,12 @@ * "Portions copyright [year] [name of copyright owner]" * * Copyright 2013-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.services.email; -import javax.mail.MessagingException; +import jakarta.mail.MessagingException; import java.util.Map; import java.util.Set; diff --git a/openam-core/src/main/java/org/forgerock/openam/services/email/MailServerImpl.java b/openam-core/src/main/java/org/forgerock/openam/services/email/MailServerImpl.java index 8aa0f3e954..0c3791e3c2 100644 --- a/openam-core/src/main/java/org/forgerock/openam/services/email/MailServerImpl.java +++ b/openam-core/src/main/java/org/forgerock/openam/services/email/MailServerImpl.java @@ -20,6 +20,7 @@ * "Portions copyright [year] [name of copyright owner]" * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.services.email; @@ -32,7 +33,7 @@ import com.sun.identity.sm.ServiceConfig; import com.sun.identity.sm.ServiceConfigManager; -import javax.mail.MessagingException; +import jakarta.mail.MessagingException; import java.security.AccessController; import java.util.Map; import java.util.Set; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/SessionCache.java b/openam-core/src/main/java/org/forgerock/openam/session/SessionCache.java index 5da5ce368f..6661e149f6 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/SessionCache.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/SessionCache.java @@ -23,15 +23,15 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * Portions Copyrighted 2014-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.session; import static org.forgerock.openam.utils.Time.currentTimeMillis; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/SessionCookies.java b/openam-core/src/main/java/org/forgerock/openam/session/SessionCookies.java index 6159e8eb0f..0c30422510 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/SessionCookies.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/SessionCookies.java @@ -23,14 +23,15 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.session; import static org.forgerock.openam.session.SessionConstants.*; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.dpro.session.InvalidSessionIdException; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/SessionGuiceModule.java b/openam-core/src/main/java/org/forgerock/openam/session/SessionGuiceModule.java index 62b6b2ab66..d6a3db2bde 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/SessionGuiceModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/SessionGuiceModule.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.session; import java.util.Arrays; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.guice.core.GuiceModule; import org.forgerock.guice.core.InjectorHolder; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/SessionPLLSender.java b/openam-core/src/main/java/org/forgerock/openam/session/SessionPLLSender.java index 988672fc6c..085338d354 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/SessionPLLSender.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/SessionPLLSender.java @@ -23,6 +23,7 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * Portions Copyrighted 2014-2015 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.session; @@ -32,7 +33,7 @@ import java.net.URL; import java.util.Vector; -import javax.inject.Inject; +import jakarta.inject.Inject; import com.iplanet.am.util.SystemProperties; import com.iplanet.dpro.session.SessionException; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/SessionPollerPool.java b/openam-core/src/main/java/org/forgerock/openam/session/SessionPollerPool.java index 1ac3a7d7b3..2d168d0c7c 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/SessionPollerPool.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/SessionPollerPool.java @@ -23,12 +23,13 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * Portions Copyrighted 2015-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.session; import static org.forgerock.openam.session.SessionConstants.*; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import org.forgerock.util.thread.listener.ShutdownListener; import org.forgerock.util.thread.listener.ShutdownManager; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/SessionPropertyWhitelist.java b/openam-core/src/main/java/org/forgerock/openam/session/SessionPropertyWhitelist.java index 454d948df6..06fbc0c696 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/SessionPropertyWhitelist.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/SessionPropertyWhitelist.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. +* Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.session; @@ -37,8 +38,8 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; /** * SessionPropertyWhitelist service that caches on a per-realm basis, and has listeners to diff --git a/openam-core/src/main/java/org/forgerock/openam/session/SessionServiceURLService.java b/openam-core/src/main/java/org/forgerock/openam/session/SessionServiceURLService.java index 3fe45029c3..7ab43a15ee 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/SessionServiceURLService.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/SessionServiceURLService.java @@ -23,6 +23,7 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * Portions Copyrighted 2014-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.session; @@ -32,7 +33,7 @@ import java.net.URL; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.session.service.ServicesClusterMonitorHandler; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/SessionURL.java b/openam-core/src/main/java/org/forgerock/openam/session/SessionURL.java index 1ee92a1467..cf07893727 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/SessionURL.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/SessionURL.java @@ -23,11 +23,12 @@ * "Portions Copyrighted [year] [name of copyright owner]" * * Portions Copyrighted 2014-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.session; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import org.forgerock.openam.utils.StringUtils; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/authorisation/SessionChangeAuthorizer.java b/openam-core/src/main/java/org/forgerock/openam/session/authorisation/SessionChangeAuthorizer.java index 10d33f0935..c6ebae1932 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/authorisation/SessionChangeAuthorizer.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/authorisation/SessionChangeAuthorizer.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.session.authorisation; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import java.util.Collections; import java.util.Set; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/service/ServicesClusterMonitorHandler.java b/openam-core/src/main/java/org/forgerock/openam/session/service/ServicesClusterMonitorHandler.java index 73936458ab..5f39db1d77 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/service/ServicesClusterMonitorHandler.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/service/ServicesClusterMonitorHandler.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.session.service; import java.util.concurrent.atomic.AtomicReference; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.openam.session.SessionConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/service/SessionAccessManager.java b/openam-core/src/main/java/org/forgerock/openam/session/service/SessionAccessManager.java index c330cdf846..2170f8e4e8 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/service/SessionAccessManager.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/service/SessionAccessManager.java @@ -12,14 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. - * Portions Copyrighted 2024 3A Systems LLC + * Portions Copyrighted 2024-2025 3A Systems LLC */ package org.forgerock.openam.session.service; import java.util.concurrent.ScheduledExecutorService; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.forgerock.openam.audit.context.AMExecutorServiceFactory; import org.forgerock.openam.session.SessionCache; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/service/access/SessionQueryManager.java b/openam-core/src/main/java/org/forgerock/openam/session/service/access/SessionQueryManager.java index 5612ad60d4..f3e6e55d64 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/service/access/SessionQueryManager.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/service/access/SessionQueryManager.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.session.service.access; @@ -23,8 +24,8 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import com.iplanet.dpro.session.SessionID; import org.forgerock.openam.cts.exceptions.CoreTokenException; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/InternalSessionPersistenceStore.java b/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/InternalSessionPersistenceStore.java index 8588c8af9f..3be1fa7f46 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/InternalSessionPersistenceStore.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/InternalSessionPersistenceStore.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.session.service.access.persistence; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.cts.exceptions.CoreTokenException; import org.forgerock.util.Reject; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/SessionPersistenceManagerStep.java b/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/SessionPersistenceManagerStep.java index d73e0e1a79..32d311b7e5 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/SessionPersistenceManagerStep.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/SessionPersistenceManagerStep.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.session.service.access.persistence; -import javax.inject.Inject; -import javax.inject.Provider; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Provider; +import jakarta.inject.Singleton; import org.forgerock.openam.session.service.access.SessionPersistenceManager; import org.forgerock.util.Reject; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/SessionPersistenceStore.java b/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/SessionPersistenceStore.java index 6f215d35df..77d3ec1709 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/SessionPersistenceStore.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/SessionPersistenceStore.java @@ -13,6 +13,7 @@ * * Copyright 2016 ForgeRock AS. * Portions Copyrighted 2022 Open Identity Platform Community + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.session.service.access.persistence; @@ -32,8 +33,8 @@ import java.util.Set; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import com.google.common.collect.ImmutableMap; import com.iplanet.services.naming.URLNotFoundException; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/caching/InMemoryInternalSessionCacheStep.java b/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/caching/InMemoryInternalSessionCacheStep.java index e73dfba32a..a32f5593eb 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/caching/InMemoryInternalSessionCacheStep.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/caching/InMemoryInternalSessionCacheStep.java @@ -14,6 +14,7 @@ * Copyright 2016 ForgeRock AS. * * Portions Copyrighted 2023 Open Identity Platform Community. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.session.service.access.persistence.caching; @@ -31,9 +32,9 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.openam.session.SessionConstants; import org.forgerock.openam.session.service.access.persistence.InternalSessionStore; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/watchers/SessionModificationWatcher.java b/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/watchers/SessionModificationWatcher.java index d0e74bff9a..743bbd8555 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/watchers/SessionModificationWatcher.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/service/access/persistence/watchers/SessionModificationWatcher.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.session.service.access.persistence.watchers; @@ -23,10 +24,10 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Provider; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Provider; +import jakarta.inject.Singleton; import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.cts.CTSPersistentStore; diff --git a/openam-core/src/main/java/org/forgerock/openam/session/stateless/StatelessConfig.java b/openam-core/src/main/java/org/forgerock/openam/session/stateless/StatelessConfig.java index c0e852d889..d34de7b803 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/stateless/StatelessConfig.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/stateless/StatelessConfig.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.session.stateless; import com.iplanet.am.util.SystemPropertiesWrapper; -import javax.inject.Inject; +import jakarta.inject.Inject; /** * Responsible for providing configuration to all parts of the Stateless Session code base. diff --git a/openam-core/src/main/java/org/forgerock/openam/session/stateless/cache/StatelessJWTCache.java b/openam-core/src/main/java/org/forgerock/openam/session/stateless/cache/StatelessJWTCache.java index 0e254ebbb6..648c903ca1 100644 --- a/openam-core/src/main/java/org/forgerock/openam/session/stateless/cache/StatelessJWTCache.java +++ b/openam-core/src/main/java/org/forgerock/openam/session/stateless/cache/StatelessJWTCache.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2024-2025 3A Systems LLC. */ package org.forgerock.openam.session.stateless.cache; import java.util.Collections; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.forgerock.openam.session.stateless.StatelessConfig; import org.forgerock.openam.utils.collections.LeastRecentlyUsed; diff --git a/openam-core/src/main/java/org/forgerock/openam/setup/EmbeddedOpenDJManager.java b/openam-core/src/main/java/org/forgerock/openam/setup/EmbeddedOpenDJManager.java index 1638413666..bd11994010 100644 --- a/openam-core/src/main/java/org/forgerock/openam/setup/EmbeddedOpenDJManager.java +++ b/openam-core/src/main/java/org/forgerock/openam/setup/EmbeddedOpenDJManager.java @@ -25,11 +25,12 @@ * $Id: AMSetupServlet.java,v 1.117 2010/01/20 17:01:35 veiming Exp $ * * Portions Copyrighted 2010-2016 ForgeRock AS. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.setup; -import javax.servlet.ServletException; +import jakarta.servlet.ServletException; import java.io.File; import com.sun.identity.shared.debug.Debug; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/ConnectionConfigFactory.java b/openam-core/src/main/java/org/forgerock/openam/sm/ConnectionConfigFactory.java index fa5b3411c5..8068692ec4 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/ConnectionConfigFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/ConnectionConfigFactory.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import java.util.Set; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/SMSConfigurationFactory.java b/openam-core/src/main/java/org/forgerock/openam/sm/SMSConfigurationFactory.java index b6842c58e1..1a872a9f6f 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/SMSConfigurationFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/SMSConfigurationFactory.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm; @@ -19,8 +20,8 @@ import com.iplanet.services.ldap.LDAPUser; import com.sun.identity.shared.debug.Debug; import java.util.Arrays; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.session.SessionConstants; import org.forgerock.openam.sm.exceptions.ConnectionCredentialsNotFound; import org.forgerock.openam.sm.exceptions.ServerConfigurationNotFound; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/SMSDataLayerConfiguration.java b/openam-core/src/main/java/org/forgerock/openam/sm/SMSDataLayerConfiguration.java index 582f2cb327..27e6cdd2e4 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/SMSDataLayerConfiguration.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/SMSDataLayerConfiguration.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.sm.datalayer.api.DataLayerConstants; import org.forgerock.openam.sm.datalayer.api.StoreMode; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/ServiceConfigManagerFactory.java b/openam-core/src/main/java/org/forgerock/openam/sm/ServiceConfigManagerFactory.java index 3fa315a501..9bca404a01 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/ServiceConfigManagerFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/ServiceConfigManagerFactory.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm; import java.security.AccessController; import java.security.PrivilegedAction; -import javax.inject.Inject; +import jakarta.inject.Inject; import com.iplanet.sso.SSOException; import com.iplanet.sso.SSOToken; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/config/ConsoleConfigHandlerImpl.java b/openam-core/src/main/java/org/forgerock/openam/sm/config/ConsoleConfigHandlerImpl.java index a4bebbf0ea..403303062b 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/config/ConsoleConfigHandlerImpl.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/config/ConsoleConfigHandlerImpl.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.config; @@ -25,8 +26,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/config/DefaultConfigTransformer.java b/openam-core/src/main/java/org/forgerock/openam/sm/config/DefaultConfigTransformer.java index 4bb9e85bfc..3522472382 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/config/DefaultConfigTransformer.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/config/DefaultConfigTransformer.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.config; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import java.util.ArrayList; import java.util.List; import java.util.Set; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/config/SMSConfigProvider.java b/openam-core/src/main/java/org/forgerock/openam/sm/config/SMSConfigProvider.java index 499026faff..8a60fcc493 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/config/SMSConfigProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/config/SMSConfigProvider.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.config; @@ -22,8 +23,8 @@ import com.sun.identity.sm.ServiceConfigManager; import com.sun.identity.sm.ServiceListener; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import java.security.PrivilegedAction; import java.util.HashMap; import java.util.Map; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/api/DataLayer.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/api/DataLayer.java index b04e38eccd..34ea1c922d 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/api/DataLayer.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/api/DataLayer.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.api; @@ -21,7 +22,7 @@ import java.lang.annotation.Annotation; import java.lang.annotation.Retention; -import javax.inject.Qualifier; +import jakarta.inject.Qualifier; /** * An annotation for marking injectable objects as for a specific data layer. diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/api/DataLayerConnectionModule.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/api/DataLayerConnectionModule.java index 55c420cf9c..15bfe4b689 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/api/DataLayerConnectionModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/api/DataLayerConnectionModule.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.api; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import java.util.concurrent.Semaphore; import com.google.inject.Key; @@ -25,7 +26,6 @@ import com.google.inject.PrivateModule; import com.google.inject.Provider; import com.google.inject.name.Names; -import org.forgerock.openam.cts.impl.LdapAdapter; import org.forgerock.openam.sm.ConnectionConfigFactory; import org.forgerock.openam.sm.datalayer.api.query.QueryFactory; import org.forgerock.openam.sm.datalayer.impl.PooledTaskExecutor; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/LabelsDataLayerConfiguration.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/LabelsDataLayerConfiguration.java index a45d3f610e..ac9250f84b 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/LabelsDataLayerConfiguration.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/LabelsDataLayerConfiguration.java @@ -12,13 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.lang3.StringUtils; import org.forgerock.openam.sm.datalayer.api.DataLayerConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/PooledTaskExecutor.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/PooledTaskExecutor.java index 1adae1eb69..bb2f0de0be 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/PooledTaskExecutor.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/PooledTaskExecutor.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; @@ -22,9 +23,9 @@ import java.util.concurrent.Semaphore; import java.util.concurrent.atomic.AtomicInteger; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Provider; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Provider; import org.forgerock.openam.sm.ConnectionConfigFactory; import org.forgerock.openam.sm.datalayer.api.ConnectionType; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ResourceSetConnectionModule.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ResourceSetConnectionModule.java index 15cd49789b..6143463eb4 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ResourceSetConnectionModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ResourceSetConnectionModule.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.forgerock.openam.oauth2.ResourceSetDescription; import org.forgerock.openam.cts.adapters.JavaBeanAdapter; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ResourceSetDataLayerConfiguration.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ResourceSetDataLayerConfiguration.java index bdf4ee8dd0..7935736e28 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ResourceSetDataLayerConfiguration.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ResourceSetDataLayerConfiguration.java @@ -12,13 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.lang3.StringUtils; import org.forgerock.openam.cts.api.CoreTokenConstants; @@ -30,7 +30,6 @@ import com.iplanet.am.util.AMPasswordUtil; import com.iplanet.am.util.SystemProperties; -import com.sun.identity.shared.Constants; /** * A data layer configuration for use with resource set tokens. diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutor.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutor.java index 6d0109f68c..208021fdb2 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutor.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutor.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; @@ -23,8 +24,8 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.audit.context.AbstractAuditRequestContextPropagatingDecorator; import org.forgerock.openam.audit.context.AuditRequestContext; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutorThread.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutorThread.java index 9f25de3387..46d089dbbd 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutorThread.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutorThread.java @@ -12,14 +12,15 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; import java.text.MessageFormat; import java.util.concurrent.BlockingQueue; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.cts.api.CoreTokenConstants; import org.forgerock.openam.sm.datalayer.api.DataLayerException; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutorThreadFactory.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutorThreadFactory.java index 1b68a1e336..896e331659 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutorThreadFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SeriesTaskExecutorThreadFactory.java @@ -12,14 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; import java.util.concurrent.BlockingQueue; -import javax.inject.Inject; +import jakarta.inject.Inject; -import org.forgerock.guice.core.InjectorHolder; import org.forgerock.openam.sm.datalayer.api.Task; import org.forgerock.util.Reject; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SimpleTaskExecutor.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SimpleTaskExecutor.java index 40571e69c8..b3c10dd1fe 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SimpleTaskExecutor.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/SimpleTaskExecutor.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.cts.api.CoreTokenConstants; import org.forgerock.openam.sm.datalayer.api.DataLayerConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaAuditConnectionModule.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaAuditConnectionModule.java index 9daf8ce274..c63b2c64f4 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaAuditConnectionModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaAuditConnectionModule.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; @@ -28,8 +29,8 @@ import org.forgerock.openam.sm.datalayer.store.TokenDataStore; import org.forgerock.openam.sm.datalayer.impl.uma.UmaAuditEntry; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; public class UmaAuditConnectionModule extends LdapDataLayerConnectionModule { diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaAuditDataLayerConfiguration.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaAuditDataLayerConfiguration.java index ae891e9414..a755eec41f 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaAuditDataLayerConfiguration.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaAuditDataLayerConfiguration.java @@ -12,13 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Portions Copyrighted 2020-2025 3A Systems, LLC. + * Portions copyright 2020-2025 3A Systems, LLC. */ package org.forgerock.openam.sm.datalayer.impl; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.lang3.StringUtils; import org.forgerock.openam.sm.datalayer.api.DataLayerConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaPendingRequestConnectionModule.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaPendingRequestConnectionModule.java index fae5748c9d..c7f3808116 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaPendingRequestConnectionModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaPendingRequestConnectionModule.java @@ -12,16 +12,16 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import com.google.inject.Key; import com.google.inject.PrivateBinder; -import org.forgerock.openam.oauth2.ResourceSetDescription; import org.forgerock.openam.cts.adapters.JavaBeanAdapter; import org.forgerock.openam.cts.adapters.JavaBeanAdapterFactory; import org.forgerock.openam.sm.datalayer.api.DataLayer; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaPendingRequestDataLayerConfiguration.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaPendingRequestDataLayerConfiguration.java index 4c133d17d2..f5aac00fd0 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaPendingRequestDataLayerConfiguration.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/UmaPendingRequestDataLayerConfiguration.java @@ -12,13 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import com.iplanet.am.util.AMPasswordUtil; import com.iplanet.am.util.SystemProperties; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryPartialTokenConverter.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryPartialTokenConverter.java index 8dd8d4f458..b38ba76a55 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryPartialTokenConverter.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryPartialTokenConverter.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl.ldap; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.forgerock.openam.cts.utils.LdapTokenAttributeConversion; import org.forgerock.openam.sm.datalayer.api.query.PartialToken; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryStringConverter.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryStringConverter.java index 4c3b0bc063..ce05e1b4c8 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryStringConverter.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryStringConverter.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl.ldap; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import org.forgerock.opendj.ldap.Entry; import org.forgerock.util.Reject; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryTokenConverter.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryTokenConverter.java index 8f9b82a352..4e2b77260c 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryTokenConverter.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/EntryTokenConverter.java @@ -12,16 +12,16 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl.ldap; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.forgerock.openam.cts.api.tokens.Token; import org.forgerock.openam.cts.utils.LdapTokenAttributeConversion; -import org.forgerock.openam.sm.datalayer.api.query.PartialToken; import org.forgerock.opendj.ldap.Entry; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/ExternalConnectionConfigProvider.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/ExternalConnectionConfigProvider.java index 2dc4342da2..2c31cd1385 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/ExternalConnectionConfigProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/ExternalConnectionConfigProvider.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl.ldap; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.sm.ConnectionConfig; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/ExternalLdapConfig.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/ExternalLdapConfig.java index ec00548b36..8584304f9e 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/ExternalLdapConfig.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/ExternalLdapConfig.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl.ldap; @@ -26,8 +26,8 @@ import org.forgerock.openam.sm.ConnectionConfig; import org.forgerock.openam.utils.ModifiedProperty; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.Set; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapDataLayerConnectionModule.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapDataLayerConnectionModule.java index 6e8fe546a2..0b1bffdcf0 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapDataLayerConnectionModule.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapDataLayerConnectionModule.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl.ldap; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import org.forgerock.openam.cts.api.tokens.Token; import org.forgerock.openam.cts.impl.LdapAdapter; @@ -85,7 +86,7 @@ protected void configureConnections(PrivateBinder binder) { * {@link org.forgerock.openam.sm.datalayer.providers.DataLayerConnectionFactoryCache}. * @return Returns the provider of {@link org.forgerock.openam.sm.datalayer.api.ConnectionFactory}. */ - protected Class> getConnectionFactoryProviderType() { + protected Class> getConnectionFactoryProviderType() { return DataLayerConnectionFactoryCache.class; } diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryBuilder.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryBuilder.java index 5e05bf26d2..e96a97b9f8 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryBuilder.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryBuilder.java @@ -12,7 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. - * Portions Copyrighted 2025 3A Systems, LLC. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl.ldap; @@ -25,8 +25,8 @@ import java.util.Map; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.apache.commons.lang3.StringUtils; import org.forgerock.openam.cts.api.CoreTokenConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryFactory.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryFactory.java index f137308db6..d1e134c6b8 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryFactory.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryFactory.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl.ldap; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.sm.datalayer.api.query.QueryBuilder; import org.forgerock.openam.sm.datalayer.api.query.QueryFactory; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryFilterVisitor.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryFilterVisitor.java index e12f56b87d..3f510e0715 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryFilterVisitor.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapQueryFilterVisitor.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl.ldap; @@ -21,7 +22,7 @@ import java.util.Calendar; import java.util.List; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.openam.cts.api.fields.CoreTokenFieldTypes; import org.forgerock.openam.cts.utils.LDAPDataConversion; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapSearchHandler.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapSearchHandler.java index b2db66f9d5..fa3b2c2679 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapSearchHandler.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/impl/ldap/LdapSearchHandler.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.impl.ldap; import com.sun.identity.shared.debug.Debug; import java.util.Collection; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.forgerock.openam.cts.exceptions.QueryFailedException; import org.forgerock.openam.cts.impl.LDAPConfig; import org.forgerock.openam.sm.datalayer.api.DataLayerConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/providers/DataLayerConnectionFactoryCache.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/providers/DataLayerConnectionFactoryCache.java index 5fddeb626d..b261bdc83b 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/providers/DataLayerConnectionFactoryCache.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/providers/DataLayerConnectionFactoryCache.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.providers; @@ -23,10 +24,10 @@ import org.forgerock.util.thread.listener.ShutdownListener; import org.forgerock.util.thread.listener.ShutdownManager; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Provider; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Provider; +import jakarta.inject.Singleton; import java.text.MessageFormat; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/providers/LdapConnectionFactoryProvider.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/providers/LdapConnectionFactoryProvider.java index 41e2bf36cc..e16657bd53 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/providers/LdapConnectionFactoryProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/providers/LdapConnectionFactoryProvider.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.providers; @@ -21,9 +22,9 @@ import java.text.MessageFormat; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.inject.Named; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.inject.Singleton; import org.forgerock.openam.cts.api.CoreTokenConstants; import org.forgerock.openam.ldap.LDAPUtils; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/utils/ThreadSafeTokenIdGenerator.java b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/utils/ThreadSafeTokenIdGenerator.java index 8a4170171f..c198d1cfea 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/utils/ThreadSafeTokenIdGenerator.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/datalayer/utils/ThreadSafeTokenIdGenerator.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.datalayer.utils; import java.util.UUID; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import org.forgerock.openam.cts.api.tokens.TokenIdGenerator; import org.forgerock.openam.utils.PerThreadCache; diff --git a/openam-core/src/main/java/org/forgerock/openam/sm/validation/Base64EncodedBinaryValidator.java b/openam-core/src/main/java/org/forgerock/openam/sm/validation/Base64EncodedBinaryValidator.java index d6096a57e8..ac1dfca643 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sm/validation/Base64EncodedBinaryValidator.java +++ b/openam-core/src/main/java/org/forgerock/openam/sm/validation/Base64EncodedBinaryValidator.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sm.validation; import java.util.Set; -import javax.xml.bind.DatatypeConverter; +import jakarta.xml.bind.DatatypeConverter; import org.forgerock.openam.utils.CollectionUtils; diff --git a/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessAdminRestriction.java b/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessAdminRestriction.java index 58b6f18106..b32688da60 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessAdminRestriction.java +++ b/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessAdminRestriction.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sso.providers.stateless; import java.security.Principal; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.util.Reject; diff --git a/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessSSOProvider.java b/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessSSOProvider.java index 63a9dc0603..2f03c3b6c8 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessSSOProvider.java +++ b/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessSSOProvider.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sso.providers.stateless; @@ -23,9 +24,9 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; -import javax.inject.Inject; -import javax.inject.Named; -import javax.servlet.http.HttpServletRequest; +import jakarta.inject.Inject; +import jakarta.inject.Named; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.openam.blacklist.Blacklist; import org.forgerock.openam.blacklist.BlacklistException; diff --git a/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessSessionManager.java b/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessSessionManager.java index 4e443347b9..7057e07b95 100644 --- a/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessSessionManager.java +++ b/openam-core/src/main/java/org/forgerock/openam/sso/providers/stateless/StatelessSessionManager.java @@ -12,12 +12,13 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015-2016 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.sso.providers.stateless; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.json.jose.exceptions.JwtRuntimeException; import org.forgerock.openam.session.SessionConstants; diff --git a/openam-core/src/main/java/org/forgerock/openam/upgrade/OpenDJUpgrader.java b/openam-core/src/main/java/org/forgerock/openam/upgrade/OpenDJUpgrader.java index 196febe8da..cd35d90512 100644 --- a/openam-core/src/main/java/org/forgerock/openam/upgrade/OpenDJUpgrader.java +++ b/openam-core/src/main/java/org/forgerock/openam/upgrade/OpenDJUpgrader.java @@ -20,6 +20,8 @@ * with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" + * + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.upgrade; @@ -27,7 +29,7 @@ import static java.nio.file.Files.copy; import javax.annotation.Nonnull; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; import java.io.BufferedWriter; import java.io.ByteArrayOutputStream; import java.io.File; diff --git a/openam-core/src/main/java/org/forgerock/openam/utils/ForwardedHeader.java b/openam-core/src/main/java/org/forgerock/openam/utils/ForwardedHeader.java index 1bb176ba34..4e7ff3d1d8 100644 --- a/openam-core/src/main/java/org/forgerock/openam/utils/ForwardedHeader.java +++ b/openam-core/src/main/java/org/forgerock/openam/utils/ForwardedHeader.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2015 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.utils; @@ -21,7 +22,7 @@ import java.util.Iterator; import java.util.List; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.forgerock.json.resource.http.HttpContext; import org.forgerock.util.Pair; diff --git a/openam-core/src/main/java/org/forgerock/openam/utils/OpenAMSettingsImpl.java b/openam-core/src/main/java/org/forgerock/openam/utils/OpenAMSettingsImpl.java index ac647628b5..d5442394dc 100644 --- a/openam-core/src/main/java/org/forgerock/openam/utils/OpenAMSettingsImpl.java +++ b/openam-core/src/main/java/org/forgerock/openam/utils/OpenAMSettingsImpl.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.utils; @@ -21,7 +22,7 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.json.jose.jws.JwsAlgorithm; import org.forgerock.json.jose.jws.JwsAlgorithmType; diff --git a/openam-core/src/main/java/org/forgerock/openam/utils/RealmNormaliser.java b/openam-core/src/main/java/org/forgerock/openam/utils/RealmNormaliser.java index 3b0639d6c4..6c514f6bb3 100644 --- a/openam-core/src/main/java/org/forgerock/openam/utils/RealmNormaliser.java +++ b/openam-core/src/main/java/org/forgerock/openam/utils/RealmNormaliser.java @@ -12,11 +12,12 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014-2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.utils; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import org.forgerock.json.resource.NotFoundException; import org.forgerock.openam.core.CoreWrapper; diff --git a/openam-core/src/main/java/org/forgerock/openam/utils/RecoveryCodeGenerator.java b/openam-core/src/main/java/org/forgerock/openam/utils/RecoveryCodeGenerator.java index 1241751c85..21216778a6 100644 --- a/openam-core/src/main/java/org/forgerock/openam/utils/RecoveryCodeGenerator.java +++ b/openam-core/src/main/java/org/forgerock/openam/utils/RecoveryCodeGenerator.java @@ -12,6 +12,7 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. +* Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.utils; @@ -19,7 +20,7 @@ import java.util.Arrays; import java.util.Map; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.forgerock.util.Reject; diff --git a/openam-core/src/main/java/org/forgerock/openam/utils/ShutdownMonitor.java b/openam-core/src/main/java/org/forgerock/openam/utils/ShutdownMonitor.java index 168a9af69c..cf9dd86c43 100644 --- a/openam-core/src/main/java/org/forgerock/openam/utils/ShutdownMonitor.java +++ b/openam-core/src/main/java/org/forgerock/openam/utils/ShutdownMonitor.java @@ -12,13 +12,14 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2014 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.utils; import org.forgerock.util.thread.listener.ShutdownListener; import org.forgerock.util.thread.listener.ShutdownManager; -import javax.inject.Inject; +import jakarta.inject.Inject; /** * Responsible for monitoring the system Shutdown state and providing this signal to callers diff --git a/openam-core/src/main/java/org/forgerock/openam/validation/FQDNValidationFilter.java b/openam-core/src/main/java/org/forgerock/openam/validation/FQDNValidationFilter.java index 87224a3686..7d9531bdf4 100644 --- a/openam-core/src/main/java/org/forgerock/openam/validation/FQDNValidationFilter.java +++ b/openam-core/src/main/java/org/forgerock/openam/validation/FQDNValidationFilter.java @@ -12,26 +12,23 @@ * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2016 ForgeRock AS. + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.validation; import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpServletResponseWrapper; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import com.sun.identity.authentication.service.AuthUtils; -import com.sun.identity.setup.AMSetupServlet; /** * Validates the FQDN used in an HttpServletRequest. Redirects to a valid FQDN if the existing one is invalid. diff --git a/openam-core/src/main/java/org/forgerock/openam/validation/ResponseValidationFilter.java b/openam-core/src/main/java/org/forgerock/openam/validation/ResponseValidationFilter.java index 7d8d270438..e5be4cbf31 100644 --- a/openam-core/src/main/java/org/forgerock/openam/validation/ResponseValidationFilter.java +++ b/openam-core/src/main/java/org/forgerock/openam/validation/ResponseValidationFilter.java @@ -12,14 +12,15 @@ * information: "Portions Copyrighted [year] [name of copyright owner]". * * Copyright © 2012 ForgeRock Inc. All rights reserved. + * Portions Copyrighted 2025 3A Systems LLC. */ package org.forgerock.openam.validation; -import javax.servlet.*; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpServletResponseWrapper; +import jakarta.servlet.*; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponseWrapper; import java.io.IOException; /** diff --git a/openam-core/src/main/java/org/forgerock/openam/xui/XUIFilter.java b/openam-core/src/main/java/org/forgerock/openam/xui/XUIFilter.java index 6888638e03..8b23cf44c1 100644 --- a/openam-core/src/main/java/org/forgerock/openam/xui/XUIFilter.java +++ b/openam-core/src/main/java/org/forgerock/openam/xui/XUIFilter.java @@ -12,19 +12,21 @@ * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions copyright [year] [name of copyright owner]". + * + * Portions copyright 2025 3A Systems LLC. */ package org.forgerock.openam.xui; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Map; diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/ActionEventDispatcher.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/ActionEventDispatcher.java new file mode 100644 index 0000000000..6081167fdc --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/ActionEventDispatcher.java @@ -0,0 +1,620 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.openidentityplatform.openam.click; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashSet; + +import java.util.List; +import java.util.Set; + +import org.openidentityplatform.openam.click.ajax.AjaxBehavior; +import org.openidentityplatform.openam.click.service.ConfigService; +import org.openidentityplatform.openam.click.service.LogService; +import org.apache.click.util.HtmlStringBuffer; +import org.apache.commons.lang.ClassUtils; +import org.apache.commons.lang.Validate; + +/** + * Provides a control ActionListener and AjaxBehavior dispatcher. The + * ClickServlet will dispatch registered ActionListeners and AjaxBehaviors after + * page controls have been processed. + * + *

Example Usage

+ * The following example shows how to register an ActionListener with a custom + * Control: + * + *
+ * public class MyControl extends AbstractControl {
+ *     ...
+ *
+ *     public boolean onProcess() {
+ *         bindRequestValue();
+ *
+ *         if (isClicked()) {
+ *             // Dispatch an action listener event for invocation after
+ *             // control processing has finished
+ *             dispatchActionEvent();
+ *         }
+ *
+ *         return true;
+ *     }
+ * } 
+ * + * When the link is clicked it invokes the method + * {@link org.openidentityplatform.openam.click.control.AbstractControl#dispatchActionEvent()}. + * This method registers the Control's action listener with the + * ActionEventDispatcher. The ClickServlet will subsequently invoke the registered + * {@link ActionListener#onAction(Control)} method after all the Page controls + * onProcess() method have been invoked. + */ +public class ActionEventDispatcher { + + // Constants -------------------------------------------------------------- + + /** The thread local dispatcher holder. */ + private static final ThreadLocal THREAD_LOCAL_DISPATCHER_STACK + = new ThreadLocal<>(); + + // Variables -------------------------------------------------------------- + + /** The list of registered event sources. */ + List eventSourceList; + + /** The list of registered event listeners. */ + List eventListenerList; + + /** The set of Controls with attached AjaxBehaviors. */ + Set ajaxBehaviorSourceSet; + + /** + * The {@link org.apache.click.ActionResult} to render. This action result is + * returned from the target Behavior. + */ + ActionResult actionResult; + + /** The application log service. */ + LogService logger; + + // Constructors ----------------------------------------------------------- + + /** + * Construct the ActionEventDispatcher with the given ConfigService. + * + * @param configService the click application configuration service + */ + public ActionEventDispatcher(ConfigService configService) { + this.logger = configService.getLogService(); + } + + // Public Methods --------------------------------------------------------- + + /** + * Register the event source and event ActionListener to be fired by the + * ClickServlet once all the controls have been processed. + * + * @param source the action event source + * @param listener the event action listener + */ + public static void dispatchActionEvent(Control source, ActionListener listener) { + Validate.notNull(source, "Null source parameter"); + Validate.notNull(listener, "Null listener parameter"); + + ActionEventDispatcher instance = getThreadLocalDispatcher(); + instance.registerActionEvent(source, listener); + } + + /** + * Register the source control which AjaxBehaviors should be fired by the + * ClickServlet. + * + * @param source the source control which behaviors should be fired + */ + public static void dispatchAjaxBehaviors(Control source) { + Validate.notNull(source, "Null source parameter"); + + ActionEventDispatcher instance = getThreadLocalDispatcher(); + instance.registerAjaxBehaviorSource(source); + } + + /** + * Return the thread local ActionEventDispatcher instance. + * + * @return the thread local ActionEventDispatcher instance. + * @throws RuntimeException if an ActionEventDispatcher is not available on + * the thread + */ + public static ActionEventDispatcher getThreadLocalDispatcher() { + return getDispatcherStack().peek(); + } + + /** + * Returns true if an ActionEventDispatcher instance is available on the + * current thread, false otherwise. + *

+ * Unlike {@link #getThreadLocalDispatcher()} this method can safely be used + * and will not throw an exception if an ActionEventDispatcher is not + * available on the current thread. + * + * @return true if an ActionEventDispatcher instance is available on the + * current thread, false otherwise + */ + public static boolean hasThreadLocalDispatcher() { + DispatcherStack dispatcherStack = THREAD_LOCAL_DISPATCHER_STACK.get(); + if (dispatcherStack == null) { + return false; + } + return !dispatcherStack.isEmpty(); + } + + /** + * Fire all the registered action events after the Page Controls have been + * processed and return true if the page should continue processing. + * + * @param context the request context + * + * @return true if the page should continue processing, false otherwise + */ + public boolean fireActionEvents(Context context) { + + if (!hasActionEvents()) { + return true; + } + + return fireActionEvents(context, getEventSourceList(), getEventListenerList()); + } + + /** + * Fire all the registered AjaxBehaviors and return true if the page should + * continue processing, false otherwise. + * + * @see #fireAjaxBehaviors(Context, java.util.Set) + * + * @param context the request context + * + * @return true if the page should continue processing, false otherwise + */ + public boolean fireAjaxBehaviors(Context context) { + + if (!hasAjaxBehaviorSourceSet()) { + return true; + } + + return fireAjaxBehaviors(context, getAjaxBehaviorSourceSet()); + } + + // Protected Methods ------------------------------------------------------ + + /** + * Allow the dispatcher to handle the error that occurred. + * + * @param throwable the error which occurred during processing + */ + protected void errorOccurred(Throwable throwable) { + // Clear the control listeners and behaviors from the dispatcher + clear(); + } + + /** + * Fire the actions for the given listener list and event source list which + * return true if the page should continue processing. + *

+ * This method can be overridden if you need to customize the way events + * are fired. + * + * @param context the request context + * @param eventSourceList the list of source controls + * @param eventListenerList the list of listeners to fire + * + * @return true if the page should continue processing or false otherwise + */ + protected boolean fireActionEvents(Context context, + List eventSourceList, List eventListenerList) { + + boolean continueProcessing = true; + + for (int i = 0, size = eventSourceList.size(); i < size; i++) { + Control source = eventSourceList.remove(0); + ActionListener listener = eventListenerList.remove(0); + + if (!fireActionEvent(context, source, listener)) { + continueProcessing = false; + } + } + + return continueProcessing; + } + + /** + * Fire the action for the given listener and event source which + * return true if the page should continue processing. + *

+ * This method can be overridden if you need to customize the way events + * are fired. + * + * @param context the request context + * @param source the source control + * @param listener the listener to fire + * + * @return true if the page should continue processing, false otherwise + */ + protected boolean fireActionEvent(Context context, Control source, + ActionListener listener) { + return listener.onAction(source); + } + + /** + * Fire the AjaxBehaviors for the given control set and return true if the page + * should continue processing, false otherwise. + *

+ * This method can be overridden if you need to customize the way + * AjaxBehaviors are fired. + * + * @see #fireAjaxBehaviors(Context, Control) + * + * @param context the request context + * @param ajaxBbehaviorSourceSet the set of controls with attached AjaxBehaviors + * + * @return true if the page should continue processing, false otherwise + */ + protected boolean fireAjaxBehaviors(Context context, Set ajaxBbehaviorSourceSet) { + + boolean continueProcessing = true; + + for (Iterator it = ajaxBbehaviorSourceSet.iterator(); it.hasNext();) { + Control source = it.next(); + + // Pop the first entry in the set + it.remove(); + + if (!fireAjaxBehaviors(context, source)) { + continueProcessing = false; + } + } + + return continueProcessing; + } + + /** + * Fire the AjaxBehaviors for the given control and return true if the + * page should continue processing, false otherwise. AjaxBehaviors will + * only fire if their {@link org.openidentityplatform.openam.click.ajax.AjaxBehavior#isAjaxTarget(Context) isAjaxTarget()} + * method returns true. + *

+ * This method can be overridden if you need to customize the way + * AjaxBehaviors are fired. + * + * @param context the request context + * @param source the control which attached behaviors should be fired + * + * @return true if the page should continue processing, false otherwise + */ + protected boolean fireAjaxBehaviors(Context context, Control source) { + + boolean continueProcessing = true; + + if (logger.isTraceEnabled()) { + String sourceClassName = ClassUtils.getShortClassName(source.getClass()); + HtmlStringBuffer buffer = new HtmlStringBuffer(); + buffer.append(" processing AjaxBehaviors for control: '"); + buffer.append(source.getName()).append("' "); + buffer.append(sourceClassName); + logger.trace(buffer.toString()); + } + + for (Behavior behavior : source.getBehaviors()) { + + if (behavior instanceof AjaxBehavior) { + AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior; + + boolean isAjaxTarget = ajaxBehavior.isAjaxTarget(context); + + if (logger.isTraceEnabled()) { + String behaviorClassName = ClassUtils.getShortClassName( + ajaxBehavior.getClass()); + HtmlStringBuffer buffer = new HtmlStringBuffer(); + buffer.append(" invoked: "); + buffer.append(behaviorClassName); + buffer.append(".isAjaxTarget() : "); + buffer.append(isAjaxTarget); + logger.trace(buffer.toString()); + } + + if (isAjaxTarget) { + + // The first non-null ActionResult returned will be rendered, other + // ActionResult instances are ignored + ActionResult behaviorActionResult = + ajaxBehavior.onAction(source); + if (actionResult == null && behaviorActionResult != null) { + actionResult = behaviorActionResult; + } + + if (logger.isTraceEnabled()) { + String behaviorClassName = ClassUtils.getShortClassName( + ajaxBehavior.getClass()); + String actionResultClassName = null; + + if (behaviorActionResult != null) { + actionResultClassName = ClassUtils.getShortClassName( + behaviorActionResult.getClass()); + } + + HtmlStringBuffer buffer = new HtmlStringBuffer(); + buffer.append(" invoked: "); + buffer.append(behaviorClassName); + buffer.append(".onAction() : "); + buffer.append(actionResultClassName); + + if (actionResult == behaviorActionResult + && behaviorActionResult != null) { + buffer.append(" (ActionResult will be rendered)"); + } else { + if (behaviorActionResult == null) { + buffer.append(" (ActionResult is null and will be ignored)"); + } else { + buffer.append(" (ActionResult will be ignored since another AjaxBehavior already retuned a non-null ActionResult)"); + } + } + + logger.trace(buffer.toString()); + } + + continueProcessing = false; + break; + } + } + } + + if (logger.isTraceEnabled()) { + + // continueProcessing is true if no AjaxBehavior was the target + // of the request + if (continueProcessing) { + HtmlStringBuffer buffer = new HtmlStringBuffer(); + String sourceClassName = ClassUtils.getShortClassName( + source.getClass()); + buffer.append(" *no* target AjaxBehavior found for '"); + buffer.append(source.getName()).append("' "); + buffer.append(sourceClassName); + buffer.append(" - invoking AjaxBehavior.isAjaxTarget() returned false for all AjaxBehaviors"); + logger.trace(buffer.toString()); + } + } + + // Ajax requests stops further processing + return continueProcessing; + } + + // Package Private Methods ------------------------------------------------ + + /** + * Register the event source and event ActionListener. + * + * @param source the action event source + * @param listener the event action listener + */ + void registerActionEvent(Control source, ActionListener listener) { + Validate.notNull(source, "Null source parameter"); + Validate.notNull(listener, "Null listener parameter"); + + getEventSourceList().add(source); + getEventListenerList().add(listener); + } + + /** + * Register the AjaxBehavior source control. + * + * @param source the AjaxBehavior source control + */ + void registerAjaxBehaviorSource(Control source) { + Validate.notNull(source, "Null source parameter"); + + getAjaxBehaviorSourceSet().add(source); + } + + /** + * Checks if any Action Events have been registered. + * + * @return true if the dispatcher has any Action Events registered + */ + boolean hasActionEvents() { + if (eventListenerList == null || eventListenerList.isEmpty()) { + return false; + } + return true; + } + + /** + * Return the list of event listeners. + * + * @return list of event listeners + */ + List getEventListenerList() { + if (eventListenerList == null) { + eventListenerList = new ArrayList(); + } + return eventListenerList; + } + + /** + * Return the list of event sources. + * + * @return list of event sources + */ + List getEventSourceList() { + if (eventSourceList == null) { + eventSourceList = new ArrayList(); + } + return eventSourceList; + } + + /** + * Clear the events and behaviors. + */ + void clear() { + if (hasActionEvents()) { + getEventSourceList().clear(); + getEventListenerList().clear(); + } + + if (hasAjaxBehaviorSourceSet()) { + getAjaxBehaviorSourceSet().clear(); + } + } + + /** + * Return the Behavior's action result or null if no behavior was dispatched. + * + * @return the Behavior's action result or null if no behavior was dispatched + */ + ActionResult getActionResult() { + return actionResult; + } + + /** + * Return true if a control with AjaxBehaviors was registered, false otherwise. + * + * @return true if a control with AjaxBehaviors was registered, false otherwise. + */ + boolean hasAjaxBehaviorSourceSet() { + if (ajaxBehaviorSourceSet == null || ajaxBehaviorSourceSet.isEmpty()) { + return false; + } + return true; + } + + /** + * Return the set of controls with attached AjaxBehaviors. + * + * @return set of control with attached AjaxBehaviors + */ + Set getAjaxBehaviorSourceSet() { + if (ajaxBehaviorSourceSet == null) { + ajaxBehaviorSourceSet = new LinkedHashSet(); + } + return ajaxBehaviorSourceSet; + } + + /** + * Adds the specified ActionEventDispatcher on top of the dispatcher stack. + * + * @param actionEventDispatcher the ActionEventDispatcher to add + */ + static void pushThreadLocalDispatcher(ActionEventDispatcher actionEventDispatcher) { + getDispatcherStack().push(actionEventDispatcher); + } + + /** + * Remove and return the actionEventDispatcher instance on top of the + * dispatcher stack. + * + * @return the actionEventDispatcher instance on top of the dispatcher stack + */ + static ActionEventDispatcher popThreadLocalDispatcher() { + DispatcherStack dispatcherStack = getDispatcherStack(); + ActionEventDispatcher actionEventDispatcher = dispatcherStack.pop(); + + if (dispatcherStack.isEmpty()) { + THREAD_LOCAL_DISPATCHER_STACK.set(null); + } + + return actionEventDispatcher; + } + + /** + * Return the stack data structure where ActionEventDispatchers are stored. + * + * @return stack data structure where ActionEventDispatcher are stored + */ + static ActionEventDispatcher.DispatcherStack getDispatcherStack() { + DispatcherStack dispatcherStack = THREAD_LOCAL_DISPATCHER_STACK.get(); + + if (dispatcherStack == null) { + dispatcherStack = new ActionEventDispatcher.DispatcherStack(2); + THREAD_LOCAL_DISPATCHER_STACK.set(dispatcherStack); + } + + return dispatcherStack; + } + + // Inner Classes ---------------------------------------------------------- + + /** + * Provides an unsynchronized Stack. + */ + static class DispatcherStack extends ArrayList { + + /** Serialization version indicator. */ + private static final long serialVersionUID = 1L; + + /** + * Create a new DispatcherStack with the given initial capacity. + * + * @param initialCapacity specify initial capacity of this stack + */ + private DispatcherStack(int initialCapacity) { + super(initialCapacity); + } + + /** + * Pushes the ActionEventDispatcher onto the top of this stack. + * + * @param actionEventDispatcher the ActionEventDispatcher to push onto this stack + * @return the ActionEventDispatcher pushed on this stack + */ + private ActionEventDispatcher push(ActionEventDispatcher actionEventDispatcher) { + add(actionEventDispatcher); + + return actionEventDispatcher; + } + + /** + * Removes and return the ActionEventDispatcher at the top of this stack. + * + * @return the ActionEventDispatcher at the top of this stack + */ + private ActionEventDispatcher pop() { + ActionEventDispatcher actionEventDispatcher = peek(); + + remove(size() - 1); + + return actionEventDispatcher; + } + + /** + * Looks at the ActionEventDispatcher at the top of this stack without + * removing it. + * + * @return the ActionEventDispatcher at the top of this stack + */ + private ActionEventDispatcher peek() { + int length = size(); + + if (length == 0) { + String msg = "No ActionEventDispatcher available on ThreadLocal Dispatcher Stack"; + throw new RuntimeException(msg); + } + + return get(length - 1); + } + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/ActionListener.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/ActionListener.java new file mode 100644 index 0000000000..a7ca79b482 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/ActionListener.java @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.openidentityplatform.openam.click; + +import java.io.Serializable; + +/** + * Provides a listener interface for receiving control action events. + * The usage model is similar to the java.awt.event.ActionListener + * interface. + *

+ * The class that is interested in processing an action event + * implements this interface, and the object created with that class is + * registered with a control, using the control's setActionListener + * method. When the action event occurs, that object's onAction method + * is invoked. + * + *

Listener Example

+ * + * An ActionListener example is provided below: + * + *
+ * public MyPage extends Page {
+ *
+ *    public ActionLink link = new ActionLink();
+ *
+ *    public MyPage() {
+ *
+ *       link.setActionListener(new ActionListener() {
+ *           public boolean onAction(Control source) {
+ *               return onLinkClick();
+ *           }
+ *        });
+ *    }
+ *
+ *    public boolean onLinkClick() {
+ *       ..
+ *       return true;
+ *    }
+ * }
+ * 
+ */ +public interface ActionListener extends Serializable { + + /** + * Return true if the control and page processing should continue, or false + * otherwise. + * + * @param source the source of the action event + * @return true if control and page processing should continue or false + * otherwise. + */ + public boolean onAction(Control source); + +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/ActionResult.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/ActionResult.java new file mode 100644 index 0000000000..60ac4b9c70 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/ActionResult.java @@ -0,0 +1,580 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.Reader; +import java.io.StringReader; +import java.io.Writer; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import jakarta.servlet.http.HttpServletResponse; + +import org.openidentityplatform.openam.click.util.ClickUtils; + +/** + * Provides an ActionResult that is returned by Page Actions and AjaxBehaviors. + * ActionResults are often used to return a partial response to the browser + * instead of the full page content. + *

+ * An ActionResult can consist of a String (HTML, JSON, XML, plain text) or a byte + * array (jpg, gif, png, pdf or excel documents). The ActionResult {@link #contentType} + * must be set appropriately in order for the browser to recognize the action result. + *

+ * ActionResults are returned by {@link org.apache.click.ajax.AjaxBehavior Ajax Behaviors} + * and Page Action methods. + * + *

Ajax Behavior

+ * + * Ajax requests are handled by adding an {@link org.apache.click.ajax.AjaxBehavior Ajax Behavior} + * to a control. The AjaxBehavior {@link org.apache.click.ajax.AjaxBehavior#onAction(org.apache.click.Control) onAction} + * method will handle the request and return a ActionResult instance that contains + * the response, thus bypassing the rendering of the Page template. For example: + * + *
+ * private ActionLink link = new ActionLink("link");
+ *
+ * public void onInit() {
+ *     addControl(link);
+ *
+ *     link.addBehavior(new AjaxBehavior() {
+ *
+ *         // The onAction method must return a ActionResult
+ *         public ActionResult onAction(Control source) {
+ *             // Create a new action result containing an HTML snippet and HTML content type
+ *             ActionResult actionResult = new ActionResult("<span>Hello World</span>", ActionResult.HTML);
+ *             return actionResult;
+ *         }
+ *     });
+ * } 
+ * + *

Page Action

+ * + * A Page Action is a method on a Page that can be invoked directly + * from the browser. The Page Action method returns an ActionResult instance that + * is rendered to the browser, thus bypassing the rendering of the Page template. + * + *
+ * private ActionLink link = new ActionLink("link");
+ *
+ * public void onInit() {
+ *     link.addControl(link);
+ *
+ *     // A "pageAction" is set as a parameter on the link. The "pageAction"
+ *     // value is set to the Page method: "renderHelloWorld"
+ *     link.setParameter(PAGE_ACTION, "renderHelloWorld");
+ * }
+ *
+ * /**
+ *  * This is a "pageAction" method that will render an HTML response.
+ *  *
+ *  * Note the signature of the pageAction: a public, no-argument method
+ *  * returning a ActionResult instance.
+ *  */
+ * public ActionResult renderHelloWorld() {
+ *     ActionResult actionResult = new ActionResult("<span>Hello World</span>", ActionResult.HTML);
+ *     return actionResult;
+ * } 
+ * + *

Content Type

+ * + * The {@link #contentType} of the ActionResult must be set to the appropriate type + * in order for the client to recognize the response. ActionResult provides constants + * for some of the common content types, including: {@link #XML text/xml}, + * {@link #HTML text/html}, {@link #JSON application/json}, {@link #TEXT text/plain}. + *

+ * For example: + *

+ * ActionResult actionResult = new ActionResult("alert('hello world');", ActionResult.JAVASCRIPT);
+ *
+ * ...
+ *
+ * // content type can also be set through the setContentType method
+ * actionResult.setContentType(ActionResult.JAVASCRIPT);
+ *
+ * ...
+ * 
+ * + * More content types can be retrieved through {@link org.apache.click.util.ClickUtils#getMimeType(java.lang.String)}: + *
+ * // lookup content type for PNG
+ * String contentType = ClickUtils.getMimeType("png");
+ * actionResult.setContentType(contentType); 
+ */ +public class ActionResult { + + // Constants -------------------------------------------------------------- + + /** The plain text content type constant: text/plain. */ + public static final String TEXT = "text/plain"; + + /** The html content type constant: text/html. */ + public static final String HTML = "text/html"; + + /** The The xhtml content type constant: application/xhtml+xml. */ + public static final String XHTML = "application/xhtml+xml"; + + /** The json content type constant: text/json. */ + public static final String JSON = "application/json"; + + /** The javascript content type constant: text/javascript. */ + public static final String JAVASCRIPT = "text/javascript"; + + /** The xml content type constant: text/xml. */ + public static final String XML = "text/xml"; + + /** The ActionResult writer buffer size. */ + private static final int WRITER_BUFFER_SIZE = 256; // For text, set a small response size + + /** The ActionResult output buffer size. */ + private static final int OUTPUT_BUFFER_SIZE = 4 * 1024; // For binary, set a a large response size + + // Variables -------------------------------------------------------------- + + /** The content to render. */ + private String content; + + /** The content as a byte array. */ + private byte[] bytes; + + /** The servlet response reader. */ + private Reader reader; + + /** The servlet response input stream. */ + private InputStream inputStream; + + /** The response content type. */ + private String contentType; + + /** The response character encoding. */ + private String characterEncoding; + + /** Indicates whether the ActionResult should be cached by browser. */ + private boolean cacheActionResult = false; + + /** The path of the actionResult template to render. */ + private String template; + + /** The model for the ActionResult {@link #template}. */ + private Map model; + + // Constructors ----------------------------------------------------------- + + /** + * Construct the ActionResult for the given template and model. + *

+ * When the ActionResult is rendered the template and model will be merged and + * the result will be streamed back to the client. + *

+ * For example: + *

+     * public class MyPage extends Page {
+     *     public void onInit() {
+     *
+     *         Behavior behavior = new DefaultAjaxBehavior() {
+     *
+     *             public ActionResult onAction() {
+     *
+     *                 Map model = new HashMap();
+     *                 model.put("id", "link");
+     *
+     *                 // Note: we set XML as the content type
+     *                 ActionResult actionResult = new ActionResult("/js/actionResult.xml", model, ActionResult.XML);
+     *
+     *                 return actionResult;
+     *             }
+     *         }
+     *     }
+     * } 
+ * + * @param template the template to render and stream back to the client + * @param model the template data model + * @param contentType the response content type + */ + public ActionResult(String template, Map model, String contentType) { + this.template = template; + this.model = model; + this.contentType = contentType; + } + + /** + * Construct the ActionResult for the given reader and content type. + * + * @param reader the reader which characters must be streamed back to the + * client + * @param contentType the response content type + */ + public ActionResult(Reader reader, String contentType) { + this.reader = reader; + this.contentType = contentType; + } + + /** + * Construct the ActionResult for the given inputStream and content type. + * + * @param inputStream the input stream to stream back to the client + * @param contentType the response content type + */ + public ActionResult(InputStream inputStream, String contentType) { + this.inputStream = inputStream; + this.contentType = contentType; + } + + /** + * Construct the ActionResult for the given String content and content type. + * + * @param content the String content to stream back to the client + * @param contentType the response content type + */ + public ActionResult(String content, String contentType) { + this.content = content; + this.contentType = contentType; + } + + /** + * Construct the ActionResult for the given byte array and content type. + * + * @param bytes the byte array to stream back to the client + * @param contentType the response content type + */ + public ActionResult(byte[] bytes, String contentType) { + this.bytes = bytes; + this.contentType = contentType; + } + + /** + * Construct the ActionResult for the given content. The + * {@link jakarta.servlet.http.HttpServletResponse#setContentType(java.lang.String) response content type} + * will default to {@link #TEXT}, unless overridden. + * + * @param content the content to stream back to the client + */ + public ActionResult(String content) { + this.content = content; + } + + /** + * Construct a new empty ActionResult. The + * {@link jakarta.servlet.http.HttpServletResponse#setContentType(java.lang.String) response content type} + * will default to {@link #TEXT}, unless overridden. + */ + public ActionResult() { + } + + // Public Methods --------------------------------------------------------- + + /** + * Set whether the action result should be cached by the client browser or + * not. + *

+ * If false, Click will set the following headers to prevent browsers + * from caching the result: + *

+     * response.setHeader("Pragma", "no-cache");
+     * response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
+     * response.setDateHeader("Expires", new Date(1L).getTime()); 
+ * + * @param cacheActionResult indicates whether the action result should be cached + * by the client browser or not + */ + public void setCacheActionResult(boolean cacheActionResult) { + this.cacheActionResult = cacheActionResult; + } + + /** + * Return true if the action result should be cached by the client browser, + * defaults to false. It is highly unlikely that you would turn action result + * caching on. + * + * @return true if the action result should be cached by the client browser, + * false otherwise + */ + public boolean isCacheActionRestul() { + return cacheActionResult; + } + + /** + * Return the action result character encoding. If no character encoding is specified + * the request character encoding will be used. + * + * @return the action result character encoding + */ + public String getCharacterEncoding() { + return characterEncoding; + } + + /** + * Set the action result character encoding. If no character encoding is set the + * request character encoding will be used. + * + * @param characterEncoding the action result character encoding + */ + public void setCharacterEncoding(String characterEncoding) { + this.characterEncoding = characterEncoding; + } + + /** + * Set the action result response content type. If no content type is set it will + * default to {@value #TEXT}. + * + * @param contentType the action result response content type + */ + public void setContentType(String contentType) { + this.contentType = contentType; + } + + /** + * Return the action result content type, default is {@value #TEXT}. + * + * @return the response content type + */ + public String getContentType() { + if (contentType == null) { + contentType = TEXT; + } + return contentType; + } + + /** + * Set the content String to stream back to the client. + * + * @param content the content String to stream back to the client + */ + public void setContent(String content) { + this.content = content; + } + + /** + * Return the content String to stream back to the client. + * + * @return the content String to stream back to the client + */ + public String getContent() { + return content; + } + + /** + * Set the byte array to stream back to the client. + * + * @param bytes the byte array to stream back to the client + */ + public void setBytes(byte[] bytes, String contentType) { + this.bytes = bytes; + this.contentType = contentType; + } + + /** + * Return the byte array to stream back to the client. + * + * @return the byte array to stream back to the client + */ + public byte[] getBytes() { + return bytes; + } + + /** + * Set the content to stream back to the client. + * + * @param inputStream the inputStream to stream back to the client + */ + public void setInputStream(InputStream inputStream) { + this.inputStream = inputStream; + } + + /** + * Return the inputStream to stream back to the client. + * + * @return the inputStream to stream back to the client + */ + public InputStream getInputStream() { + return inputStream; + } + + /** + * Set the reader which characters are streamed back to the client. + * + * @param reader the reader which characters are streamed back to the client. + */ + public void setReader(Reader reader) { + this.reader = reader; + } + + /** + * Return the reader which characters are streamed back to the client. + * + * @return the reader which characters are streamed back to the client. + */ + public Reader getReader() { + return reader; + } + + /** + * Return the data model for the ActionResult {@link #template}. + * + * @return the data model for the ActionResult template + */ + public Map getModel() { + if (model == null) { + model = new HashMap(); + } + return model; + } + + /** + * Set the model of the ActionResult template to render. + *

+ * If the {@link #template} property is set, the template and {@link #model} + * will be merged and the result will be streamed back to the client. + * + * @param model the model of the template to render + */ + public void setModel(Map model) { + this.model = model; + } + + /** + * Return the template to render for this ActionResult. + * + * @return the template to render for this ActionResult + */ + public String getTemplate() { + return template; + } + + /** + * Set the template to render for this ActionResult. + * + * @param template the template to render for this ActionResult + */ + public void setTemplate(String template) { + this.template = template; + } + + /** + * Render the ActionResult to the client. + * + * @param context the request context + */ + public final void render(Context context) { + prepare(context); + renderActionResult(context); + } + + // Protected Methods ------------------------------------------------------ + + /** + * Render the ActionResult to the client. This method can be overridden + * by subclasses if custom rendering or direct access to the + * HttpServletResponse is required. + * + * @param context the request context + */ + protected void renderActionResult(Context context) { + + HttpServletResponse response = context.getResponse(); + + Reader localReader = getReader(); + InputStream localInputStream = getInputStream(); + + try { + String localContent = getContent(); + byte[] localBytes = getBytes(); + + String localTemplate = getTemplate(); + if (localTemplate != null) { + Map templateModel = getModel(); + if (templateModel == null) { + templateModel = new HashMap(); + } + String result = context.renderTemplate(localTemplate, templateModel); + localReader = new StringReader(result); + + } else if (localContent != null) { + localReader = new StringReader(localContent); + } else if (localBytes != null) { + localInputStream = new ByteArrayInputStream(localBytes); + } + + if (localReader != null) { + Writer writer = response.getWriter(); + char[] buffer = new char[WRITER_BUFFER_SIZE]; + int len = 0; + while (-1 != (len = localReader.read(buffer))) { + writer.write(buffer, 0, len); + } + writer.flush(); + writer.close(); + + } else if (localInputStream != null) { + byte[] buffer = new byte[OUTPUT_BUFFER_SIZE]; + int len = 0; + OutputStream outputStream = response.getOutputStream(); + while (-1 != (len = localInputStream.read(buffer))) { + outputStream.write(buffer, 0, len); + } + outputStream.flush(); + outputStream.close(); + } + + } catch (Exception e) { + throw new RuntimeException(e); + + } finally { + ClickUtils.close(localInputStream); + ClickUtils.close(localReader); + } + } + + // Private Methods -------------------------------------------------------- + + /** + * Prepare the ActionResult for rendering. + * + * @param context the request context + */ + private void prepare(Context context) { + HttpServletResponse response = context.getResponse(); + + if (!isCacheActionRestul()) { + // Set headers to disable cache + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); + response.setDateHeader("Expires", new Date(1L).getTime()); + } + + String localContentType = getContentType(); + + if (getCharacterEncoding() == null) { + + // Fallback to request character encoding + if (context.getRequest().getCharacterEncoding() != null) { + response.setContentType(localContentType + "; charset=" + + context.getRequest().getCharacterEncoding()); + } else { + response.setContentType(localContentType); + } + + } else { + response.setContentType(localContentType + "; charset=" + getCharacterEncoding()); + } + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/Behavior.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/Behavior.java new file mode 100644 index 0000000000..58ac8527e0 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/Behavior.java @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click; + +/** + * Behaviors provide a mechanism for changing how Controls behave at runtime. + * Behaviors are added to a Control and provides interceptor methods to decorate + * and enhance the source Control. + *

+ * Behaviors provide interceptor methods for specific Control life cycle events. + * These interceptor methods can be implemented to further process and decorate + * the control or its children. + *

+ * The following interceptor methods are defined: + * + *

    + *
  • preResponse - occurs before the control markup is written to the response
  • + *
  • preRenderHeadElements - occurs after preResponse but before the control + * {@link Control#getHeadElements() HEAD elements} are written to the response
  • + *
  • preDestroy - occurs before the Control {@link Control#onDestroy() onDestroy} + * event handler.
  • + *
+ * + * These interceptor methods allow the Behavior to decorate a control, + * for example: + * + *
    + *
  • add or remove Control HEAD elements such as JavaScript and CSS dependencies + * and setup scripts
  • + *
  • add or remove Control attributes such as "class", "style" etc.
  • + *
+ */ +public interface Behavior { + + /** + * This event occurs before the markup is written to the HttpServletResponse. + * + * @param source the control the behavior is registered with + */ + public void preResponse(Control source); + + /** + * This event occurs after {@link #preResponse(Control)}, + * but before the Control's {@link Control#getHeadElements()} is called. + * + * @param source the control the behavior is registered with + */ + public void preRenderHeadElements(Control source); + + /** + * This event occurs before the Control {@link Control#onDestroy() onDestroy} + * event handler. This event allows the behavior to cleanup or store Control + * state in the Session. + * + * @param source the control the behavior is registered with + */ + public void preDestroy(Control source); +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/ClickRequestWrapper.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/ClickRequestWrapper.java new file mode 100644 index 0000000000..482c832c77 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/ClickRequestWrapper.java @@ -0,0 +1,288 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click; + +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; + +import org.openidentityplatform.openam.click.service.FileUploadService; +import org.openidentityplatform.openam.click.util.ClickUtils; + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileUploadException; + +/** + * Provides a custom HttpServletRequest class for shielding users from + * multipart request parameters. Thus calling request.getParameter(String) + * will still work properly. + */ +class ClickRequestWrapper extends HttpServletRequestWrapper { + + /** + * The FileItem objects for "multipart" POST requests. + */ + private final Map fileItemMap; + + /** The request is a multi-part file upload POST request. */ + private final boolean isMultipartRequest; + + /** The map of "multipart" request parameter values. */ + private final Map multipartParameterMap; + + /** The wrapped servlet request. */ + private final HttpServletRequest request; + + // Constructors ----------------------------------------------------------- + + /** + * @see HttpServletRequestWrapper(HttpServletRequest) + */ + ClickRequestWrapper(final HttpServletRequest request, + final FileUploadService fileUploadService) { + super(request); + + this.isMultipartRequest = ClickUtils.isMultipartRequest(request); + this.request = request; + + if (isMultipartRequest) { + + Map requestParams = new HashMap(); + Map fileItems = new HashMap(); + + try { + List itemsList = new ArrayList(); + + try { + + itemsList = fileUploadService.parseRequest(request); + + } catch (FileUploadException fue) { + request.setAttribute(FileUploadService.UPLOAD_EXCEPTION, fue); + } + + for (FileItem fileItem : itemsList) { + String name = fileItem.getFieldName(); + String value = null; + + // Form fields are placed in the request parameter map, + // while file uploads are placed in the file item map. + if (fileItem.isFormField()) { + + if (request.getCharacterEncoding() == null) { + value = fileItem.getString(); + + } else { + try { + value = fileItem.getString(request.getCharacterEncoding()); + + } catch (UnsupportedEncodingException ex) { + throw new RuntimeException(ex); + } + } + + // Add the form field value to the parameters. + addToMapAsString(requestParams, name, value); + + } else { + // Add the file item to the list of file items. + addToMapAsFileItem(fileItems, name, fileItem); + } + } + + } catch (Throwable t) { + + // Don't throw error here as it will break Context creation. + // Instead add the error as a request attribute. + request.setAttribute(Context.CONTEXT_FATAL_ERROR, t); + + } finally { + fileItemMap = Collections.unmodifiableMap(fileItems); + multipartParameterMap = Collections.unmodifiableMap(requestParams); + } + + } else { + fileItemMap = Collections.emptyMap(); + multipartParameterMap = Collections.emptyMap(); + } + } + + // Public Methods --------------------------------------------------------- + + /** + * Returns a map of FileItem arrays keyed on request parameter + * name for "multipart" POST requests (file uploads). Thus each map entry + * will consist of one or more FileItem objects. + * + * @return map of FileItem arrays keyed on request parameter name + * for "multipart" POST requests + */ + public Map getFileItemMap() { + return fileItemMap; + } + + /** + * @see jakarta.servlet.ServletRequest#getParameter(String) + */ + @Override + public String getParameter(String name) { + if (isMultipartRequest) { + Object value = getMultipartParameterMap().get(name); + + if (value instanceof String) { + return (String) value; + } + + if (value instanceof String[]) { + String[] array = (String[]) value; + if (array.length >= 1) { + return array[0]; + } else { + return null; + } + } + + return (value == null ? null : value.toString()); + + } else { + return request.getParameter(name); + } + } + + /** + * @see jakarta.servlet.ServletRequest#getParameterNames() + */ + @Override + @SuppressWarnings("unchecked") + public Enumeration getParameterNames() { + if (isMultipartRequest) { + return Collections.enumeration(getMultipartParameterMap().keySet()); + + } else { + return request.getParameterNames(); + } + } + + /** + * @see jakarta.servlet.ServletRequest#getParameterValues(String) + */ + @Override + public String[] getParameterValues(String name) { + if (isMultipartRequest) { + Object values = getMultipartParameterMap().get(name); + if (values instanceof String) { + return new String[] { values.toString() }; + } + if (values instanceof String[]) { + return (String[]) values; + } else { + return null; + } + + } else { + return request.getParameterValues(name); + } + } + + /** + * @see jakarta.servlet.ServletRequest#getParameterMap() + */ + @Override + @SuppressWarnings("unchecked") + public Map getParameterMap() { + if (isMultipartRequest) { + return getMultipartParameterMap(); + } else { + return request.getParameterMap(); + } + } + + // Package Private Methods ------------------------------------------------ + + /** + * Return the map of "multipart" request parameter map. + * + * @return the "multipart" request parameter map + */ + @SuppressWarnings("unchecked") + Map getMultipartParameterMap() { + if (request.getAttribute(ClickServlet.MOCK_MODE_ENABLED) == null) { + return multipartParameterMap; + } else { + // In mock mode return the request parameter map. This ensures + // calling request.setParameter(x,y) works for both normal and + // multipart requests. + return request.getParameterMap(); + } + } + + // Private Methods -------------------------------------------------------- + + /** + * Stores the specified value in a FileItem array in the map, under the + * specified name. Thus two values stored under the same name will be + * stored in the same array. + * + * @param map the map to add the specified name and value to + * @param name the name of the map key + * @param value the value to add to the FileItem array + */ + private void addToMapAsFileItem(Map map, String name, FileItem value) { + FileItem[] oldValues = map.get(name); + FileItem[] newValues = null; + if (oldValues == null) { + newValues = new FileItem[] {value}; + } else { + newValues = new FileItem[oldValues.length + 1]; + System.arraycopy(oldValues, 0, newValues, 0, oldValues.length); + newValues[oldValues.length] = value; + } + map.put(name, newValues); + } + + /** + * Stores the specified value in an String array in the map, under the + * specified name. Thus two values stored under the same name will be + * stored in the same array. + * + * @param map the map to add the specified name and value to + * @param name the name of the map key + * @param value the value to add to the string array + */ + private void addToMapAsString(Map map, String name, String value) { + String[] oldValues = map.get(name); + String[] newValues = null; + if (oldValues == null) { + newValues = new String[] {value}; + } else { + newValues = new String[oldValues.length + 1]; + System.arraycopy(oldValues, 0, newValues, 0, oldValues.length); + newValues[oldValues.length] = value; + } + map.put(name, newValues); + } + +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/ClickServlet.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/ClickServlet.java new file mode 100644 index 0000000000..e8ff6b2fe8 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/ClickServlet.java @@ -0,0 +1,2305 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.openidentityplatform.openam.click; + +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.io.Writer; +import java.lang.reflect.Field; +import java.util.Collections; +import java.util.Date; +import java.util.Enumeration; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import jakarta.servlet.RequestDispatcher; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.UnavailableException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; + +import ognl.DefaultMemberAccess; +import ognl.MemberAccess; +import ognl.Ognl; +import ognl.OgnlException; +import ognl.TypeConverter; + +import org.openidentityplatform.openam.click.service.ConfigService; +import org.openidentityplatform.openam.click.service.LogService; +import org.openidentityplatform.openam.click.service.ResourceService; +import org.apache.click.service.TemplateException; +import org.openidentityplatform.openam.click.service.XmlConfigService; +import org.openidentityplatform.openam.click.service.ConfigService.AutoBinding; +import org.openidentityplatform.openam.click.util.ClickUtils; +import org.openidentityplatform.openam.click.util.ErrorPage; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; +import org.openidentityplatform.openam.click.util.PageImports; +import org.apache.click.util.PropertyUtils; +import org.apache.click.util.RequestTypeConverter; +import org.apache.commons.lang.ClassUtils; +import org.apache.commons.lang.StringUtils; + +/** + * Provides the Click application HttpServlet. + *

+ * Generally developers will simply configure the ClickServlet and + * will not use it directly in their code. For a Click web application to + * function the ClickServlet must be configured in the web + * application's /WEB-INF/web.xml file. A simple web application which + * maps all *.htm requests to a ClickServlet is provided below. + * + *

+ * <web-app>
+ *    <servlet>
+ *       <servlet-name>click-servlet</servlet-name>
+ *       <servlet-class>org.apache.click.ClickServlet</servlet-class>
+ *       <load-on-startup>0</load-on-startup>
+ *    </servlet>
+ *    <servlet-mapping>
+ *       <servlet-name>click-servlet</servlet-name>
+ *       <url-pattern>*.htm</url-pattern>
+ *    </servlet-mapping>
+ * </web-app> 
+ * + * By default the ClickServlet will attempt to load an application + * configuration file using the path:   /WEB-INF/click.xml + * + *

Servlet Mapping

+ * By convention all Click page templates should have a .htm extension, and + * the ClickServlet should be mapped to process all *.htm URL requests. With + * this convention you have all the static HTML pages use a .html extension + * and they will not be processed as Click pages. + * + *

Load On Startup

+ * Note you should always set load-on-startup element to be 0 so the + * servlet is initialized when the server is started. This will prevent any + * delay for the first client which uses the application. + *

+ * The ClickServlet performs as much work as possible at startup to + * improve performance later on. The Click start up and caching strategy is + * configured with the Click application mode in the "click.xml" file. + * See the User Guide for information on how to configure the application mode. + * + *

ConfigService

+ * + * A single application {@link ConfigService} instance is created by the ClickServlet at + * startup. Once the ConfigService has been initialized it is stored in the + * ServletContext using the key {@value org.apache.click.service.ConfigService#CONTEXT_NAME}. + */ +public class ClickServlet extends HttpServlet { + + // -------------------------------------------------------------- Constants + + private static final long serialVersionUID = 1L; + + /** + * The mock page reference request attribute: key:   + * mock_page_reference. + *

+ * This attribute stores the each Page instance as a request attribute. + *

+ * Note: a page is only stored as a request attribute + * if the {@link #MOCK_MODE_ENABLED} attribute is set. + */ + static final String MOCK_PAGE_REFERENCE = "mock_page_reference"; + + /** + * The mock mode request attribute: key:   + * mock_mode_enabled. + *

+ * If this attribute is set (the value does not matter) certain features + * will be enabled which is needed for running Click in a mock environment. + */ + static final String MOCK_MODE_ENABLED = "mock_mode_enabled"; + + /** + * The click application configuration service classname init parameter name: + *   "config-service-class". + */ + protected final static String CONFIG_SERVICE_CLASS = "config-service-class"; + + /** + * The custom TypeConverter classname as an init parameter name: + * &nbps; "type-converter-class". + */ + protected final static String TYPE_CONVERTER_CLASS = "type-converter-class"; + + /** + * The forwarded request marker attribute:   "click-forward". + */ + protected final static String CLICK_FORWARD = "click-forward"; + + /** + * The Page to forward to request attribute:   "click-page". + */ + protected final static String FORWARD_PAGE = "forward-page"; + + // ----------------------------------------------------- Instance Variables + + /** The click application configuration service. */ + protected ConfigService configService; + + /** The application log service. */ + protected LogService logger; + + /** The OGNL member access handler. */ + protected MemberAccess memberAccess; + + /** The application resource service. */ + protected ResourceService resourceService; + + /** The request parameters OGNL type converter. */ + protected TypeConverter typeConverter; + + /** The thread local page listeners. */ + private static final ThreadLocal> + THREAD_LOCAL_INTERCEPTORS = new ThreadLocal<>(); + + // --------------------------------------------------------- Public Methods + + /** + * Initialize the Click servlet and the Velocity runtime. + * + * @see jakarta.servlet.GenericServlet#init() + * + * @throws ServletException if the application configuration service could + * not be initialized + */ + @Override + public void init() throws ServletException { + + try { + + // Create and initialize the application config service + configService = createConfigService(getServletContext()); + initConfigService(getServletContext()); + logger = configService.getLogService(); + + if (logger.isInfoEnabled()) { + logger.info("Click " + ClickUtils.getClickVersion() + + " initialized in " + configService.getApplicationMode() + + " mode"); + } + + resourceService = configService.getResourceService(); + + } catch (Throwable e) { + // In mock mode this exception can occur if click.xml is not + // available. + if (getServletContext().getAttribute(MOCK_MODE_ENABLED) != null) { + return; + } + + e.printStackTrace(); + + String msg = "error while initializing Click servlet; throwing " + + "jakarta.servlet.UnavailableException"; + + log(msg, e); + + throw new UnavailableException(e.toString()); + } + } + + /** + * @see jakarta.servlet.GenericServlet#destroy() + */ + @Override + public void destroy() { + + try { + + // Destroy the application config service + destroyConfigService(getServletContext()); + + } catch (Throwable e) { + // In mock mode this exception can occur if click.xml is not + // available. + if (getServletContext().getAttribute(MOCK_MODE_ENABLED) != null) { + return; + } + + e.printStackTrace(); + + String msg = "error while destroying Click servlet, throwing " + + "jakarta.servlet.UnavailableException"; + + log(msg, e); + + } finally { + // Dereference the application config service + configService = null; + } + + super.destroy(); + } + + // ------------------------------------------------------ Protected Methods + + /** + * Handle HTTP GET requests. This method will delegate the request to + * {@link #handleRequest(HttpServletRequest, HttpServletResponse, boolean)}. + * + * @see HttpServlet#doGet(HttpServletRequest, HttpServletResponse) + * + * @param request the servlet request + * @param response the servlet response + * @throws ServletException if click app has not been initialized + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + + handleRequest(request, response, false); + } + + /** + * Handle HTTP POST requests. This method will delegate the request to + * {@link #handleRequest(HttpServletRequest, HttpServletResponse, boolean)}. + * + * @see HttpServlet#doPost(HttpServletRequest, HttpServletResponse) + * + * @param request the servlet request + * @param response the servlet response + * @throws ServletException if click app has not been initialized + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException { + + handleRequest(request, response, true); + } + + /** + * Handle the given servlet request and render the results to the + * servlet response. + *

+ * If an exception occurs within this method the exception will be delegated + * to: + *

+ * {@link #handleException(HttpServletRequest, HttpServletResponse, boolean, Throwable, Class)} + * + * @param request the servlet request to process + * @param response the servlet response to render the results to + * @param isPost determines whether the request is a POST + * @throws IOException if resource request could not be served + */ + protected void handleRequest(HttpServletRequest request, + HttpServletResponse response, boolean isPost) throws IOException { + + // Handle requests for click resources, i.e. CSS, JS and image files + if (resourceService.isResourceRequest(request)) { + resourceService.renderResource(request, response); + return; + } + + long startTime = System.currentTimeMillis(); + + if (logger.isDebugEnabled()) { + HtmlStringBuffer buffer = new HtmlStringBuffer(200); + buffer.append(request.getMethod()); + buffer.append(" "); + buffer.append(request.getRequestURL()); + logger.debug(buffer); + } + + // Handle click page requests + Page page = null; + try { + + ActionEventDispatcher eventDispatcher = createActionEventDispatcher(); + // Bind ActionEventDispatcher to current thread + ActionEventDispatcher.pushThreadLocalDispatcher(eventDispatcher); + + ControlRegistry controlRegistry = createControlRegistry(); + // Bind ControlRegistry to current thread + ControlRegistry.pushThreadLocalRegistry(controlRegistry); + + Context context = createContext(request, response, isPost); + // Bind context to current thread + Context.pushThreadLocalContext(context); + + // Check for fatal error that occurred while creating Context + Throwable error = (Throwable) request.getAttribute(Context.CONTEXT_FATAL_ERROR); + + if (error != null) { + // Process exception through Click's exception handler. + if (error instanceof Exception) { + throw (Exception) error; + } + // Errors are not handled by Click, let the server handle it + if (error instanceof Error) { + throw (Error) error; + } else { + // Throwables are not handled by Click, let the server handle it + throw new RuntimeException(error); + } + } + + page = createPage(context); + + // If no page created, then an PageInterceptor has aborted processing + if (page == null) { + return; + } + + if (page.isStateful()) { + synchronized (page) { + processPage(page); + processPageOnDestroy(page, startTime); + // Mark page as already destroyed for finally block + page = null; + } + + } else { + processPage(page); + } + + } catch (Exception e) { + Class pageClass = + configService.getPageClass(ClickUtils.getResourcePath(request)); + + handleException(request, response, isPost, e, pageClass); + + } catch (ExceptionInInitializerError eiie) { + Throwable cause = eiie.getException(); + cause = (cause != null) ? cause : eiie; + + Class pageClass = + configService.getPageClass(ClickUtils.getResourcePath(request)); + + handleException(request, response, isPost, cause, pageClass); + + } finally { + + try { + if (page != null) { + if (page.isStateful()) { + synchronized (page) { + processPageOnDestroy(page, startTime); + } + + } else { + processPageOnDestroy(page, startTime); + } + } + + for (PageInterceptor interceptor : getThreadLocalInterceptors()) { + interceptor.postDestroy(page); + } + + setThreadLocalInterceptors(null); + + } finally { + // Only clear the context when running in normal mode. + if (request.getAttribute(MOCK_MODE_ENABLED) == null) { + Context.popThreadLocalContext(); + } + ControlRegistry.popThreadLocalRegistry(); + ActionEventDispatcher.popThreadLocalDispatcher(); + } + } + } + + /** + * Provides the application exception handler. The application exception + * will be delegated to the configured error page. The default error page is + * {@link ErrorPage} and the page template is "click/error.htm"

+ * Applications which wish to provide their own customized error handling + * must subclass ErrorPage and specify their page in the + * "/WEB-INF/click.xml" application configuration file. For example: + * + *

+     *  <page path="click/error.htm" classname="com.mycorp.util.ErrorPage"/>
+     * 
+ * + * If the ErrorPage throws an exception, it will be logged as an error and + * then be rethrown nested inside a RuntimeException. + * + * @param request the servlet request with the associated error + * @param response the servlet response + * @param isPost boolean flag denoting the request method is "POST" + * @param exception the error causing exception + * @param pageClass the page class with the error + */ + protected void handleException(HttpServletRequest request, + HttpServletResponse response, boolean isPost, Throwable exception, + Class pageClass) { + + if (isAjaxRequest(request)) { + handleAjaxException(request, response, isPost, exception, pageClass); + // Exit after handling ajax exception + return; + } + + if (exception instanceof TemplateException) { + TemplateException te = (TemplateException) exception; + if (!te.isParseError()) { + logger.error("handleException: ", exception); + } + + } else { + logger.error("handleException: ", exception); + } + + ErrorPage finalizeRef = null; + try { + final ErrorPage errorPage = createErrorPage(pageClass, exception); + + finalizeRef = errorPage; + + errorPage.setError(exception); + if (errorPage.getFormat() == null) { + errorPage.setFormat(configService.createFormat()); + } + errorPage.setHeaders(configService.getPageHeaders(ConfigService.ERROR_PATH)); + errorPage.setMode(configService.getApplicationMode()); + errorPage.setPageClass(pageClass); + errorPage.setPath(ConfigService.ERROR_PATH); + + processPageFields(errorPage, new ClickServlet.FieldCallback() { + public void processField(String fieldName, Object fieldValue) { + if (fieldValue instanceof Control) { + Control control = (Control) fieldValue; + if (control.getName() == null) { + control.setName(fieldName); + } + + if (!errorPage.getModel().containsKey(control.getName())) { + errorPage.addControl(control); + } + } + } + }); + + if (errorPage.isStateful()) { + synchronized (errorPage) { + processPage(errorPage); + processPageOnDestroy(errorPage, 0); + // Mark page as already destroyed for finally block + finalizeRef = null; + } + + } else { + processPage(errorPage); + } + + } catch (Exception ex) { + String message = + "handleError: " + ex.getClass().getName() + + " thrown while handling " + exception.getClass().getName() + + ". Now throwing RuntimeException."; + + logger.error(message, ex); + + throw new RuntimeException(ex); + + } finally { + if (finalizeRef != null) { + if (finalizeRef.isStateful()) { + synchronized (finalizeRef) { + processPageOnDestroy(finalizeRef, 0); + } + + } else { + processPageOnDestroy(finalizeRef, 0); + } + } + } + } + + /** + * Process the given page invoking its "on" event callback methods + * and directing the response. + *

+ * This method does not invoke the "onDestroy()" callback method. + * + * @see #processPageEvents(Page, Context) + * + * @param page the Page to process + * @throws Exception if an error occurs + */ + @SuppressWarnings("deprecation") + protected void processPage(Page page) throws Exception { + + final Context context = page.getContext(); + + PageImports pageImports = createPageImports(page); + page.setPageImports(pageImports); + + if (context.isAjaxRequest()) { + processAjaxPageEvents(page, context); + } else { + processPageEvents(page, context); + } + } + + /** + * Process the given page events, invoking the "on" event callback methods + * and directing the response. + *

+ * This method does not invoke the "onDestroy()" callback method. + * + * @param page the Page which events to process + * @param context the request context + * @throws Exception if an error occurs + */ + protected void processPageEvents(Page page, Context context) throws Exception { + + ActionEventDispatcher eventDispatcher = ActionEventDispatcher.getThreadLocalDispatcher(); + ControlRegistry controlRegistry = ControlRegistry.getThreadLocalRegistry(); + + boolean errorOccurred = page instanceof ErrorPage; + // Support direct access of click-error.htm + if (errorOccurred) { + ErrorPage errorPage = (ErrorPage) page; + errorPage.setMode(configService.getApplicationMode()); + + // Notify the eventDispatcher and controlRegistry of the error + eventDispatcher.errorOccurred(errorPage.getError()); + controlRegistry.errorOccurred(errorPage.getError()); + } + + boolean continueProcessing = performOnSecurityCheck(page, context); + + ActionResult actionResult = null; + if (continueProcessing && !errorOccurred) { + // Handle page method + String pageAction = context.getRequestParameter(Page.PAGE_ACTION); + if (pageAction != null) { + // Returned actionResult could be null + actionResult = performPageAction(page, pageAction, context); + continueProcessing = false; + } + } + + if (continueProcessing) { + performOnInit(page, context); + + continueProcessing = performOnProcess(page, context, eventDispatcher); + + if (continueProcessing) { + performOnPostOrGet(page, context, context.isPost()); + + performOnRender(page, context); + } + } + + controlRegistry.processPreResponse(context); + controlRegistry.processPreRenderHeadElements(context); + performRender(page, context, actionResult); + } + + /** + * Perform the onSecurityCheck event callback for the specified page, + * returning true if processing should continue, false otherwise. + * + * @param page the page to perform the security check on + * @param context the request context + * @return true if processing should continue, false otherwise + */ + protected boolean performOnSecurityCheck(Page page, Context context) { + boolean continueProcessing = page.onSecurityCheck(); + + if (logger.isTraceEnabled()) { + logger.trace(" invoked: " + + ClassUtils.getShortClassName(page.getClass()) + + ".onSecurityCheck() : " + continueProcessing); + } + return continueProcessing; + } + + /** + * Perform the page action for the given page and return the action result. + * + * @param page the page which action to perform + * @param pageAction the name of the page action + * @param context the request context + * @return the page action ActionResult instance + */ + protected ActionResult performPageAction(Page page, String pageAction, Context context) { + ActionResult actionResult = ClickUtils.invokeAction(page, pageAction); + + if (logger.isTraceEnabled()) { + HtmlStringBuffer buffer = new HtmlStringBuffer(); + String pageClassName = ClassUtils.getShortClassName(page.getClass()); + buffer.append(" invoked: "); + buffer.append(pageClassName); + buffer.append(".").append(pageAction).append("() : "); + if (actionResult == null) { + buffer.append("null (*no* ActionResult was returned by PageAction)"); + } else { + buffer.append(ClassUtils.getShortClassName(actionResult.getClass())); + } + logger.trace(buffer.toString()); + } + return actionResult; + } + + /** + * Perform the onInit event callback for the specified page. + * + * @param page the page to initialize + * @param context the request context + */ + protected void performOnInit(Page page, Context context) { + page.onInit(); + + if (logger.isTraceEnabled()) { + logger.trace(" invoked: " + + ClassUtils.getShortClassName(page.getClass()) + ".onInit()"); + } + + if (page.hasControls()) { + List controls = page.getControls(); + + for (int i = 0, size = controls.size(); i < size; i++) { + Control control = controls.get(i); + control.onInit(); + + if (logger.isTraceEnabled()) { + String controlClassName = control.getClass().getName(); + controlClassName = controlClassName.substring( + controlClassName.lastIndexOf('.') + 1); + String msg = " invoked: '" + control.getName() + "' " + + controlClassName + ".onInit()"; + logger.trace(msg); + } + } + } + } + + /** + * Perform onProcess event callback for the specified page, returning true + * if processing should continue, false otherwise. + * + * @param page the page to process + * @param context the request context + * @param eventDispatcher the action event dispatcher + * @return true if processing should continue, false otherwise + */ + protected boolean performOnProcess(Page page, Context context, + ActionEventDispatcher eventDispatcher) { + + boolean continueProcessing = true; + + // Make sure don't process a forwarded request + if (page.hasControls() && !context.isForward()) { + List controls = page.getControls(); + + for (int i = 0, size = controls.size(); i < size; i++) { + Control control = controls.get(i); + + int initialListenerCount = 0; + if (logger.isTraceEnabled()) { + initialListenerCount = eventDispatcher.getEventSourceList().size(); + } + + boolean onProcessResult = control.onProcess(); + if (!onProcessResult) { + continueProcessing = false; + } + + if (logger.isTraceEnabled()) { + String controlClassName = ClassUtils.getShortClassName(control.getClass()); + + String msg = " invoked: '" + control.getName() + "' " + + controlClassName + ".onProcess() : " + onProcessResult; + logger.trace(msg); + + if (initialListenerCount != eventDispatcher.getEventSourceList().size()) { + logger.trace(" listener was registered while processing control"); + } + } + } + + if (continueProcessing) { + // Fire registered action events + continueProcessing = eventDispatcher.fireActionEvents(context); + + if (logger.isTraceEnabled()) { + String msg = " invoked: Control listeners : " + + continueProcessing; + logger.trace(msg); + } + } + } + + return continueProcessing; + } + + /** + * Perform onPost or onGet event callback for the specified page. + * + * @param page the page for which the onGet or onPost is performed + * @param context the request context + * @param isPost specifies whether the request is a post or a get + */ + protected void performOnPostOrGet(Page page, Context context, boolean isPost) { + if (isPost) { + page.onPost(); + + if (logger.isTraceEnabled()) { + logger.trace(" invoked: " + + ClassUtils.getShortClassName(page.getClass()) + ".onPost()"); + } + + } else { + page.onGet(); + + if (logger.isTraceEnabled()) { + logger.trace(" invoked: " + + ClassUtils.getShortClassName(page.getClass()) + ".onGet()"); + } + } + } + + /** + * Perform onRender event callback for the specified page. + * + * @param page page to render + * @param context the request context + */ + protected void performOnRender(Page page, Context context) { + page.onRender(); + + if (logger.isTraceEnabled()) { + logger.trace(" invoked: " + + ClassUtils.getShortClassName(page.getClass()) + ".onRender()"); + } + + if (page.hasControls()) { + List controls = page.getControls(); + + for (int i = 0, size = controls.size(); i < size; i++) { + Control control = controls.get(i); + control.onRender(); + + if (logger.isTraceEnabled()) { + String controlClassName = control.getClass().getName(); + controlClassName = controlClassName.substring(controlClassName. + lastIndexOf('.') + 1); + String msg = " invoked: '" + control.getName() + "' " + + controlClassName + ".onRender()"; + logger.trace(msg); + } + } + } + } + + /** + * Performs rendering of the specified page. + * + * @param page page to render + * @param context the request context + * @throws java.lang.Exception if error occurs + */ + protected void performRender(Page page, Context context) throws Exception { + performRender(page, context, null); + } + + /** + * Performs rendering of the specified page. + * + * @param page page to render + * @param context the request context + * @param actionResult the action result + * @throws java.lang.Exception if error occurs + */ + protected void performRender(Page page, Context context, ActionResult actionResult) + throws Exception { + + // Process page interceptors, and abort rendering if specified + for (PageInterceptor interceptor : getThreadLocalInterceptors()) { + if (!interceptor.preResponse(page)) { + return; + } + } + + final HttpServletRequest request = context.getRequest(); + final HttpServletResponse response = context.getResponse(); + + if (StringUtils.isNotBlank(page.getRedirect())) { + String url = page.getRedirect(); + + url = response.encodeRedirectURL(url); + + if (logger.isTraceEnabled()) { + logger.debug(" redirect: " + url); + + } else if (logger.isDebugEnabled()) { + logger.debug("redirect: " + url); + } + + response.sendRedirect(url); + + } else if (StringUtils.isNotBlank(page.getForward())) { + // Indicates the request is forwarded + request.setAttribute(CLICK_FORWARD, CLICK_FORWARD); + + if (logger.isTraceEnabled()) { + logger.debug(" forward: " + page.getForward()); + + } else if (logger.isDebugEnabled()) { + logger.debug("forward: " + page.getForward()); + } + + if (page.getForward().endsWith(".jsp")) { + renderJSP(page); + + } else { + RequestDispatcher dispatcher = + request.getRequestDispatcher(page.getForward()); + + dispatcher.forward(request, response); + } + + } else if (actionResult != null) { + renderActionResult(actionResult, page, context); + + } else if (page.getPath() != null) { + // Render template unless the request was a page action. This check + // guards against the scenario where the page action returns null + // instead of a action result + if (context.getRequestParameter(Page.PAGE_ACTION) == null) { + String pagePath = page.getPath(); + + // Check if request is a JSP page + if (pagePath.endsWith(".jsp") || configService.isJspPage(pagePath)) { + // CLK-141. Set pagePath as the forward value. + page.setForward(StringUtils.replace(pagePath, ".htm", ".jsp")); + + // Indicates the request is forwarded + request.setAttribute(CLICK_FORWARD, CLICK_FORWARD); + renderJSP(page); + + } else { + renderTemplate(page); + } + } + + } else { + if (logger.isTraceEnabled()) { + logger.debug(" path not defined for " + page.getClass().getName()); + + } else if (logger.isDebugEnabled()) { + logger.debug("path not defined for " + page.getClass().getName()); + } + } + } + + /** + * Render the Velocity template defined by the page's path. + *

+ * This method creates a Velocity Context using the Page's model Map and + * then merges the template with the Context writing the result to the + * HTTP servlet response. + *

+ * This method was adapted from org.apache.velocity.servlet.VelocityServlet. + * + * @param page the page template to merge + * @throws Exception if an error occurs + */ + protected void renderTemplate(Page page) throws Exception { + + long startTime = System.currentTimeMillis(); + + final Map model = createTemplateModel(page); + + Context context = page.getContext(); + HttpServletResponse response = context.getResponse(); + + response.setContentType(page.getContentType()); + + Writer writer = getWriter(response); + + if (page.hasHeaders()) { + setPageResponseHeaders(response, page.getHeaders()); + } + + configService.getTemplateService().renderTemplate(page, model, writer); + + if (!configService.isProductionMode()) { + HtmlStringBuffer buffer = new HtmlStringBuffer(50); + if (logger.isTraceEnabled()) { + buffer.append(" "); + } + buffer.append("renderTemplate: "); + if (!page.getTemplate().equals(page.getPath())) { + buffer.append(page.getPath()); + buffer.append(","); + } + buffer.append(page.getTemplate()); + buffer.append(" - "); + buffer.append(System.currentTimeMillis() - startTime); + buffer.append(" ms"); + logger.info(buffer); + } + } + + /** + * Render the given page as a JSP to the response. + * + * @param page the page to render + * @throws Exception if an error occurs rendering the JSP + */ + protected void renderJSP(Page page) throws Exception { + + long startTime = System.currentTimeMillis(); + + HttpServletRequest request = page.getContext().getRequest(); + + HttpServletResponse response = page.getContext().getResponse(); + + setRequestAttributes(page); + + RequestDispatcher dispatcher = null; + + String forward = page.getForward(); + + // As "getTemplate" returns the page.getPath() by default, which is *.htm + // we need to change to *.jsp in order to compare to the page.getForward() + String jspTemplate = StringUtils.replace(page.getTemplate(), ".htm", ".jsp"); + + if (forward.equals(jspTemplate)) { + dispatcher = request.getRequestDispatcher(forward); + + } else { + dispatcher = request.getRequestDispatcher(page.getTemplate()); + } + + dispatcher.forward(request, response); + + if (!configService.isProductionMode()) { + HtmlStringBuffer buffer = new HtmlStringBuffer(50); + buffer.append("renderJSP: "); + if (!page.getTemplate().equals(page.getForward())) { + buffer.append(page.getTemplate()); + buffer.append(","); + } + buffer.append(page.getForward()); + buffer.append(" - "); + buffer.append(System.currentTimeMillis() - startTime); + buffer.append(" ms"); + logger.info(buffer); + } + } + + /** + * Render the given ActionResult. If the action result is null, nothing is + * rendered. + * + * @param actionResult the action result to render + * @param page the requested page + * @param context the request context + */ + protected void renderActionResult(ActionResult actionResult, Page page, Context context) { + if (actionResult == null) { + return; + } + + long startTime = System.currentTimeMillis(); + + actionResult.render(context); + + if (!configService.isProductionMode()) { + HtmlStringBuffer buffer = new HtmlStringBuffer(50); + if (logger.isTraceEnabled()) { + buffer.append(" "); + } + + buffer.append("renderActionResult ("); + buffer.append(actionResult.getContentType()); + buffer.append(")"); + String template = actionResult.getTemplate(); + if (template != null) { + buffer.append(": "); + buffer.append(template); + } + buffer.append(" - "); + buffer.append(System.currentTimeMillis() - startTime); + buffer.append(" ms"); + logger.info(buffer); + } + } + + /** + * Return a new Page instance for the given request context. This method will + * invoke {@link #initPage(String, Class, HttpServletRequest)} to create + * the Page instance and then set the properties on the page. + * + * @param context the page request context + * @return a new Page instance for the given request, or null if an + * PageInterceptor has aborted page creation + */ + protected Page createPage(Context context) { + + HttpServletRequest request = context.getRequest(); + + // Log request parameters + if (logger.isTraceEnabled()) { + logger.trace(" is Ajax request: " + context.isAjaxRequest()); + logRequestParameters(request); + } + + String path = context.getResourcePath(); + + if (request.getAttribute(FORWARD_PAGE) != null) { + Page forwardPage = (Page) request.getAttribute(FORWARD_PAGE); + + if (forwardPage.getFormat() == null) { + forwardPage.setFormat(configService.createFormat()); + } + + request.removeAttribute(FORWARD_PAGE); + + return forwardPage; + } + + Class pageClass = configService.getPageClass(path); + + if (pageClass == null) { + pageClass = configService.getNotFoundPageClass(); + path = ConfigService.NOT_FOUND_PATH; + } + // Set thread local app page listeners + List interceptors = configService.getPageInterceptors(); + setThreadLocalInterceptors(interceptors); + + for (PageInterceptor listener : interceptors) { + if (!listener.preCreate(pageClass, context)) { + return null; + } + } + + final Page page = initPage(path, pageClass, request); + + if (page.getFormat() == null) { + page.setFormat(configService.createFormat()); + } + + for (PageInterceptor listener : interceptors) { + if (!listener.postCreate(page)) { + return null; + } + } + + return page; + } + + /** + * Process the given pages controls onDestroy methods, reset the pages + * navigation state and process the pages onDestroy method. + * + * @param page the page to process + * @param startTime the start time to log if greater than 0 and not in + * production mode + */ + @SuppressWarnings("deprecation") + protected void processPageOnDestroy(Page page, long startTime) { + Context context = page.getContext(); + if (page.hasControls()) { + + // notify callbacks of destroy event + // TODO check that exceptions don't unnecessarily trigger preDestroy + ControlRegistry.getThreadLocalRegistry().processPreDestroy(context); + + List controls = page.getControls(); + + for (int i = 0, size = controls.size(); i < size; i++) { + try { + Control control = controls.get(i); + control.onDestroy(); + + if (logger.isTraceEnabled()) { + String controlClassName = control.getClass().getName(); + controlClassName = controlClassName.substring(controlClassName.lastIndexOf('.') + 1); + String msg = " invoked: '" + control.getName() + + "' " + controlClassName + ".onDestroy()"; + logger.trace(msg); + } + } catch (Throwable error) { + logger.error(error.toString(), error); + } + } + } + + // Reset the page navigation state + try { + // Reset the path + String path = context.getResourcePath(); + page.setPath(path); + + // Reset the forward + if (configService.isJspPage(path)) { + page.setForward(StringUtils.replace(path, ".htm", ".jsp")); + } else { + page.setForward((String) null); + } + + // Reset the redirect + page.setRedirect((String) null); + + } catch (Throwable error) { + logger.error(error.toString(), error); + } + + try { + page.onDestroy(); + + if (page.isStateful()) { + context.setSessionAttribute(page.getClass().getName(), page); + } else { + context.removeSessionAttribute(page.getClass().getName()); + } + + if (logger.isTraceEnabled()) { + String shortClassName = page.getClass().getName(); + shortClassName = + shortClassName.substring(shortClassName.lastIndexOf('.') + 1); + logger.trace(" invoked: " + shortClassName + ".onDestroy()"); + } + + if (!configService.isProductionMode() && startTime > 0) { + logger.info("handleRequest: " + page.getPath() + " - " + + (System.currentTimeMillis() - startTime) + + " ms"); + } + + } catch (Throwable error) { + logger.error(error.toString(), error); + + } finally { + // Nullify PageImports + page.setPageImports(null); + } + } + + /** + * Initialize a new page instance using + * {@link #newPageInstance(String, Class, HttpServletRequest)} method and + * setting format, headers and the forward if a JSP. + *

+ * This method will also automatically register any public Page controls + * in the page's model. When the page is created any public visible + * page Control variables will be automatically added to the page using + * the method {@link Page#addControl(Control)} method. If the controls name + * is not defined it is set to the member variables name before it is added + * to the page. + *

+ * This feature saves you from having to manually add the controls yourself. + * If you don't want the controls automatically added, simply declare them + * as non public variables. + *

+ * An example auto control registration is provided below. In this example + * the Table control is automatically added to the model using the name + * "table", and the ActionLink controls are added using the names + * "editDetailsLink" and "viewDetailsLink". + * + *

+     * public class OrderDetailsPage extends Page {
+     *
+     *     public Table table = new Table();
+     *     public ActionLink editDetailsLink = new ActionLink();
+     *     publicActionLink viewDetailsLink = new ActionLink();
+     *
+     *     public OrderDetailsPage() {
+     *         ..
+     *     }
+     * } 
+ * + * @param path the page path + * @param pageClass the page class + * @param request the page request + * @return initialized page + */ + protected Page initPage(String path, Class pageClass, + HttpServletRequest request) { + + try { + Page newPage = null; + + // Look up the page in the users session. + HttpSession session = request.getSession(false); + if (session != null) { + newPage = (Page) session.getAttribute(pageClass.getName()); + } + + if (newPage == null) { + newPage = newPageInstance(path, pageClass, request); + + if (logger.isTraceEnabled()) { + String shortClassName = pageClass.getName(); + shortClassName = + shortClassName.substring(shortClassName.lastIndexOf('.') + 1); + logger.trace(" invoked: " + shortClassName + ".<>"); + } + } + + activatePageInstance(newPage); + + Map defaultHeaders = configService.getPageHeaders(path); + if (newPage.hasHeaders()) { + + // Don't override existing headers + Map pageHeaders = newPage.getHeaders(); + for (Map.Entry entry : defaultHeaders.entrySet()) { + if (!pageHeaders.containsKey(entry.getKey())) { + pageHeaders.put(entry.getKey(), entry.getValue()); + } + } + + } else { + newPage.getHeaders().putAll(defaultHeaders); + } + + newPage.setPath(path); + + // Bind to final variable to enable callback processing + final Page page = newPage; + + if (configService.getAutoBindingMode() != AutoBinding.NONE) { + + processPageFields(newPage, new ClickServlet.FieldCallback() { + public void processField(String fieldName, Object fieldValue) { + if (fieldValue instanceof Control) { + Control control = (Control) fieldValue; + if (control.getName() == null) { + control.setName(fieldName); + } + + if (!page.getModel().containsKey(control.getName())) { + page.addControl(control); + } + } + } + }); + + processPageRequestParams(page); + } + + // In mock mode add the Page instance as a request attribute. + if (request.getAttribute(MOCK_MODE_ENABLED) != null) { + request.setAttribute(MOCK_PAGE_REFERENCE, page); + } + + return newPage; + + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * Process the page binding any request parameters to any public Page + * fields with the same name which are "primitive" types. These types + * include string, numbers and booleans. + *

+ * Type conversion is performed using the TypeConverter + * returned by the {@link #getTypeConverter()} method. + * + * @param page the page whose fields are to be processed + * @throws OgnlException if an error occurs + */ + protected void processPageRequestParams(Page page) throws OgnlException { + + if (configService.getPageFields(page.getClass()).isEmpty()) { + return; + } + + Map ognlContext = null; + + boolean customConverter = + ! getTypeConverter().getClass().equals(RequestTypeConverter.class); + + HttpServletRequest request = page.getContext().getRequest(); + + for (Enumeration e = request.getParameterNames(); e.hasMoreElements();) { + String name = e.nextElement().toString(); + String value = request.getParameter(name); + + if (StringUtils.isNotBlank(value)) { + + Field field = configService.getPageField(page.getClass(), name); + + if (field != null) { + Class type = field.getType(); + + if (customConverter + || (type.isPrimitive() + || String.class.isAssignableFrom(type) + || Number.class.isAssignableFrom(type) + || Boolean.class.isAssignableFrom(type))) { + + if (ognlContext == null) { + ognlContext = Ognl.createDefaultContext( + page, null, getTypeConverter(), getMemberAccess()); + } + + PropertyUtils.setValueOgnl(page, name, value, ognlContext); + + if (logger.isTraceEnabled()) { + logger.trace(" auto bound variable: " + name + "=" + value); + } + } + } + } + } + } + + /** + * Return a new Page instance for the given page path, class and request. + *

+ * The default implementation of this method simply creates new page + * instances: + *

+     * protected Page newPageInstance(String path, Class pageClass,
+     *     HttpServletRequest request) throws Exception {
+     *
+     *     return (Page) pageClass.newInstance();
+     * } 
+ * + * This method is designed to be overridden by applications providing their + * own page creation patterns. + *

+ * A typical example of this would be with Inversion of Control (IoC) + * frameworks such as Spring or HiveMind. For example a Spring application + * could override this method and use a ApplicationContext to instantiate + * new Page objects: + *

+     * protected Page newPageInstance(String path, Class pageClass,
+     *     HttpServletRequest request) throws Exception {
+     *
+     *     String beanName = path.substring(0, path.indexOf("."));
+     *
+     *     if (applicationContext.containsBean(beanName)) {
+     *         Page page = (Page) applicationContext.getBean(beanName);
+     *
+     *     } else {
+     *         page = (Page) pageClass.newInstance();
+     *     }
+     *
+     *     return page;
+     * } 
+ * + * @param path the request page path + * @param pageClass the page Class the request is mapped to + * @param request the page request + * @return a new Page object + * @throws Exception if an error occurs creating the Page + */ + protected Page newPageInstance(String path, Class pageClass, + HttpServletRequest request) throws Exception { + + return pageClass.newInstance(); + } + + /** + * Provides an extension point for ClickServlet sub classes to activate + * stateful page which may have been deserialized. + *

+ * This method does nothing and is designed for extension. + * + * @param page the page instance to activate + */ + protected void activatePageInstance(Page page) { + } + + /** + * Return a new VelocityContext for the given pages model and Context. + *

+ * The following values automatically added to the VelocityContext: + *

    + *
  • any public Page fields using the fields name
  • + *
  • context - the Servlet context path, e.g. /mycorp
  • + *
  • format - the {@link org.apache.click.util.Format} object for formatting + * the display of objects
  • + *
  • imports - the {@link org.apache.click.util.PageImports} object
  • + *
  • messages - the page messages bundle
  • + *
  • path - the page of the page template to render
  • + *
  • request - the pages servlet request
  • + *
  • response - the pages servlet request
  • + *
  • session - the {@link org.apache.click.util.SessionMap} adaptor for the + * users HttpSession
  • + *
+ * + * @see org.openidentityplatform.openam.click.util.ClickUtils#createTemplateModel(Page, Context) + * + * @param page the page to create a VelocityContext for + * @return a new VelocityContext + */ + @SuppressWarnings("deprecation") + protected Map createTemplateModel(final Page page) { + + if (configService.getAutoBindingMode() != AutoBinding.NONE) { + + processPageFields(page, new ClickServlet.FieldCallback() { + public void processField(String fieldName, Object fieldValue) { + if (fieldValue instanceof Control == false) { + page.addModel(fieldName, fieldValue); + + } else { + // Add any controls not already added to model + Control control = (Control) fieldValue; + if (!page.getModel().containsKey(control.getName())) { + page.addControl(control); + } + } + } + }); + } + + final Context context = page.getContext(); + final Map model = ClickUtils.createTemplateModel(page, context); + + PageImports pageImports = page.getPageImports(); + pageImports.populateTemplateModel(model); + + return model; + } + + /** + * Set the HTTP headers in the servlet response. The Page response headers + * are defined in {@link Page#getHeaders()}. + * + * @param response the response to set the headers in + * @param headers the map of HTTP headers to set in the response + */ + protected void setPageResponseHeaders(HttpServletResponse response, + Map headers) { + + for (Map.Entry entry : headers.entrySet()) { + String name = entry.getKey(); + Object value = entry.getValue(); + + if (value instanceof String) { + String strValue = (String) value; + if (!strValue.equalsIgnoreCase("Content-Encoding")) { + response.setHeader(name, strValue); + } + + } else if (value instanceof Date) { + long time = ((Date) value).getTime(); + response.setDateHeader(name, time); + + } else if (value instanceof Integer) { + int intValue = (Integer) value; + response.setIntHeader(name, intValue); + + } else if (value != null) { + throw new IllegalStateException("Invalid Page header value type: " + + value.getClass() + ". Header value must of type String, Date or Integer."); + } + } + } + + /** + * Set the page model, context, format, messages and path as request + * attributes to support JSP rendering. These request attributes include: + *
    + *
  • any public Page fields using the fields name
  • + *
  • context - the Servlet context path, e.g. /mycorp
  • + *
  • format - the {@link org.apache.click.util.Format} object for + * formatting the display of objects
  • + *
  • forward - the page forward path, if defined
  • + *
  • imports - the {@link org.apache.click.util.PageImports} object
  • + *
  • messages - the page messages bundle
  • + *
  • path - the page of the page template to render
  • + *
+ * + * @param page the page to set the request attributes on + */ + @SuppressWarnings("deprecation") + protected void setRequestAttributes(final Page page) { + final HttpServletRequest request = page.getContext().getRequest(); + + processPageFields(page, new ClickServlet.FieldCallback() { + public void processField(String fieldName, Object fieldValue) { + if (fieldValue instanceof Control == false) { + request.setAttribute(fieldName, fieldValue); + } else { + // Add any controls not already added to model + Control control = (Control) fieldValue; + if (!page.getModel().containsKey(control.getName())) { + page.addControl(control); + } + } + } + }); + + Map model = page.getModel(); + for (Map.Entry entry : model.entrySet()) { + String name = entry.getKey(); + Object value = entry.getValue(); + + request.setAttribute(name, value); + } + + request.setAttribute("context", request.getContextPath()); + if (model.containsKey("context")) { + String msg = page.getClass().getName() + " on " + page.getPath() + + " model contains an object keyed with reserved " + + "name \"context\". The request attribute " + + "has been replaced with the request " + + "context path"; + logger.warn(msg); + } + + request.setAttribute("format", page.getFormat()); + if (model.containsKey("format")) { + String msg = page.getClass().getName() + " on " + page.getPath() + + " model contains an object keyed with reserved " + + "name \"format\". The request attribute " + + "has been replaced with the format object"; + logger.warn(msg); + } + + request.setAttribute("forward", page.getForward()); + if (model.containsKey("forward")) { + String msg = page.getClass().getName() + " on " + page.getPath() + + " model contains an object keyed with reserved " + + "name \"forward\". The request attribute " + + "has been replaced with the page path"; + logger.warn(msg); + } + + request.setAttribute("path", page.getPath()); + if (model.containsKey("path")) { + String msg = page.getClass().getName() + " on " + page.getPath() + + " model contains an object keyed with reserved " + + "name \"path\". The request attribute " + + "has been replaced with the page path"; + logger.warn(msg); + } + + request.setAttribute("messages", page.getMessages()); + if (model.containsKey("messages")) { + String msg = page.getClass().getName() + " on " + page.getPath() + + " model contains an object keyed with reserved " + + "name \"messages\". The request attribute " + + "has been replaced with the page messages"; + logger.warn(msg); + } + + PageImports pageImports = page.getPageImports(); + pageImports.populateRequest(request, model); + } + + /** + * Return the request parameters OGNL TypeConverter. This method + * performs a lazy load of the TypeConverter object, using the classname + * defined in the Servlet init parameter type-converter-class, + * if this parameter is not defined this method will return a + * {@link RequestTypeConverter} instance. + * + * @return the request parameters OGNL TypeConverter + * @throws RuntimeException if the TypeConverter instance could not be created + */ + @SuppressWarnings("unchecked") + protected TypeConverter getTypeConverter() throws RuntimeException { + if (typeConverter == null) { + Class converter = RequestTypeConverter.class; + + try { + String classname = getInitParameter(TYPE_CONVERTER_CLASS); + if (StringUtils.isNotBlank(classname)) { + converter = ClickUtils.classForName(classname); + } + + typeConverter = converter.newInstance(); + + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + return typeConverter; + } + + /** + * Creates and returns a new Context instance for this path, class and + * request. + *

+ * The default implementation of this method simply creates a new Context + * instance. + *

+ * Subclasses can override this method to provide a custom Context. + * + * @param request the page request + * @param response the page response + * @param isPost true if this is a post request, false otherwise + * @return a Context instance + */ + protected Context createContext(HttpServletRequest request, + HttpServletResponse response, boolean isPost) { + + Context context = new Context(getServletContext(), + getServletConfig(), + request, + response, + isPost, + this); + return context; + } + + /** + * Creates and returns a new ActionEventDispatcher instance. + * + * @return the new ActionEventDispatcher instance + */ + protected ActionEventDispatcher createActionEventDispatcher() { + return new ActionEventDispatcher(configService); + } + + /** + * Creates and returns a new ControlRegistry instance. + * + * @return the new ControlRegistry instance + */ + protected ControlRegistry createControlRegistry() { + return new ControlRegistry(configService); + } + + /** + * Creates and returns a new ErrorPage instance. + *

+ * This method creates the custom page as specified in click.xml, + * otherwise the default ErrorPage instance. + *

+ * Subclasses can override this method to provide custom ErrorPages tailored + * for specific exceptions. + *

+ * Note you can safely use {@link Context} in this + * method. + * + * @param pageClass the page class with the error + * @param exception the error causing exception + * @return a new ErrorPage instance + */ + protected ErrorPage createErrorPage(Class pageClass, Throwable exception) { + try { + return (ErrorPage) configService.getErrorPageClass().newInstance(); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + /** + * Return the application configuration service instance. + * + * @return the application configuration service instance + */ + protected ConfigService getConfigService() { + return configService; + } + + /** + * Return a new Page instance for the given path. The path must start with + * a "/". + * + * @param path the path which maps to a Page class + * @param request the Page request + * @return a new Page object + * @throws IllegalArgumentException if the Page is not found + */ + @SuppressWarnings("unchecked") + protected T createPage(String path, HttpServletRequest request) { + Class pageClass = getConfigService().getPageClass(path); + + if (pageClass == null) { + String msg = "No Page class configured for path: " + path; + throw new IllegalArgumentException(msg); + } + + return (T) initPage(path, pageClass, request); + } + + /** + * Return a new Page instance for the page Class. + * + * @param pageClass the class of the Page to create + * @param request the Page request + * @return a new Page object + * @throws IllegalArgumentException if the Page Class is not configured + * with a unique path + */ + @SuppressWarnings("unchecked") + protected T createPage(Class pageClass, HttpServletRequest request) { + String path = getConfigService().getPagePath(pageClass); + + if (path == null) { + String msg = + "No path configured for Page class: " + pageClass.getName(); + throw new IllegalArgumentException(msg); + } + + return (T) initPage(path, pageClass, request); + } + + /** + * Creates and returns a new PageImports instance for the specified page. + * + * @param page the page to create a new PageImports instance for + * @return the new PageImports instance + */ + protected PageImports createPageImports(Page page) { + return new PageImports(page); + } + + // TODO refactor Page events into its a separate Livecycle class. This will + // take some of the responsibility off ClickServlet and remove code duplication + + /** + * Process the given page events, invoking the "on" event callback methods + * and directing the response. + * + * @param page the page which events to process + * @param context the request context + * @throws Exception if an error occurs + */ + protected void processAjaxPageEvents(Page page, Context context) throws Exception { + + ActionEventDispatcher eventDispatcher = ActionEventDispatcher.getThreadLocalDispatcher(); + + ControlRegistry controlRegistry = ControlRegistry.getThreadLocalRegistry(); + + // TODO Ajax requests shouldn't reach this code path since errors + // are rendered directly + if (page instanceof ErrorPage) { + ErrorPage errorPage = (ErrorPage) page; + errorPage.setMode(configService.getApplicationMode()); + + // Notify the dispatcher and registry of the error + eventDispatcher.errorOccurred(errorPage.getError()); + controlRegistry.errorOccurred(errorPage.getError()); + } + + boolean continueProcessing = performOnSecurityCheck(page, context); + + ActionResult actionResult = null; + if (continueProcessing) { + + // Handle page method + String pageAction = context.getRequestParameter(Page.PAGE_ACTION); + if (pageAction != null) { + continueProcessing = false; + + // Returned action result could be null + actionResult = performPageAction(page, pageAction, context); + + controlRegistry.processPreResponse(context); + controlRegistry.processPreRenderHeadElements(context); + + renderActionResult(actionResult, page, context); + } + } + + if (continueProcessing) { + performOnInit(page, context); + + // TODO: Ajax doesn't support forward. Is it still necessary to + // check isForward? + if (controlRegistry.hasAjaxTargetControls() && !context.isForward()) { + + // Perform onProcess for regsitered Ajax target controls + processAjaxTargetControls(context, eventDispatcher, controlRegistry); + + // Fire AjaxBehaviors registered during the onProcess event + // The target AjaxBehavior will set the eventDispatcher action + // result instance to render + eventDispatcher.fireAjaxBehaviors(context); + + // Ensure we execute the beforeResponse and beforeGetHeadElements + // for Ajax requests + controlRegistry.processPreResponse(context); + controlRegistry.processPreRenderHeadElements(context); + + actionResult = eventDispatcher.getActionResult(); + + // Render the actionResult + renderActionResult(actionResult, page, context); + + } else { + + // If no Ajax target controls have been registered fallback to + // the old behavior of processing and rendering the page template + if (logger.isTraceEnabled()) { + String msg = " *no* Ajax target controls have been registered." + + " Will process the page as a normal non Ajax request."; + logger.trace(msg); + } + + continueProcessing = performOnProcess(page, context, eventDispatcher); + + if (continueProcessing) { + performOnPostOrGet(page, context, context.isPost()); + + performOnRender(page, context); + } + + // If Ajax request does not target a valid page, return a 404 + // repsonse status, allowing JavaScript to display a proper message + if (ConfigService.NOT_FOUND_PATH.equals(page.getPath())) { + HttpServletResponse response = context.getResponse(); + response.setStatus(HttpServletResponse.SC_NOT_FOUND); + return; + } + + controlRegistry.processPreResponse(context); + controlRegistry.processPreRenderHeadElements(context); + performRender(page, context); + } + } else { + // If security check fails for an Ajax request, Click returns without + // any rendering. It is up to the user to render an ActionResult + // in the onSecurityCheck event + // Note: this code path is also followed if a pageAction is invoked + } + } + + /** + * Process all Ajax target controls and return true if the page should continue + * processing, false otherwise. + * + * @param context the request context + * @param eventDispatcher the event dispatcher + * @param controlRegistry the control registry + * @return true if the page should continue processing, false otherwise + */ + protected boolean processAjaxTargetControls(Context context, + ActionEventDispatcher eventDispatcher, ControlRegistry controlRegistry) { + + boolean continueProcessing = true; + + // Resolve the Ajax target control for this request + Control ajaxTarget = resolveAjaxTargetControl(context, controlRegistry); + + if (ajaxTarget != null) { + + // Process the control + if (!ajaxTarget.onProcess()) { + continueProcessing = false; + } + + // Log a trace if no behavior was registered after processing the control + if (logger.isTraceEnabled()) { + + HtmlStringBuffer buffer = new HtmlStringBuffer(); + String controlClassName = ClassUtils.getShortClassName(ajaxTarget.getClass()); + buffer.append(" invoked: '"); + buffer.append(ajaxTarget.getName()); + buffer.append("' ").append(controlClassName); + buffer.append(".onProcess() : ").append(continueProcessing); + logger.trace(buffer.toString()); + + if (!eventDispatcher.hasAjaxBehaviorSourceSet()) { + logger.trace(" *no* AjaxBehavior was registered while processing the control"); + } + } + } + + return continueProcessing; + } + + /** + * Provides an Ajax exception handler. Exceptions are wrapped inside a + * div element and streamed back to the browser. The response status + * is set to an {@link jakarta.servlet.http.HttpServletResponse#SC_INTERNAL_SERVER_ERROR HTTP 500 error} + * which allows the JavaScript that initiated the Ajax request to handle + * the error as appropriate. + *

+ * If Click is running in development modes the exception stackTrace + * will be rendered, in production modes an error message is + * rendered. + *

+ * Below is an example error response: + * + *

+     * <div id='errorReport' class='errorReport'>
+     * The application encountered an unexpected error.
+     * </div>
+     * 
+ * + * @param request the servlet request + * @param response the servlet response + * @param isPost determines whether the request is a POST + * @param exception the error causing exception + * @param pageClass the page class with the error + */ + protected void handleAjaxException(HttpServletRequest request, + HttpServletResponse response, boolean isPost, Throwable exception, + Class pageClass) { + + // If an exception occurs during an Ajax request, stream + // the exception instead of creating an ErrorPage + try { + + PrintWriter writer = null; + + try { + writer = getPrintWriter(response); + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + + // TODO: use an ErrorReport instance instead? + writer.write("
\n"); + + if (configService.isProductionMode() || configService.isProfileMode()) { + writer.write("The application encountered an unexpected error."); + } else { + exception.printStackTrace(writer); + } + + writer.write("\n
"); + } finally { + if (writer != null) { + writer.flush(); + } + } + } catch (Throwable error) { + logger.error(error.getMessage(), error); + throw new RuntimeException(error); + } + logger.error("handleException: ", exception); + } + + // ------------------------------------------------ Package Private Methods + + /** + * Return the OGNL MemberAccess. This method performs a lazy load + * of the MemberAccess object, using a {@link DefaultMemberAccess} instance. + * + * @return the OGNL MemberAccess + */ + MemberAccess getMemberAccess() { + if (memberAccess == null) { + memberAccess = new DefaultMemberAccess(true); + } + return memberAccess; + } + + /** + * Create a Click application ConfigService instance. + * + * @param servletContext the Servlet Context + * @return a new application ConfigService instance + * @throws Exception if an initialization error occurs + */ + @SuppressWarnings("unchecked") + ConfigService createConfigService(ServletContext servletContext) + throws Exception { + + Class serviceClass = XmlConfigService.class; + + String classname = servletContext.getInitParameter(CONFIG_SERVICE_CLASS); + if (StringUtils.isNotBlank(classname)) { + serviceClass = ClickUtils.classForName(classname); + } + + return serviceClass.newInstance(); + } + + /** + * Initialize the Click application ConfigService instance and bind + * it as a ServletContext attribute using the key + * "org.apache.click.service.ConfigService". + *

+ * This method will use the configuration service class specified by the + * {@link #CONFIG_SERVICE_CLASS} parameter, otherwise it will create a + * {@link org.apache.click.service.XmlConfigService} instance. + * + * @param servletContext the servlet context to retrieve the + * {@link #CONFIG_SERVICE_CLASS} from + * @throws RuntimeException if the configuration service cannot be + * initialized + */ + void initConfigService(ServletContext servletContext) { + + if (configService != null) { + try { + + // Note this order is very important as components need to lookup + // the configService out of the ServletContext while the service + // is being initialized. + servletContext.setAttribute(ConfigService.CONTEXT_NAME, configService); + + // Initialize the ConfigService instance + configService.onInit(servletContext); + + } catch (Exception e) { + + if (e instanceof RuntimeException) { + throw (RuntimeException) e; + } else { + throw new RuntimeException(e); + } + } + } + } + + /** + * Destroy the application configuration service instance and remove + * it from the ServletContext attribute. + * + * @param servletContext the servlet context + * @throws RuntimeException if the configuration service cannot be + * destroyed + */ + void destroyConfigService(ServletContext servletContext) { + + if (configService != null) { + + try { + configService.onDestroy(); + + } catch (Exception e) { + + if (e instanceof RuntimeException) { + throw (RuntimeException) e; + } else { + throw new RuntimeException(e); + } + } finally { + servletContext.setAttribute(ConfigService.CONTEXT_NAME, null); + } + } + } + + /** + * Process all the Pages public fields using the given callback. + * + * @param page the page to obtain the fields from + * @param callback the fields iterator callback + */ + void processPageFields(Page page, ClickServlet.FieldCallback callback) { + + Field[] fields = configService.getPageFieldArray(page.getClass()); + + if (fields != null) { + for (int i = 0; i < fields.length; i++) { + Field field = fields[i]; + + try { + Object fieldValue = field.get(page); + + if (fieldValue != null) { + callback.processField(field.getName(), fieldValue); + } + + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + } + + List getThreadLocalInterceptors() { + List listeners = + THREAD_LOCAL_INTERCEPTORS.get(); + + if (listeners != null) { + return listeners; + } else { + return Collections.emptyList(); + } + } + + void setThreadLocalInterceptors(List listeners) { + THREAD_LOCAL_INTERCEPTORS.set(listeners); + } + + /** + * Retrieve a writer instance for the given context. + * + * @param response the servlet response + * @return a writer instance + * @throws IOException if an input or output exception occurred + */ + Writer getWriter(HttpServletResponse response) throws IOException { + try { + + return response.getWriter(); + + } catch (IllegalStateException ignore) { + // If writer cannot be retrieved fallback to OutputStream. CLK-644 + return new OutputStreamWriter(response.getOutputStream(), + response.getCharacterEncoding()); + } + } + + /** + * Return a PrintWriter instance for the given response. + * + * @param response the servlet response + * @return a PrintWriter instance + */ + PrintWriter getPrintWriter(HttpServletResponse response) throws IOException { + Writer writer = getWriter(response); + if (writer instanceof PrintWriter) { + return (PrintWriter) writer; + } + return new PrintWriter(writer); + } + + /** + * Return true if this is an ajax request, false otherwise. + * + * @param request the servlet request + * @return true if this is an ajax request, false otherwise + */ + boolean isAjaxRequest(HttpServletRequest request) { + boolean isAjaxRequest = false; + if (Context.hasThreadLocalContext()) { + Context context = Context.getThreadLocalContext(); + if (context.isAjaxRequest()) { + isAjaxRequest = true; + } + } else { + isAjaxRequest = ClickUtils.isAjaxRequest(request); + } + return isAjaxRequest; + } + + // ---------------------------------------------------------- Inner Classes + + /** + * Field iterator callback. + */ + static interface FieldCallback { + + /** + * Callback method invoked for each field. + * + * @param fieldName the field name + * @param fieldValue the field value + */ + public void processField(String fieldName, Object fieldValue); + + } + + // Private methods -------------------------------------------------------- + + /** + * Resolve and return the Ajax target control for this request or null if no + * Ajax target was found. + * + * @param context the request context + * @param controlRegistry the control registry + * @return the target Ajax target control or null if no Ajax target was found + */ + private Control resolveAjaxTargetControl(Context context, ControlRegistry controlRegistry) { + + Control ajaxTarget = null; + + if (logger.isTraceEnabled()) { + logger.trace(" the following controls have been registered as potential Ajax targets:"); + if (controlRegistry.hasAjaxTargetControls()) { + for (Control control : controlRegistry.getAjaxTargetControls()) { + HtmlStringBuffer buffer = new HtmlStringBuffer(); + String controlClassName = ClassUtils.getShortClassName(control.getClass()); + buffer.append(" ").append(controlClassName); + buffer.append(": name='").append(control.getName()).append("'"); + logger.trace(buffer.toString()); + } + } else { + logger.trace(" *no* control has been registered"); + } + } + + for (Control control : controlRegistry.getAjaxTargetControls()) { + + if (control.isAjaxTarget(context)) { + ajaxTarget = control; + // The first matching control will be processed. Multiple matching + // controls are not supported + break; + } + } + + if (logger.isTraceEnabled()) { + if (ajaxTarget == null) { + String msg = " *no* target control was found for the Ajax request"; + logger.trace(msg); + + } else { + HtmlStringBuffer buffer = new HtmlStringBuffer(); + buffer.append(" invoked: '"); + buffer.append(ajaxTarget.getName()).append("' "); + String className = ClassUtils.getShortClassName(ajaxTarget.getClass()); + buffer.append(className); + buffer.append(".isAjaxTarget() : true (Ajax target control found)"); + logger.trace(buffer.toString()); + } + } + + return ajaxTarget; + } + + /** + * Log the request parameter names and values. + * + * @param request the HTTP servlet request + */ + private void logRequestParameters(HttpServletRequest request) { + + Map requestParams = new TreeMap(); + + Enumeration e = request.getParameterNames(); + while (e.hasMoreElements()) { + String name = e.nextElement().toString(); + String[] values = request.getParameterValues(name); + requestParams.put(name, values); + } + + for (Map.Entry entry : requestParams.entrySet()) { + String name = entry.getKey(); + String[] values = entry.getValue(); + + HtmlStringBuffer buffer = new HtmlStringBuffer(40); + buffer.append(" request param: " + name + "="); + + if (values == null) { + // ignore + } else if (values.length == 1) { + + buffer.append(ClickUtils.limitLength(values[0], 40)); + } else { + + for (int i = 0; i < values.length; i++) { + if (i == 0) { + buffer.append('['); + } else { + buffer.append(", "); + } + buffer.append(ClickUtils.limitLength(values[i], 40)); + } + buffer.append("]"); + } + + logger.trace(buffer.toString()); + } + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/Context.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/Context.java new file mode 100644 index 0000000000..ac6ddbe9b4 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/Context.java @@ -0,0 +1,973 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click; + +import java.io.StringWriter; +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.Locale; +import java.util.Map; + +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; + +import org.openidentityplatform.openam.click.service.FileUploadService; +import org.openidentityplatform.openam.click.service.LogService; +import org.openidentityplatform.openam.click.service.MessagesMapService; +import org.openidentityplatform.openam.click.service.TemplateService; +import org.openidentityplatform.openam.click.util.ClickUtils; +import org.apache.click.util.FlashAttribute; +import org.apache.commons.fileupload.FileItem; + +/** + * Provides the HTTP request context information for pages and controls. + * A new Context object is created for each Page request. The request Context + * object can be obtained from the thread local variable via the + * {@link org.openidentityplatform.openam.click.Context#getThreadLocalContext()} method. + */ +public class Context { + + // -------------------------------------------------------------- Constants + + /** The user's session Locale key:   locale. */ + public static final String LOCALE = "locale"; + + /** + * The attribute key used for storing any error that occurred while + * Context is created. + */ + static final String CONTEXT_FATAL_ERROR = "_context_fatal_error"; + + /** The thread local context stack. */ + private static final ThreadLocal THREAD_LOCAL_CONTEXT_STACK = new ThreadLocal<>(); + + // ----------------------------------------------------- Instance Variables + + /** The servlet context. */ + protected final ServletContext context; + + /** The servlet config. */ + protected final ServletConfig config; + + /** The HTTP method is POST flag. */ + protected final boolean isPost; + + /** The servlet response. */ + protected final HttpServletResponse response; + + /** The click services interface. */ + final ClickServlet clickServlet; + + /** The servlet request. */ + final HttpServletRequest request; + + // ----------------------------------------------------------- Constructors + + /** + * Create a new request context. + * + * @param context the servlet context + * @param config the servlet config + * @param request the servlet request + * @param response the servlet response + * @param isPost the servlet request is a POST + * @param clickServlet the click servlet instance + */ + public Context(ServletContext context, ServletConfig config, + HttpServletRequest request, HttpServletResponse response, + boolean isPost, ClickServlet clickServlet) { + + this.clickServlet = clickServlet; + this.context = context; + this.config = config; + this.isPost = isPost; + + Context.ContextStack contextStack = getContextStack(); + + if (contextStack.size() == 0) { + + // CLK-312. Apply request.setCharacterEncoding before wrapping + // request in ClickRequestWrapper + String charset = clickServlet.getConfigService().getCharset(); + if (charset != null) { + + try { + request.setCharacterEncoding(charset); + + } catch (UnsupportedEncodingException ex) { + String msg = + "The character encoding " + charset + " is invalid."; + LogService logService = + clickServlet.getConfigService().getLogService(); + logService.warn(msg, ex); + } + } + + FileUploadService fus = + clickServlet.getConfigService().getFileUploadService(); + + this.request = new ClickRequestWrapper(request, fus); + + } else { + this.request = request; + } + this.response = response; + } + + /** + * Package private constructor to support Mock objects. + * + * @param request the servlet request + * @param response the servlet response + */ + Context(HttpServletRequest request, HttpServletResponse response) { + // This method should be removed once the deprecated MockContext + // constructor is removed + this.request = request; + this.response = response; + this.clickServlet = null; + this.context = null; + this.config = null; + this.isPost = "POST".equalsIgnoreCase(request.getMethod()); + } + + // --------------------------------------------------------- Public Methods + + /** + * Return the thread local request context instance. + * + * @return the thread local request context instance. + * @throws RuntimeException if a Context is not available on the thread. + */ + public static Context getThreadLocalContext() { + return getContextStack().peek(); + } + + /** + * Returns true if a Context instance is available on the current thread, + * false otherwise. Unlike {@link #getThreadLocalContext()} this method + * can safely be used and will not throw an exception if Context is not + * available on the current thread. + *

+ * This method is very useful inside a {@link Control} constructor which + * might need access to the Context. As Controls could potentially be + * instantiated during Click startup (in order to deploy their resources), + * this check can be used to determine whether Context is available or not. + *

+ * For example: + * + *

+     * public MyControl extends AbstractControl {
+     *     public MyControl(String name) {
+     *         if (Context.hasThreadLocalContext()) {
+     *             // Context is available, meaning a user initiated a web
+     *             // request
+     *             Context context = getContext();
+     *             String state = (String) context.getSessionAttribute(name);
+     *             setValue(state);
+     *         } else {
+     *             // No Context is available, meaning this is most probably
+     *             // the application startup and deployment phase.
+     *         }
+     *     }
+     * }
+     * 
+ * + * @return true if a Context instance is available on the current thread, + * false otherwise + */ + public static boolean hasThreadLocalContext() { + Context.ContextStack contextStack = THREAD_LOCAL_CONTEXT_STACK.get(); + if (contextStack == null) { + return false; + } + return !contextStack.isEmpty(); + } + + /** + * Returns the servlet request. + * + * @return HttpServletRequest + */ + public HttpServletRequest getRequest() { + return request; + } + + /** + * Returns the servlet response. + * + * @return HttpServletResponse + */ + public HttpServletResponse getResponse() { + return response; + } + + /** + * Returns the servlet config. + * + * @return ServletConfig + */ + public ServletConfig getServletConfig() { + return config; + } + + /** + * Returns the servlet context. + * + * @return ServletContext + */ + public ServletContext getServletContext() { + return context; + } + + /** + * Return the user's HttpSession, creating one if necessary. + * + * @return the user's HttpSession, creating one if necessary. + */ + public HttpSession getSession() { + return request.getSession(); + } + + /** + * Return the page resource path from the request. For example: + *
+     * http://www.mycorp.com/banking/secure/login.htm  ->  /secure/login.htm 
+ * + * @return the page resource path from the request + */ + public String getResourcePath() { + return ClickUtils.getResourcePath(request); + } + + /** + * Return true if the request has been forwarded. A forwarded request + * will contain a {@link ClickServlet#CLICK_FORWARD} request attribute. + * + * @return true if the request has been forwarded + */ + public boolean isForward() { + return (request.getAttribute(ClickServlet.CLICK_FORWARD) != null); + } + + /** + * Return true if the HTTP request method is "POST". + * + * @return true if the HTTP request method is "POST" + */ + public boolean isPost() { + return isPost; + } + + /** + * Return true if the HTTP request method is "GET". + * + * @return true if the HTTP request method is "GET" + */ + public boolean isGet() { + return !isPost && getRequest().getMethod().equalsIgnoreCase("GET"); + } + + /** + * Return true is this is an Ajax request, false otherwise. + *

+ * An Ajax request is identified by the presence of the request header + * or request parameter: "X-Requested-With". + * "X-Requested-With" is the de-facto standard identifier used by + * Ajax libraries. + *

+ * Note: incoming requests that contains a request parameter + * "X-Requested-With" will result in this method returning true, even + * though the request itself was not initiated through a XmlHttpRequest + * object. This allows one to programmatically enable Ajax requests. A common + * use case for this feature is when uploading files through an IFrame element. + * By specifying "X-Requested-With" as a request parameter the IFrame + * request will be handled like a normal Ajax request. + * + * @return true if this is an Ajax request, false otherwise + */ + public boolean isAjaxRequest() { + return ClickUtils.isAjaxRequest(getRequest()); + } + + /** + * Return true if the request contains the named attribute. + * + * @param name the name of the request attribute + * @return true if the request contains the named attribute + */ + public boolean hasRequestAttribute(String name) { + return (getRequestAttribute(name) != null); + } + + /** + * Return the named request attribute, or null if not defined. + * + * @param name the name of the request attribute + * @return the named request attribute, or null if not defined + */ + public Object getRequestAttribute(String name) { + return request.getAttribute(name); + } + + /** + * This method will set the named object in the HTTP request. + * + * @param name the storage name for the object in the request + * @param value the object to store in the request + */ + public void setRequestAttribute(String name, Object value) { + request.setAttribute(name, value); + } + + /** + * Return true if the request contains the named parameter. + * + * @param name the name of the request parameter + * @return true if the request contains the named parameter + */ + public boolean hasRequestParameter(String name) { + if (name == null) { + throw new IllegalArgumentException("hasRequestParameter was called" + + " with null name argument. This is often caused when a" + + " Control binds to a request parameter, but its name was not" + + " set."); + } + return (getRequestParameter(name) != null); + } + + /** + * Return the named request parameter. This method supports + * "multipart/form-data" POST requests and should be used in + * preference to the HttpServletRequest method + * getParameter(). + * + * @see org.apache.click.control.Form#onProcess() + * @see #isMultipartRequest() + * @see #getFileItemMap() + * + * @param name the name of the request parameter + * @return the value of the request parameter. + */ + public String getRequestParameter(String name) { + if (name == null) { + throw new IllegalArgumentException("getRequestParameter was called" + + " with null name argument. This is often caused when a" + + " Control binds to a request parameter, but its name was not" + + " set."); + } + return request.getParameter(name); + } + + /** + * Returns an array of String objects containing all of the values the given + * request parameter has, or null if the parameter does not exist. + * + * @param name a String containing the name of the parameter whose + * value is requested + * @return an array of String objects containing the parameter's values + */ + public String[] getRequestParameterValues(String name) { + if (name == null) { + throw new IllegalArgumentException("getRequestParameter was called" + + " with null name argument. This is often caused when a" + + " Control binds to a request parameter, but its name was not" + + " set."); + } + return request.getParameterValues(name); + } + + /** + * Return the named session attribute, or null if not defined. + *

+ * If the session is not defined this method will return null, and a + * session will not be created. + *

+ * This method supports {@link FlashAttribute} which when accessed are then + * removed from the session. + * + * @param name the name of the session attribute + * @return the named session attribute, or null if not defined + */ + public Object getSessionAttribute(String name) { + if (hasSession()) { + Object object = getSession().getAttribute(name); + + if (object instanceof FlashAttribute) { + FlashAttribute flashObject = (FlashAttribute) object; + object = flashObject.getValue(); + removeSessionAttribute(name); + } + + return object; + } else { + return null; + } + } + + /** + * This method will set the named object in the HttpSession. + *

+ * This method will create a session if one does not already exist. + * + * @param name the storage name for the object in the session + * @param value the object to store in the session + */ + public void setSessionAttribute(String name, Object value) { + getSession().setAttribute(name, value); + } + + /** + * Remove the named attribute from the session. If the session does not + * exist or the name is null, this method does nothing. + * + * @param name of the attribute to remove from the session + */ + public void removeSessionAttribute(String name) { + if (hasSession() && name != null) { + getSession().removeAttribute(name); + } + } + + /** + * Return true if there is a session and it contains the named attribute. + * + * @param name the name of the attribute + * @return true if the session contains the named attribute + */ + public boolean hasSessionAttribute(String name) { + return (getSessionAttribute(name) != null); + } + + /** + * Return true if a HttpSession exists, or false otherwise. + * + * @return true if a HttpSession exists, or false otherwise + */ + public boolean hasSession() { + return (request.getSession(false) != null); + } + + /** + * This method will set the named object as a flash HttpSession object. + *

+ * The flash object will exist in the session until it is accessed once, + * and then removed. Flash objects are typically used to display a message + * once. + * + * @param name the storage name for the object in the session + * @param value the object to store in the session + */ + public void setFlashAttribute(String name, Object value) { + getSession().setAttribute(name, new FlashAttribute(value)); + } + + /** + * Return the cookie for the given name or null if not found. + * + * @param name the name of the cookie + * @return the cookie for the given name or null if not found + */ + public Cookie getCookie(String name) { + return ClickUtils.getCookie(getRequest(), name); + } + + /** + * Return the cookie value for the given name or null if not found. + * + * @param name the name of the cookie + * @return the cookie value for the given name or null if not found + */ + public String getCookieValue(String name) { + return ClickUtils.getCookieValue(getRequest(), name); + } + + /** + * Sets the given cookie value in the servlet response with the path "/". + *

+ * @see ClickUtils#setCookie(HttpServletRequest, HttpServletResponse, String, String, int, String) + * + * @param name the cookie name + * @param value the cookie value + * @param maxAge the maximum age of the cookie in seconds. A negative + * value will expire the cookie at the end of the session, while 0 will delete + * the cookie. + * @return the Cookie object created and set in the response + */ + public Cookie setCookie(String name, String value, int maxAge) { + return ClickUtils.setCookie(getRequest(), + getResponse(), + name, + value, + maxAge, + "/"); + } + + /** + * Invalidate the specified cookie and delete it from the response object. + * Deletes only cookies mapped against the root "/" path. + * + * @see ClickUtils#invalidateCookie(HttpServletRequest, HttpServletResponse, String) + * + * @param name the name of the cookie you want to delete. + */ + public void invalidateCookie(String name) { + ClickUtils.invalidateCookie(getRequest(), getResponse(), name); + } + + /** + * Return a new Page instance for the given path. + *

+ * This method can be used to create a target page for the + * {@link org.apache.click.Page#setForward(org.apache.click.Page)}, for example: + * + *

+     * UserEdit userEdit = (UserEdit) getContext().createPage("/user-edit.htm");
+     * userEdit.setUser(user);
+     *
+     * setForward(userEdit); 
+ * + * The given page path must start with a '/'. + * + * @param path the Page path as configured in the click.xml file + * @return a new Page object + * @throws IllegalArgumentException if the Page is not found + */ + @SuppressWarnings("unchecked") + public T createPage(String path) { + if (path == null || path.length() == 0) { + throw new IllegalArgumentException("page path cannot be null or empty"); + } + + if (path.charAt(0) != '/') { + throw new IllegalArgumentException("page path must start with a '/'"); + } + return (T) clickServlet.createPage(path, request); + } + + /** + * Return a new Page instance for the given class. + *

+ * This method can be used to create a target page for the + * {@link org.apache.click.Page#setForward(org.apache.click.Page)}, for example: + * + *

+     * UserEdit userEdit = (UserEdit) getContext().createPage(UserEdit.class);
+     * userEdit.setUser(user);
+     *
+     * setForward(userEdit); 
+ * + * @param pageClass the Page class as configured in the click.xml file + * @return a new Page object + * @throws IllegalArgumentException if the Page is not found, or is not + * configured with a unique path + */ + public T createPage(Class pageClass) { + return clickServlet.createPage(pageClass, request); + } + + /** + * Return the path for the given page Class. + * + * @param pageClass the class of the Page to lookup the path for + * @return the path for the given page Class + * @throws IllegalArgumentException if the Page Class is not configured + * with a unique path + */ + public String getPagePath(Class pageClass) { + return clickServlet.getConfigService().getPagePath(pageClass); + } + + /** + * Return the page Class for the given path. + * + * @param path the page path + * @return the page class for the given path + * @throws IllegalArgumentException if the Page Class for the path is not + * found + */ + public Class getPageClass(String path) { + return clickServlet.getConfigService().getPageClass(path); + } + + /** + * Return the Click application mode value:   + * ["production", "profile", "development", "debug", "trace"]. + * + * @return the application mode value + */ + public String getApplicationMode() { + return clickServlet.getConfigService().getApplicationMode(); + } + + /** + * Return the Click application charset or ISO-8859-1 if not is defined. + *

+ * The charset is defined in click.xml through the charset attribute + * on the click-app element. + * + *

+     * <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+     * <click-app charset="UTF-8">
+     *    ..
+     * </click-app> 
+ * + * @return the application charset or ISO-8859-1 if not defined + */ + public String getCharset() { + String charset = clickServlet.getConfigService().getCharset(); + if (charset == null) { + charset = "ISO-8859-1"; + } + return charset; + } + + /** + * Return a new messages map for the given baseClass (a page or control) + * and the given global resource bundle name. + * + * @param baseClass the target class + * @param globalResource the global resource bundle name + * @return a new messages map with the messages for the target. + */ + public Map createMessagesMap(Class baseClass, String globalResource) { + MessagesMapService messagesMapService = + clickServlet.getConfigService().getMessagesMapService(); + + return messagesMapService.createMessagesMap(baseClass, globalResource, getLocale()); + } + + /** + * Returns a map of FileItem arrays keyed on request parameter + * name for "multipart" POST requests (file uploads). Thus each map entry + * will consist of one or more FileItem objects. + * + * @return map of FileItem arrays keyed on request parameter name + * for "multipart" POST requests + */ + public Map getFileItemMap() { + return findClickRequestWrapper(request).getFileItemMap(); + } + + /** + * Returns the value of a request parameter as a FileItem, for + * "multipart" POST requests (file uploads), or null if the parameter + * is not found. + *

+ * If there were multivalued parameters in the request (ie two or more + * file upload fields with the same name), the first fileItem + * in the array is returned. + * + * @param name the name of the parameter of the fileItem to retrieve + * + * @return the fileItem for the specified name + */ + public FileItem getFileItem(String name) { + Object value = findClickRequestWrapper(request).getFileItemMap().get(name); + + if (value != null) { + if (value instanceof FileItem[]) { + FileItem[] array = (FileItem[]) value; + if (array.length >= 1) { + return array[0]; + } + } else if (value instanceof FileItem) { + return (FileItem) value; + } + } + return null; + } + + /** + * Return the users Locale. + *

+ * If the users Locale is stored in their session this will be returned. + * Else if the click-app configuration defines a default Locale this + * value will be returned, otherwise the request's Locale will be returned. + *

+ * To override the default request Locale set the users Locale using the + * {@link #setLocale(Locale)} method. + *

+ * Pages and Controls obtain the users Locale using this method. + * + * @return the users Locale in the session, or if null the request Locale + */ + public Locale getLocale() { + Locale locale = (Locale) getSessionAttribute(LOCALE); + + if (locale == null) { + + if (clickServlet.getConfigService().getLocale() != null) { + locale = clickServlet.getConfigService().getLocale(); + + } else { + locale = getRequest().getLocale(); + } + } + + return locale; + } + + /** + * This method stores the given Locale in the users session. If the given + * Locale is null, the "locale" attribute will be removed from the session. + *

+ * The Locale object is stored in the session using the {@link #LOCALE} + * key. + * + * @param locale the Locale to store in the users session using the key + * "locale" + */ + public void setLocale(Locale locale) { + if (locale == null && hasSession()) { + getSession().removeAttribute(LOCALE); + } else { + setSessionAttribute(LOCALE, locale); + } + } + + /** + * Return true if the request is a multi-part content type POST request. + * + * @return true if the request is a multi-part content type POST request + */ + public boolean isMultipartRequest() { + return ClickUtils.isMultipartRequest(request); + } + + /** + * Return a rendered Velocity template and model for the given + * class and model data. + *

+ * This method will merge the class .htm Velocity template and + * model data using the applications Velocity Engine. + *

+ * An example of the class template resolution is provided below: + *

+     * // Full class name
+     * com.mycorp.control.CustomTextField
+     *
+     * // Template path name
+     * /com/mycorp/control/CustomTextField.htm 
+ * + * Example method usage: + *
+     * public String toString() {
+     *     Map model = getModel();
+     *     return getContext().renderTemplate(getClass(), model);
+     * } 
+ * + * @param templateClass the class to resolve the template for + * @param model the model data to merge with the template + * @return rendered Velocity template merged with the model data + * @throws RuntimeException if an error occurs + */ + @SuppressWarnings("unchecked") + public String renderTemplate(Class templateClass, Map model) { + + if (templateClass == null) { + String msg = "Null templateClass parameter"; + throw new IllegalArgumentException(msg); + } + + String templatePath = templateClass.getName(); + templatePath = '/' + templatePath.replace('.', '/') + ".htm"; + + return renderTemplate(templatePath, model); + } + + /** + * Return a rendered Velocity template and model data. + *

+ * Example method usage: + *

+     * public String toString() {
+     *     Map model = getModel();
+     *     return getContext().renderTemplate("/custom-table.htm", model);
+     * } 
+ * + * @param templatePath the path of the Velocity template to render + * @param model the model data to merge with the template + * @return rendered Velocity template merged with the model data + * @throws RuntimeException if an error occurs + */ + public String renderTemplate(String templatePath, Map model) { + + if (templatePath == null) { + String msg = "Null templatePath parameter"; + throw new IllegalArgumentException(msg); + } + + if (model == null) { + String msg = "Null model parameter"; + throw new IllegalArgumentException(msg); + } + + StringWriter stringWriter = new StringWriter(1024); + + TemplateService templateService = + clickServlet.getConfigService().getTemplateService(); + + try { + templateService.renderTemplate(templatePath, model, stringWriter); + + } catch (Exception e) { + String msg = "Error occurred rendering template: " + + templatePath + "\n"; + clickServlet.getConfigService().getLogService().error(msg, e); + + throw new RuntimeException(e); + } + + return stringWriter.toString(); + } + + // ------------------------------------------------ Package Private Methods + + /** + * Return the stack data structure where Context's are stored. + * + * @return stack data structure where Context's are stored + */ + static Context.ContextStack getContextStack() { + Context.ContextStack contextStack = THREAD_LOCAL_CONTEXT_STACK.get(); + + if (contextStack == null) { + contextStack = new Context.ContextStack(2); + THREAD_LOCAL_CONTEXT_STACK.set(contextStack); + } + + return contextStack; + } + + /** + * Adds the specified Context on top of the Context stack. + * + * @param context a context instance + */ + static void pushThreadLocalContext(Context context) { + getContextStack().push(context); + } + + /** + * Remove and return the context instance on top of the context stack. + * + * @return the context instance on top of the context stack + */ + static Context popThreadLocalContext() { + Context.ContextStack contextStack = getContextStack(); + Context context = contextStack.pop(); + + if (contextStack.isEmpty()) { + THREAD_LOCAL_CONTEXT_STACK.remove(); + } + + return context; + } + + /** + * Find and return the ClickRequestWrapper that is wrapped by the specified + * request. + * + * @param request the servlet request that wraps the ClickRequestWrapper + * @return the wrapped servlet request + */ + static ClickRequestWrapper findClickRequestWrapper(ServletRequest request) { + + while (!(request instanceof ClickRequestWrapper) + && request instanceof HttpServletRequestWrapper + && request != null) { + request = ((HttpServletRequestWrapper) request).getRequest(); + } + + if (request instanceof ClickRequestWrapper) { + return (ClickRequestWrapper) request; + } else { + throw new IllegalStateException("Click request is not present"); + } + } + + // -------------------------------------------------- Inner Classes + + /** + * Provides an unsynchronized Context Stack. + */ + static final class ContextStack extends ArrayList { + + /** Serialization version indicator. */ + private static final long serialVersionUID = 1L; + + /** + * Create a new ContextStack with the given initial capacity. + * + * @param initialCapacity specify initial capacity of this stack + */ + private ContextStack(int initialCapacity) { + super(initialCapacity); + } + + /** + * Pushes the Context onto the top of this stack. + * + * @param context the Context to push onto this stack + * @return the Context pushed on this stack + */ + private Context push(Context context) { + add(context); + + return context; + } + + /** + * Removes and return the Context at the top of this stack. + * + * @return the Context at the top of this stack + */ + private Context pop() { + Context context = peek(); + + remove(size() - 1); + + return context; + } + + /** + * Looks at the Context at the top of this stack without removing it. + * + * @return the Context at the top of this stack + */ + private Context peek() { + int length = size(); + + if (length == 0) { + String msg = "No Context available on ThreadLocal Context Stack"; + throw new RuntimeException(msg); + } + + return get(length - 1); + } + } + +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/Control.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/Control.java new file mode 100644 index 0000000000..96d0c9d548 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/Control.java @@ -0,0 +1,496 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.openidentityplatform.openam.click; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import jakarta.servlet.ServletContext; + +import org.openidentityplatform.openam.click.element.Element; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; + +/** + * Provides the interface for Page controls. Controls are also referred to + * as components or widgets. + *

+ * When a Page request event is processed Controls may perform server side event + * processing through their {@link #onProcess()} method. Controls are generally + * rendered in a Page by calling their toString() method. + *

+ * The Control execution sequence is illustrated below: + *

+ * + * + *

HTML HEAD Elements

+ * + * Control HTML HEAD elements can be included in the Page by overriding the + * {@link #getHeadElements()} method. + *

+ * Below is an example of a custom TextField control specifying that the + * custom.js file should be included in the HTML HEADer: + * + *

+ * public class CustomField extends TextField {
+ *
+ *     public List getHeadElements() {
+ *         if(headElements == null) {
+ *             // If headElements is null, create default headElements
+ *             headElements = super.getHeadElements();
+ *
+ *             // Add a new JavaScript Import Element for the "/custom.js" script
+ *             headElements.add(new JsImport("/click/custom.js"));
+ *         }
+ *         return headElements;
+ *     }
+ *
+ *     ..
+ * } 
+ * + * + *

Deploying Resources

+ * + * The Click framework uses the Velocity Tools WebappResourceLoader for loading templates. + * This avoids issues associate with using the Velocity ClasspathResourceLoader and + * FileResourceLoader on J2EE application servers. + * To make preconfigured resources (templates, JavaScript, stylesheets, etc.) + * available to web applications Click automatically deploys configured classpath + * resources to the /click directory at startup + * (existing files will not be overwritten). + *

+ * Click supports two ways of deploying pre-configured resources. The recommended + * deployment strategy (which also the simplest) relies on packaging resources + * into a special folder of the JAR, called 'META-INF/resources'. At + * startup time Click will scan this folder for resources and deploy them to the + * web application. This deployment strategy is the same approach taken by the + * Servlet 3.0 specification. Please see the section + * Deploying Custom Resources + * for more details. + *

+ * An alternative approach to deploying static resources on startup is provided + * by the Control interface through the {@link #onDeploy(ServletContext)} method. + *

+ * Continuing our example, the CustomField control deploys its + * custom.js file to the /click directory: + * + *

+ * public class CustomField extends TextField {
+ *     ..
+ *
+ *     public void onDeploy(ServletContext servletContext) {
+ *         ClickUtils.deployFile
+ *             (servletContext, "/com/mycorp/control/custom.js", "click");
+ *     }
+ * } 
+ * + * Controls using the onDeploy() method must be registered in the + * application WEB-INF/click.xml for them to be invoked. + * For example: + * + *
+ * <click-app>
+ *   <pages package="com.mycorp.page" automapping="true"/>
+ *
+ *   <controls>
+ *     <control classname="com.mycorp.control.CustomField"/>
+ *   </controls>
+ * </click-app> 
+ * + * When the Click application starts up it will deploy any control elements + * defined in the following files in sequential order: + *
    + *
  • /click-controls.xml + *
  • /extras-controls.xml + *
  • WEB-INF/click.xml + *
+ * + * Please note {@link org.apache.click.control.AbstractControl} provides + * a default implementation of the Control interface to make it easier for + * developers to create their own controls. + * + * @see org.apache.click.util.PageImports + */ +public interface Control extends Serializable { + + /** + * The global control messages bundle name:   click-control. + */ + public static final String CONTROL_MESSAGES = "click-control"; + + /** + * Return the Page request Context of the Control. + * + * @deprecated getContext() is now obsolete on the Control interface, + * but will still be available on AbstractControl: + * {@link org.apache.click.control.AbstractControl#getContext()} + * + * @return the Page request Context + */ + public Context getContext(); + + /** + * Return the list of HEAD {@link org.apache.click.element.Element elements} + * to be included in the page. Example HEAD elements include + * {@link org.apache.click.element.JsImport JsImport}, + * {@link org.apache.click.element.JsScript JsScript}, + * {@link org.apache.click.element.CssImport CssImport} and + * {@link org.apache.click.element.CssStyle CssStyle}. + *

+ * Controls can contribute their own list of HEAD elements by implementing + * this method. + *

+ * The recommended approach when implementing this method is to use + * lazy loading to ensure the HEAD elements are only added + * once and when needed. For example: + * + *

+     * public MyControl extends AbstractControl {
+     *
+     *     public List getHeadElements() {
+     *         // Use lazy loading to ensure the JS is only added the
+     *         // first time this method is called.
+     *         if (headElements == null) {
+     *             // Get the head elements from the super implementation
+     *             headElements = super.getHeadElements();
+     *
+     *             // Include the control's external JavaScript resource
+     *             JsImport jsImport = new JsImport("/mycorp/mycontrol/mycontrol.js");
+     *             headElements.add(jsImport);
+     *
+     *             // Include the control's external Css resource
+     *             CssImport cssImport = new CssImport("/mycorp/mycontrol/mycontrol.css");
+     *             headElements.add(cssImport);
+     *         }
+     *         return headElements;
+     *     }
+     * } 
+ * + * Alternatively one can add the HEAD elements in the Control's constructor: + * + *
+     * public MyControl extends AbstractControl {
+     *
+     *     public MyControl() {
+     *
+     *         JsImport jsImport = new JsImport("/mycorp/mycontrol/mycontrol.js");
+     *         getHeadElements().add(jsImport);
+     *
+     *         CssImport cssImport = new CssImport("/mycorp/mycontrol/mycontrol.css");
+     *         getHeadHeaders().add(cssImport);
+     *     }
+     * } 
+ * + * One can also add HEAD elements from event handler methods such as + * {@link #onInit()}, {@link #onProcess()}, {@link #onRender()} + * etc. + *

+ * The order in which JS and CSS files are included will be preserved in the + * page. + *

+ * Note: this method must never return null. If no HEAD elements + * are available this method must return an empty {@link java.util.List}. + *

+ * Also note: a common problem when overriding getHeadElements in + * subclasses is forgetting to call super.getHeadElements. Consider + * carefully whether you should call super.getHeadElements or not. + * + * @return the list of HEAD elements to be included in the page + */ + public List getHeadElements(); + + /** + * Return HTML element identifier attribute "id" value. + * + * {@link org.apache.click.control.AbstractControl#getId()} + * + * @return HTML element identifier attribute "id" value + */ + public String getId(); + + /** + * Set the controls event listener. + *

+ * The method signature of the listener is:

    + *
  • must have a valid Java method name
  • + *
  • takes no arguments
  • + *
  • returns a boolean value
  • + *
+ *

+ * An example event listener method would be: + * + *

+     * public boolean onClick() {
+     *     System.out.println("onClick called");
+     *     return true;
+     * } 
+ * + * @param listener the listener object with the named method to invoke + * @param method the name of the method to invoke + * + * @deprecated this method is now obsolete on the Control interface, but + * will still be available on AbstractControl: + * {@link org.apache.click.control.AbstractControl#setListener(java.lang.Object, java.lang.String)} + */ + public void setListener(Object listener, String method); + + /** + * Return the localized messages Map of the Control. + * + * @return the localized messages Map of the Control + */ + public Map getMessages(); + + /** + * Return the name of the Control. Each control name must be unique in the + * containing Page model or the containing Form. + * + * @return the name of the control + */ + public String getName(); + + /** + * Set the name of the Control. Each control name must be unique in the + * containing Page model or the parent container. + *

+ * Please note: changing the name of a Control after it has been + * added to its parent container is undefined. Thus it is best not + * to change the name of a Control once its been set. + * + * @param name of the control + * @throws IllegalArgumentException if the name is null + */ + public void setName(String name); + + /** + * Return the parent of the Control. + * + * @return the parent of the Control + */ + public Object getParent(); + + /** + * Set the parent of the Control. + * + * @param parent the parent of the Control + */ + public void setParent(Object parent); + + /** + * The on deploy event handler, which provides classes the + * opportunity to deploy static resources when the Click application is + * initialized. + *

+ * For example: + *

+     * public void onDeploy(ServletContext servletContext) throws IOException {
+     *     ClickUtils.deployFile
+     *         (servletContext, "/com/mycorp/control/custom.js", "click");
+     * } 
+ * Please note: a common problem when overriding onDeploy in + * subclasses is forgetting to call super.onDeploy. Consider + * carefully whether you should call super.onDeploy or not. + *

+ * Click also supports an alternative deployment strategy which relies on + * packaging resource (stylesheets, JavaScript, images etc.) following a + * specific convention. See the section + * Deploying Custom Resources + * for further details. + * + * @param servletContext the servlet context + */ + public void onDeploy(ServletContext servletContext); + + /** + * The on initialize event handler. Each control will be initialized + * before its {@link #onProcess()} method is called. + *

+ * {@link org.apache.click.control.Container} implementations should recursively + * invoke the onInit method on each of their child controls ensuring that + * all controls receive this event. + *

+ * Please note: a common problem when overriding onInit in + * subclasses is forgetting to call super.onInit(). Consider + * carefully whether you should call super.onInit() or not, + * especially for {@link org.apache.click.control.Container}s which by default + * call onInit on all their child controls as well. + */ + public void onInit(); + + /** + * The on process event handler. Each control will be processed when the + * Page is requested. + *

+ * ClickServlet will process all Page controls in the order they were added + * to the Page. + *

+ * {@link org.apache.click.control.Container} implementations should recursively + * invoke the onProcess method on each of their child controls ensuring that + * all controls receive this event. However when a control onProcess method + * return false, no other controls onProcess method should be invoked. + *

+ * When a control is processed it should return true if the Page should + * continue event processing, or false if no other controls should be + * processed and the {@link org.apache.click.Page#onGet()} or {@link Page#onPost()} methods + * should not be invoked. + *

+ * Please note: a common problem when overriding onProcess in + * subclasses is forgetting to call super.onProcess(). Consider + * carefully whether you should call super.onProcess() or not, + * especially for {@link org.apache.click.control.Container}s which by default + * call onProcess on all their child controls as well. + * + * @return true to continue Page event processing or false otherwise + */ + public boolean onProcess(); + + /** + * The on render event handler. This event handler is invoked prior to the + * control being rendered, and is useful for providing pre rendering logic. + *

+ * The on render method is typically used to populate tables performing some + * database intensive operation. By putting the intensive operations in the + * on render method they will not be performed if the user navigates away + * to a different page. + *

+ * {@link org.apache.click.control.Container} implementations should recursively + * invoke the onRender method on each of their child controls ensuring that + * all controls receive this event. + *

+ * Please note: a common problem when overriding onRender in + * subclasses is forgetting to call super.onRender(). Consider + * carefully whether you should call super.onRender() or not, + * especially for {@link org.apache.click.control.Container}s which by default + * call onRender on all their child controls as well. + */ + public void onRender(); + + /** + * The on destroy request event handler. Control classes should use this + * method to add any resource clean up code. + *

+ * This method is guaranteed to be called before the Page object reference + * goes out of scope and is available for garbage collection. + *

+ * {@link org.apache.click.control.Container} implementations should recursively + * invoke the onDestroy method on each of their child controls ensuring that + * all controls receive this event. + *

+ * Please note: a common problem when overriding onDestroy in + * subclasses is forgetting to call super.onDestroy(). Consider + * carefully whether you should call super.onDestroy() or not, + * especially for {@link org.apache.click.control.Container}s which by default + * call onDestroy on all their child controls as well. + */ + public void onDestroy(); + + /** + * Render the control's HTML representation to the specified buffer. The + * control's {@link java.lang.Object#toString()} method should delegate the + * rendering to the render method for improved performance. + *

+ * An example implementation: + *

+     * public class Border extends AbstractContainer {
+     *
+     *     public String toString() {
+     *         int estimatedSizeOfControl = 100;
+     *         HtmlStringBuffer buffer = new HtmlStringBuffer(estimatedSizeOfControl);
+     *         render(buffer);
+     *         return buffer.toString();
+     *     }
+     *
+     *     /**
+     *      * @see Control#render(HtmlStringBuffer)
+     *      */
+     *     public void render(HtmlStringBuffer buffer) {
+     *         buffer.elementStart("div");
+     *         buffer.appendAttribute("name", getName());
+     *         buffer.closeTag();
+     *         buffer.append(getField());
+     *         buffer.elementEnd("div");
+     *     }
+     * }
+     * 
+ * + * @param buffer the specified buffer to render the control's output to + */ + public void render(HtmlStringBuffer buffer); + + /** + * Returns true if this control has any + * Behaviors registered, false otherwise. + * + * @return true if this control has any + * Behaviors registered, false otherwise + */ + public boolean hasBehaviors(); + + /** + * Returns the list of behaviors for this control. + * + * @return the list with this control behaviors. + */ + public Set getBehaviors(); + + /** + * Returns true if this control is an Ajax target, false + * otherwise. + *

+ * In order for a Control to be considered as an Ajax target it must be + * registered through {@link org.apache.click.ControlRegistry#registerAjaxTarget(org.apache.click.Control) ControlRegistry.registerAjaxTarget}. + *

+ * When the Click handles an Ajax request it iterates the Controls + * registered with the {@link org.apache.click.ControlRegistry ControlRegistry} + * and checks if one of them is the Ajax target by calling + * {@link #isAjaxTarget(org.openidentityplatform.openam.click.Context) isAjaxTarget}. If isAjaxTarget + * returns true, Click will process that Control's {@link #getBehaviors() behaviors}. + *

+ * Please note: there can only be one target control, so the first + * Control that is identified as the Ajax target will be processed, the other + * controls will be skipped. + *

+ * The most common way to check whether a Control is the Ajax target is to + * check if its {@link #getId ID} is available as a request parameter: + * + *

+     * public MyControl extends AbstractControl {
+     *
+     *     ...
+     *
+     *     public boolean isAjaxTarget(Context context) {
+     *         return context.hasRequestParameter(getId());
+     *     }
+     * } 
+ * + * Not every scenario can be covered through an ID attribute though. For example + * if an ActionLink is rendered multiple times on the same page, it cannot have an + * ID attribute, as that would lead to duplicate IDs, which isn't allowed by + * the HTML specification. Control implementations has to cater for how the + * control will be targeted. In the case of ActionLink it might check against + * its id, and if that isn't available check against its name. + * + * @param context the request context + * @return true if this control is an Ajax target, false + * otherwise + */ + public boolean isAjaxTarget(Context context); +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/ControlRegistry.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/ControlRegistry.java new file mode 100644 index 0000000000..ecc271bb5e --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/ControlRegistry.java @@ -0,0 +1,525 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.openidentityplatform.openam.click; + + +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +import org.openidentityplatform.openam.click.service.ConfigService; +import org.openidentityplatform.openam.click.service.LogService; +import org.apache.commons.lang.Validate; + +/** + * Provides a centralized registry where Controls can be registered and interact + * with the Click runtime. + *

+ * The primary use of the ControlRegistry is for Controls to register themselves + * as potential targets of Ajax requests + * (If a control is an Ajax request target, it's onProcess() + * method is invoked while other controls are not processed). + *

+ * Registering controls as Ajax targets serves a dual purpose. In addition to + * being potential Ajax targets, these controls will have all their Behaviors + * processed by the Click runtime. + *

+ * Thus the ControlRegistry provides the Click runtime with easy access to Controls + * that want to be processed for Ajax requests. It also provides quick access + * to Controls that have Behaviors, and particularly AjaxBehaviors that want to + * handle and respond to Ajax requests. + * + *

Register Control as an Ajax Target

+ * Below is an example of a Control registering itself as an Ajax target: + * + *
+ * public class AbstractControl implements Control {
+ *
+ *     public void addBehavior(Behavior behavior) {
+ *         getBehaviors().add(behavior);
+ *         // Adding a behavior also registers the Control as an Ajax target
+ *         ControlRegistry.registerAjaxTarget(this);
+ *     }
+ * } 
+ * + *

Register Interceptor

+ * Below is an example of a Container registering a Behavior in order to intercept + * and decorate its child controls: + * + *
+ * public class MyContainer extends AbstractContainer {
+ *
+ *     public void onInit() {
+ *         Behavior controlInterceptor = getInterceptor();
+ *         ControlRegistry.registerInterceptor(this, controlInterceptor);
+ *     }
+ *
+ *     private Behavior getInterceptor() {
+ *         Behavior controlInterceptor = new Behavior() {
+ *
+ *             // This method is invoked before the controls are rendered to the client
+ *             public void preResponse(Control source) {
+ *                 // Here we can add a CSS class attribute to each child control
+ *                 addCssClassToChildControls();
+ *             }
+ *
+ *             // This method is invoked before the HEAD elements are retrieved for each Control
+ *             public void preRenderHeadElements(Control source) {
+ *             }
+ *
+ *             // This method is invoked before the Control onDestroy event
+ *             public void preDestroy(Control source) {
+ *             }
+ *         };
+ *         return controlInterceptor;
+ *     }
+ * } 
+ */ +public class ControlRegistry { + + // Constants -------------------------------------------------------------- + + /** The thread local registry holder. */ + private static final ThreadLocal THREAD_LOCAL_REGISTRY_STACK = + new ThreadLocal<>(); + + // Variables -------------------------------------------------------------- + + /** The set of Ajax target controls. */ + Set ajaxTargetControls; + + /** The list of registered interceptors. */ + List interceptors; + + /** The application log service. */ + LogService logger; + + // Constructors ----------------------------------------------------------- + + /** + * Construct the ControlRegistry with the given ConfigService. + * + * @param configService the click application configuration service + */ + public ControlRegistry(ConfigService configService) { + this.logger = configService.getLogService(); + } + + // Public Methods --------------------------------------------------------- + + /** + * Return the thread local ControlRegistry instance. + * + * @return the thread local ControlRegistry instance. + * @throws RuntimeException if a ControlRegistry is not available on the + * thread + */ + public static ControlRegistry getThreadLocalRegistry() { + return getRegistryStack().peek(); + } + + /** + * Returns true if a ControlRegistry instance is available on the current + * thread, false otherwise. + *

+ * Unlike {@link #getThreadLocalRegistry()} this method can safely be used + * and will not throw an exception if a ControlRegistry is not available on + * the current thread. + * + * @return true if an ControlRegistry instance is available on the + * current thread, false otherwise + */ + public static boolean hasThreadLocalRegistry() { + ControlRegistry.RegistryStack registryStack = THREAD_LOCAL_REGISTRY_STACK.get(); + if (registryStack == null) { + return false; + } + return !registryStack.isEmpty(); + } + + /** + * Register the control to be processed by the Click runtime if the control + * is the Ajax target. A control is an Ajax target if the + * {@link Control#isAjaxTarget(Context)} method returns true. + * Once a target control is identified, Click invokes its + * {@link Control#onProcess()} method. + *

+ * This method serves a dual purpose as all controls registered here + * will also have their Behaviors (if any) processed. Processing + * {@link Behavior Behaviors} + * means their interceptor methods will be invoked during the request + * life cycle, passing the control as the argument. + * + * @param control the control to register as an Ajax target + */ + public static void registerAjaxTarget(Control control) { + if (control == null) { + throw new IllegalArgumentException("control cannot be null"); + } + + ControlRegistry instance = getThreadLocalRegistry(); + instance.internalRegisterAjaxTarget(control); + } + + /** + * Register a control event interceptor for the given Control and Behavior. + * The control will be passed as the source control to the Behavior + * interceptor methods: + * {@link org.apache.click.Behavior#preRenderHeadElements(org.apache.click.Control) preRenderHeadElements(Control)}, + * {@link org.apache.click.Behavior#preResponse(org.apache.click.Control) preResponse(Control)} and + * {@link org.apache.click.Behavior#preDestroy(org.apache.click.Control) preDestroy(Control)}. + * + * @param control the interceptor source control + * @param controlInterceptor the control interceptor to register + */ + public static void registerInterceptor(Control control, Behavior controlInterceptor) { + if (control == null) { + throw new IllegalArgumentException("control cannot be null"); + } + if (controlInterceptor == null) { + throw new IllegalArgumentException("control interceptor cannot be null"); + } + + ControlRegistry instance = getThreadLocalRegistry(); + instance.internalRegisterInterceptor(control, controlInterceptor); + } + + // Protected Methods ------------------------------------------------------ + + /** + * Allow the registry to handle the error that occurred. + * + * @param throwable the error which occurred during processing + */ + protected void errorOccurred(Throwable throwable) { + clear(); + } + + // Package Private Methods ------------------------------------------------ + + /** + * Remove all interceptors and ajax target controls from this registry. + */ + void clear() { + if (hasInterceptors()) { + getInterceptors().clear(); + } + + if (hasAjaxTargetControls()) { + getAjaxTargetControls().clear(); + } + } + + /** + * Register the AJAX target control. + * + * @param control the AJAX target control + */ + void internalRegisterAjaxTarget(Control control) { + Validate.notNull(control, "Null control parameter"); + getAjaxTargetControls().add(control); + } + + /** + * Register the source control and associated interceptor. + * + * @param source the interceptor source control + * @param controlInterceptor the control interceptor to register + */ + void internalRegisterInterceptor(Control source, Behavior controlInterceptor) { + Validate.notNull(source, "Null source parameter"); + Validate.notNull(controlInterceptor, "Null interceptor parameter"); + + ControlRegistry.InterceptorHolder interceptorHolder = new ControlRegistry.InterceptorHolder(source, controlInterceptor); + + // Guard against adding duplicate interceptors + List localInterceptors = getInterceptors(); + if (!localInterceptors.contains(interceptorHolder)) { + localInterceptors.add(interceptorHolder); + } + } + + void processPreResponse(Context context) { + if (hasAjaxTargetControls()) { + for (Control control : getAjaxTargetControls()) { + for (Behavior behavior : control.getBehaviors()) { + behavior.preResponse(control); + } + } + } + + if (hasInterceptors()) { + for (ControlRegistry.InterceptorHolder interceptorHolder : getInterceptors()) { + Behavior interceptor = interceptorHolder.getInterceptor(); + Control control = interceptorHolder.getControl(); + interceptor.preResponse(control); + } + } + } + + void processPreRenderHeadElements(Context context) { + if (hasAjaxTargetControls()) { + for (Control control : getAjaxTargetControls()) { + for (Behavior behavior : control.getBehaviors()) { + behavior.preRenderHeadElements(control); + } + } + } + + if (hasInterceptors()) { + for (ControlRegistry.InterceptorHolder interceptorHolder : getInterceptors()) { + Behavior interceptor = interceptorHolder.getInterceptor(); + Control control = interceptorHolder.getControl(); + interceptor.preRenderHeadElements(control); + } + } + } + + void processPreDestroy(Context context) { + if (hasAjaxTargetControls()) { + for (Control control : getAjaxTargetControls()) { + for (Behavior behavior : control.getBehaviors()) { + behavior.preDestroy(control); + } + } + } + + if (hasInterceptors()) { + for (ControlRegistry.InterceptorHolder interceptorHolder : getInterceptors()) { + Behavior interceptor = interceptorHolder.getInterceptor(); + Control control = interceptorHolder.getControl(); + interceptor.preDestroy(control); + } + } + } + + /** + * Checks if any AJAX target control have been registered. + */ + boolean hasAjaxTargetControls() { + if (ajaxTargetControls == null || ajaxTargetControls.isEmpty()) { + return false; + } + return true; + } + + /** + * Return the set of potential Ajax target controls. + * + * @return the set of potential Ajax target controls + */ + Set getAjaxTargetControls() { + if (ajaxTargetControls == null) { + ajaxTargetControls = new LinkedHashSet(); + } + return ajaxTargetControls; + } + + /** + * Checks if any control interceptors have been registered. + */ + boolean hasInterceptors() { + if (interceptors == null || interceptors.isEmpty()) { + return false; + } + return true; + } + + /** + * Return the set of registered control interceptors. + * + * @return set of registered interceptors + */ + List getInterceptors() { + if (interceptors == null) { + interceptors = new ArrayList<>(); + } + return interceptors; + } + + /** + * Adds the specified ControlRegistry on top of the registry stack. + * + * @param controlRegistry the ControlRegistry to add + */ + static void pushThreadLocalRegistry(ControlRegistry controlRegistry) { + getRegistryStack().push(controlRegistry); + } + + /** + * Remove and return the controlRegistry instance on top of the + * registry stack. + * + * @return the controlRegistry instance on top of the registry stack + */ + static ControlRegistry popThreadLocalRegistry() { + ControlRegistry.RegistryStack registryStack = getRegistryStack(); + ControlRegistry controlRegistry = registryStack.pop(); + + if (registryStack.isEmpty()) { + THREAD_LOCAL_REGISTRY_STACK.set(null); + } + + return controlRegistry; + } + + static ControlRegistry.RegistryStack getRegistryStack() { + ControlRegistry.RegistryStack registryStack = THREAD_LOCAL_REGISTRY_STACK.get(); + + if (registryStack == null) { + registryStack = new ControlRegistry.RegistryStack(2); + THREAD_LOCAL_REGISTRY_STACK.set(registryStack); + } + + return registryStack; + } + + /** + * Provides an unsynchronized Stack. + */ + static class RegistryStack extends ArrayList { + + /** Serialization version indicator. */ + private static final long serialVersionUID = 1L; + + /** + * Create a new RegistryStack with the given initial capacity. + * + * @param initialCapacity specify initial capacity of this stack + */ + private RegistryStack(int initialCapacity) { + super(initialCapacity); + } + + /** + * Pushes the ControlRegistry onto the top of this stack. + * + * @param controlRegistry the ControlRegistry to push onto this stack + * @return the ControlRegistry pushed on this stack + */ + private ControlRegistry push(ControlRegistry controlRegistry) { + add(controlRegistry); + + return controlRegistry; + } + + /** + * Removes and return the ControlRegistry at the top of this stack. + * + * @return the ControlRegistry at the top of this stack + */ + private ControlRegistry pop() { + ControlRegistry controlRegistry = peek(); + + remove(size() - 1); + + return controlRegistry; + } + + /** + * Looks at the ControlRegistry at the top of this stack without + * removing it. + * + * @return the ControlRegistry at the top of this stack + */ + private ControlRegistry peek() { + int length = size(); + + if (length == 0) { + String msg = "No ControlRegistry available on ThreadLocal Registry Stack"; + throw new RuntimeException(msg); + } + + return get(length - 1); + } + } + + static class InterceptorHolder { + + private Behavior interceptor; + + private Control control; + + public InterceptorHolder(Control control, Behavior interceptor) { + this.control = control; + this.interceptor = interceptor; + } + + public Behavior getInterceptor() { + return interceptor; + } + + public void setInterceptor(Behavior interceptor) { + this.interceptor = interceptor; + } + + public Control getControl() { + return control; + } + + public void setControl(Control control) { + this.control = control; + } + + /** + * @see Object#equals(java.lang.Object) + * + * @param o the reference object with which to compare + * @return true if this object equals the given object + */ + @Override + public boolean equals(Object o) { + + //1. Use the == operator to check if the argument is a reference to this object. + if (o == this) { + return true; + } + + //2. Use the instanceof operator to check if the argument is of the correct type. + if (!(o instanceof ControlRegistry.InterceptorHolder)) { + return false; + } + + //3. Cast the argument to the correct type. + ControlRegistry.InterceptorHolder that = (ControlRegistry.InterceptorHolder) o; + + boolean equals = this.control == null ? that.control == null : this.control.equals(that.control); + if (!equals) { + return false; + } + + return this.interceptor == null ? that.interceptor == null : this.interceptor.equals(that.interceptor); + } + + /** + * @see java.lang.Object#hashCode() + * + * @return the InterceptorHolder hashCode + */ + @Override + public int hashCode() { + int result = 17; + result = 37 * result + (control == null ? 0 : control.hashCode()); + result = 37 * result + (interceptor == null ? 0 : interceptor.hashCode()); + return result; + } + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/Page.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/Page.java new file mode 100644 index 0000000000..aa65de9e1d --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/Page.java @@ -0,0 +1,1362 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click; + +import java.io.Serializable; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.openidentityplatform.openam.click.element.Element; +import org.openidentityplatform.openam.click.util.ClickUtils; +import org.apache.click.util.Format; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; +import org.openidentityplatform.openam.click.util.PageImports; +import org.apache.commons.lang.StringUtils; + +/** + * Provides the Page request event handler class. + *

+ * The Page class plays a central role in Click applications defining how the + * application's pages are processed and rendered. All application pages + * must extend the base Page class, and provide a no arguments constructor. + * + *

Page Execution Sequence

+ * + * The default Page execution path for a GET request is: + *
    + *
  1. + * no-args constructor invoked to create a new Page instance. + * At this point no dependencies have been injected into the Page, and any + * request information is not available. You should put any "static" + * page initialization code, which doesn't depend upon request information, + * in the constructor. This will enable subclasses to have this code + * automatically initialized when they are created. + *
  2. + *
  3. + * {@link #format} property is set + *
  4. + *
  5. + * {@link #headers} property is set + *
  6. + *
  7. + * {@link #path} property is set + *
  8. + *
  9. + * {@link #onSecurityCheck()} method called to check whether the page should + * be processed. This method should return true if the Page should continue + * to be processed, or false otherwise. + *
  10. + *
  11. + * {@link #onInit()} method called to complete the initialization of the page + * after all the dependencies have been set. This is where you should put + * any "dynamic" page initialization code which depends upon the request or any + * other dependencies. + *

    + * Form and field controls must be fully initialized by the time this method + * has completed. + *

  12. + *
  13. + * ClickServlet processes all the page {@link #controls} + * calling their {@link org.apache.click.Control#onProcess()} method. If any of these + * controls return false, continued control and page processing will be aborted. + *
  14. + *
  15. + * {@link #onGet()} method called for any additional GET related processing. + *

    + * Form and field controls should NOT be created or initialized at this + * point as the control processing stage has already been completed. + *

  16. + *
  17. + * {@link #onRender()} method called for any pre-render processing. This + * method is often use to perform database queries to load information for + * rendering tables. + *

    + * Form and field controls should NOT be created or initialized at this + * point as the control processing stage has already been completed. + *

  18. + *
  19. + * ClickServlet renders the page merging the {@link #model} with the + * Velocity template defined by the {@link #getTemplate()} property. + *
  20. + *
  21. + * {@link #onDestroy()} method called to clean up any resources. This method + * is guaranteed to be called, even if an exception occurs. You can use + * this method to close resources like database connections or Hibernate + * sessions. + *
  22. + *
+ * + * For POST requests the default execution path is identical, except the + * {@link #onPost()} method is called instead of {@link #onGet()}. The POST + * request page execution sequence is illustrated below: + *

+ * + * + *

+ * A good way to see the page event execution order is to view the log when + * the application mode is set to trace: + * + *

+ * [Click] [debug] GET http://localhost:8080/quickstart/home.htm
+ * [Click] [trace]    invoked: HomePage.<<init>>
+ * [Click] [trace]    invoked: HomePage.onSecurityCheck() : true
+ * [Click] [trace]    invoked: HomePage.onInit()
+ * [Click] [trace]    invoked: HomePage.onGet()
+ * [Click] [trace]    invoked: HomePage.onRender()
+ * [Click] [info ]    renderTemplate: /home.htm - 6 ms
+ * [Click] [trace]    invoked: HomePage.onDestroy()
+ * [Click] [info ] handleRequest:  /home.htm - 24 ms  
+ * + *

Rendering Pages

+ * + * When a Velocity template is rendered the ClickServlet uses Pages: + *
    + *
  • {@link #getTemplate()} to find the Velocity template.
  • + *
  • {@link #model} to populate the Velocity Context
  • + *
  • {@link #format} to add to the Velocity Context
  • + *
  • {@link #getContentType()} to set as the HttpServletResponse content type
  • + *
  • {@link #headers} to set as the HttpServletResponse headers
  • + *
+ * + * These Page properties are also used when rendering JSP pages. + */ +public class Page implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * The global page messages bundle name:   click-page. + */ + public static final String PAGE_MESSAGES = "click-page"; + + /** + * The Page action request parameter:   "pageAction". + */ + public final static String PAGE_ACTION = "pageAction"; + + // Instance Variables ----------------------------------------------------- + + /** The list of page controls. */ + protected List controls; + + /** + * The list of page HTML HEAD elements including: Javascript imports, + * Css imports, inline Javascript and inline Css. + */ + protected List headElements; + + /** The Velocity template formatter object. */ + protected Format format; + + /** The forward path. */ + protected String forward; + + /** The HTTP response headers. */ + protected Map headers; + + /** The map of localized page resource messages. **/ + protected transient Map messages; + + /** + * The page model. For Velocity templates the model is used to populate the + * Velocity context. For JSP pages the model values are set as named + * request attributes. + */ + protected Map model = new HashMap(); + + /** The Page header imports. */ + protected transient PageImports pageImports; + + /** The path of the page template to render. */ + protected String path; + + /** The redirect path. */ + protected String redirect; + + /** + * The page is stateful and should be saved to the users HttpSession + * between requests, default value is false. + * + * @deprecated stateful pages are not supported anymore, use stateful + * Controls instead + */ + protected boolean stateful; + + /** The path of the page border template to render.*/ + protected String template; + + /** + * Indicates whether Control head elements should be included in the + * page template, default value is true. + */ + protected boolean includeControlHeadElements = true; + + // Event Handlers --------------------------------------------------------- + + /** + * The on Security Check event handler. This event handler is invoked after + * the pages constructor has been called and all the page properties have + * been set. + *

+ * Security check provides the Page an opportunity to check the users + * security credentials before processing the Page. + *

+ * If security check returns true the Page is processed as + * normal. If the method returns then no other event handlers are invoked + * (except onDestroy() and no page controls are processed. + *

+ * If the method returns false, the forward or redirect property should be + * set to send the request to another Page. + *

+ * By default this method returns true, subclass may override this method + * to provide their security authorization/authentication mechanism. + * + * @return true by default, subclasses may override this method + */ + public boolean onSecurityCheck() { + return true; + } + + /** + * The on Initialization event handler. This event handler is invoked after + * the {@link #onInit()} method has been called. + *

+ * Subclasses should place any initialization code which has dependencies + * on the context or other properties in this method. Generally light + * weight initialization code should be placed in the Pages constructor. + *

+ * Time consuming operations such as fetching the results of a database + * query should not be placed in this method. These operations should be + * performed in the {@link #onRender()}, {@link #onGet()} or + * {@link #onPost()} methods so that other event handlers may take + * alternative execution paths without performing these expensive operations. + *

+ * Please Note however the qualifier for the previous statement is + * that all form and field controls must be fully initialized before they + * are processed, which is after the onInit() method has + * completed. After this point their onProcess() methods will be + * invoked by the ClickServlet. + *

+ * Select controls in particular must have their option list values populated + * before the form is processed otherwise field validations cannot be performed. + *

+ * For initializing page controls the best practice is to place all the + * control creation code in the pages constructor, and only place any + * initialization code in the onInit() method which has an external + * dependency to the context or some other object. By following this practice + * it is easy to see what code is "design time" initialization code and what + * is "runtime initialization code". + *

+ * When subclassing pages which also use the onInit() method is + * is critical you call the super.onInit() method first, for + * example: + *

+     * public void onInit() {
+     *     super.onInit();
+     *
+     *     // Initialization code
+     *     ..
+     * } 
+ */ + public void onInit() { + } + + /** + * The on Get request event handler. This event handler is invoked if the + * HTTP request method is "GET". + *

+ * The event handler is invoked after {@link #onSecurityCheck()} has been + * called and all the Page {@link #controls} have been processed. If either + * the security check or one of the controls cancels continued event + * processing the onGet() method will not be invoked. + * + *

Important Note

+ * + * Form and field controls should NOT be created + * or initialized at this point as the control processing stage has already + * been completed. Select option list values should also be populated + * before the control processing stage is performed so that they can + * validate the submitted values. + */ + public void onGet() { + } + + /** + * The on Post request event handler. This event handler is invoked if the + * HTTP request method is "POST". + *

+ * The event handler is invoked after {@link #onSecurityCheck()} has been + * called and all the Page {@link #controls} have been processed. If either + * the security check or one of the controls cancels continued event + * processing the onPost() method will not be invoked. + * + *

Important Note

+ * + * Form and field controls should NOT be created + * or initialized at this point as the control processing stage has already + * been completed. Select option list values should also be populated + * before the control processing stage is performed so that they can + * validate the submitted values. + */ + public void onPost() { + } + + /** + * The on render event handler. This event handler is invoked prior to the + * page being rendered. + *

+ * This method will not be invoked if either the security check or one of + * the controls cancels continued event processing. + *

+ * The on render method is typically used to populate tables performing some + * database intensive operation. By putting the intensive operations in the + * on render method they will not be performed if the user navigates away + * to a different page. + *

+ * If you have code which you are using in both the onGet() and + * onPost() methods, use the onRender() method instead. + * + *

Important Note

+ * + * Form and field controls should NOT be created + * or initialized at this point as the control processing stage has already + * been completed. Select option list values should also be populated + * before the control processing stage is performed so that they can + * validate the submitted values. + */ + public void onRender() { + } + + /** + * The on Destroy request event handler. Subclasses may override this method + * to add any resource clean up code. + *

+ * This method is guaranteed to be called before the Page object reference + * goes out of scope and is available for garbage collection. + */ + public void onDestroy() { + } + + // Public Methods --------------------------------------------------------- + + /** + * Add the control to the page. The control will be added to the page model + * using the control name as the key. The Controls parent property will + * also be set to the page instance. + *

+ * Please note: if the page contains a control with the same name as + * the given control, that control will be replaced by the given control. + * If a control has no name defined it cannot be replaced. + * + * @param control the control to add to the page + * @throws IllegalArgumentException if the control is null or if the name + * of the control is not defined + */ + public void addControl(Control control) { + if (control == null) { + throw new IllegalArgumentException("Null control parameter"); + } + if (StringUtils.isBlank(control.getName())) { + throw new IllegalArgumentException("Control name not defined: " + + control.getClass()); + } + + // Check if page already contains a named value + Object currentValue = getModel().get(control.getName()); + if (currentValue != null && currentValue instanceof Control) { + Control currentControl = (Control) currentValue; + replaceControl(currentControl, control); + return; + } + + // Note: set parent first as setParent might veto further processing + control.setParent(this); + + getControls().add(control); + addModel(control.getName(), control); + } + + /** + * Remove the control from the page. The control will be removed from the + * pages model and the control parent property will be set to null. + * + * @param control the control to remove + * @throws IllegalArgumentException if the control is null, or if the name + * of the control is not defined + */ + public void removeControl(Control control) { + if (control == null) { + throw new IllegalArgumentException("Null control parameter"); + } + if (StringUtils.isBlank(control.getName())) { + throw new IllegalArgumentException("Control name not defined"); + } + + getControls().remove(control); + getModel().remove(control.getName()); + + control.setParent(null); + } + + /** + * Return the list of page Controls. + * + * @return the list of page Controls + */ + public List getControls() { + if (controls == null) { + controls = new ArrayList(); + } + return controls; + } + + /** + * Return true if the page has any controls defined. + * + * @return true if the page has any controls defined + */ + public boolean hasControls() { + return (controls != null) && !controls.isEmpty(); + } + + /** + * Return the request context of the page. + * + * @return the request context of the page + */ + public Context getContext() { + return Context.getThreadLocalContext(); + } + + /** + * Return the HTTP response content type. By default this method returns + * "text/html". + *

+ * If the request specifies a character encoding via + * If {@link jakarta.servlet.ServletRequest#getCharacterEncoding()} + * then this method will return "text/html; charset=encoding". + *

+ * The ClickServlet uses the pages content type for setting the + * HttpServletResponse content type. + * + * @return the HTTP response content type + */ + public String getContentType() { + String charset = getContext().getRequest().getCharacterEncoding(); + + if (charset == null) { + return "text/html"; + + } else { + return "text/html; charset=" + charset; + } + } + + /** + * Return the Velocity template formatter object. + *

+ * The ClickServlet adds the format object to the Velocity context using + * the key "format" so that it can be used in the page template. + * + * @return the Velocity template formatter object + */ + public Format getFormat() { + return format; + } + + /** + * Set the Velocity template formatter object. + * + * @param value the Velocity template formatter object. + */ + public void setFormat(Format value) { + format = value; + } + + /** + * Return the path to forward the request to. + *

+ * If the {@link #forward} property is not null it will be used to forward + * the request to in preference to rendering the template defined by the + * {@link #path} property. The request is forwarded using the + * RequestDispatcher. + *

+ * See also {@link #getPath()}, {@link #getRedirect()} + * + * @return the path to forward the request to + */ + public String getForward() { + return forward; + } + + /** + * Set the path to forward the request to. + *

+ * If the {@link #forward} property is not null it will be used to forward + * the request to in preference to rendering the template defined by the + * {@link #path} property. The request is forwarded using the Servlet + * RequestDispatcher. + *

+ * If forward paths start with a "/" + * character the forward path is + * relative to web applications root context, otherwise the path is + * relative to the requests current location. + *

+ * For example given a web application deployed to context mycorp + * with the pages: + *

+     *  /index.htm
+     *  /customer/search.htm
+     *  /customer/details.htm
+     *  /customer/management/add-customer.htm 
+ * + * To forward to the customer search.htm page from + * the web app root you could set forward as + * setForward("/customer/search.htm") + * or setForward("customer/search.htm"). + *

+ * If a user was currently viewing the add-customer.htm + * to forward to customer details.htm you could + * set forward as + * setForward("/customer/details.htm") + * or setForward("../details.htm"). + *

+ * See also {@link #setPath(String)}, {@link #setRedirect(String)} + * + * @param value the path to forward the request to + */ + public void setForward(String value) { + forward = value; + } + + /** + * The Page instance to forward the request to. The given Page object + * must have a valid {@link #path} defined, as the {@link #path} specifies + * the location to forward to. + * + * @see #setForward(java.lang.String) + * + * @param page the Page object to forward the request to. + */ + public void setForward(Page page) { + if (page == null) { + throw new IllegalArgumentException("Null page parameter"); + } + if (page.getPath() == null) { + throw new IllegalArgumentException("Page has no path defined"); + } + setForward(page.getPath()); + getContext().setRequestAttribute(ClickServlet.FORWARD_PAGE, page); + } + + /** + * Set the request to forward to the given page class. + * + * @see #setForward(java.lang.String) + * + * @param pageClass the class of the Page to forward the request to + * @throws IllegalArgumentException if the Page Class is not configured + * with a unique path + */ + public void setForward(Class pageClass) { + String target = getContext().getPagePath(pageClass); + + // If page class maps to a jsp, convert to htm which allows ClickServlet + // to process the redirect + if (target != null && target.endsWith(".jsp")) { + target = StringUtils.replaceOnce(target, ".jsp", ".htm"); + } + setForward(target); + } + + /** + * Return the map of HTTP header to be set in the HttpServletResponse. + * + * @return the map of HTTP header to be set in the HttpServletResponse + */ + public Map getHeaders() { + if (headers == null) { + headers = new HashMap(); + } + return headers; + } + + /** + * Return true if the page has headers, false otherwise. + * + * @return true if the page has headers, false otherwise + */ + public boolean hasHeaders() { + return headers != null && !headers.isEmpty(); + } + + /** + * Set the named header with the given value. Value can be either a String, + * Date or Integer. + * + * @param name the name of the header + * @param value the value of the header, either a String, Date or Integer + */ + public void setHeader(String name, Object value) { + if (name == null) { + throw new IllegalArgumentException("Null header name parameter"); + } + + getHeaders().put(name, value); + } + + /** + * Set the map of HTTP header to be set in the HttpServletResponse. + * + * @param value the map of HTTP header to be set in the HttpServletResponse + */ + public void setHeaders(Map value) { + headers = value; + } + + /** + * @deprecated use the new {@link #getHeadElements()} instead + * + * @return the HTML includes statements for the control stylesheet and + * JavaScript files + */ + public final String getHtmlImports() { + throw new UnsupportedOperationException("Use getHeadElements instead"); + } + + /** + * Return the list of HEAD {@link org.apache.click.element.Element elements} + * to be included in the page. Example HEAD elements include + * {@link org.apache.click.element.JsImport JsImport}, + * {@link org.apache.click.element.JsScript JsScript}, + * {@link org.apache.click.element.CssImport CssImport} and + * {@link org.apache.click.element.CssStyle CssStyle}. + *

+ * Pages can contribute their own list of HEAD elements by overriding + * this method. + *

+ * The recommended approach when overriding this method is to use + * lazy loading to ensure the HEAD elements are only added + * once and when needed. For example: + * + *

+     * public MyPage extends Page {
+     *
+     *     public List getHeadElements() {
+     *         // Use lazy loading to ensure the JS is only added the
+     *         // first time this method is called.
+     *         if (headElements == null) {
+     *             // Get the head elements from the super implementation
+     *             headElements = super.getHeadElements();
+     *
+     *             // Include the page's external Javascript resource
+     *             JsImport jsImport = new JsImport("/mycorp/js/mypage.js");
+     *             headElements.add(jsImport);
+     *
+     *             // Include the page's external Css resource
+     *             CssImport cssImport = new CssImport("/mycorp/js/mypage.css");
+     *             headElements.add(cssImport);
+     *         }
+     *         return headElements;
+     *     }
+     * } 
+ * + * Alternatively one can add the HEAD elements in the Page constructor: + * + *
+     * public MyPage extends Page {
+     *
+     *     public MyPage() {
+     *         JsImport jsImport = new JsImport("/mycorp/js/mypage.js");
+     *         getHeadElements().add(jsImport);
+     *
+     *         CssImport cssImport = new CssImport("/mycorp/js/mypage.css");
+     *         getHeadElements().add(cssImport);
+     *     }
+     * } 
+ * + * One can also add HEAD elements from event handler methods such as + * {@link #onInit()}, {@link #onGet()}, {@link #onPost()}, {@link #onRender()} + * etc. + *

+ * The order in which JS and CSS files are included will be preserved in the + * page. + *

+ * Note: this method must never return null. If no HEAD elements + * are available this method must return an empty {@link java.util.List}. + *

+ * Also note: a common problem when overriding getHeadElements in + * subclasses is forgetting to call super.getHeadElements. Consider + * carefully whether you should call super.getHeadElements or not. + * + * @return the list of HEAD elements to be included in the page + */ + public List getHeadElements() { + if (headElements == null) { + headElements = new ArrayList(2); + } + return headElements; + } + + /** + * Return the localized Page resource message for the given resource + * name or null if not found. The resource message returned will use the + * Locale obtained from the Context. + *

+ * Pages can define text properties files to store localized messages. These + * properties files must be stored on the Page class path with a name + * matching the class name. For example: + *

+ * The page class: + *

+     *  package com.mycorp.pages;
+     *
+     *  public class Login extends Page {
+     *     .. 
+ * + * The page class property filenames and their path: + *
+     *  /com/mycorp/pages/Login.properties
+     *  /com/mycorp/pages/Login_en.properties
+     *  /com/mycorp/pages/Login_fr.properties 
+ * + * Page messages can also be defined in the optional global messages + * bundle: + * + *
+     *  /click-page.properties 
+ * + * To define global page messages simply add click-page.properties + * file to your application's class path. Message defined in this properties + * file will be available to all of your application pages. + *

+ * Note messages in your page class properties file will override any + * messages in the global click-page.properties file. + *

+ * Page messages can be accessed directly in the page template using + * the $messages reference. For examples: + * + *

+     * $messages.title 
+ * + * Please see the {@link org.apache.click.util.MessagesMap} adaptor for more + * details. + * + * @param name resource name of the message + * @return the named localized message for the page or null if no message + * was found + */ + public String getMessage(String name) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + return getMessages().get(name); + } + + /** + * Return the formatted page message for the given resource name and + * message format arguments or null if no message was found. The resource + * message returned will use the Locale obtained from the Context. + *

+ * {@link #getMessage(java.lang.String)} is invoked to retrieve the message + * for the specified name. + * + * @param name resource name of the message + * @param args the message arguments to format + * @return the named localized message for the page or null if no message + * was found + */ + public String getMessage(String name, Object... args) { + String value = getMessage(name); + + return MessageFormat.format(value, args); + } + + /** + * Return a Map of localized messages for the Page. The messages returned + * will use the Locale obtained from the Context. + * + * @see #getMessage(String) + * + * @return a Map of localized messages for the Page + * @throws IllegalStateException if the context for the Page has not be set + */ + public Map getMessages() { + if (messages == null) { + if (getContext() != null) { + messages = getContext().createMessagesMap(getClass(), PAGE_MESSAGES); + + } else { + String msg = "Context not set cannot initialize messages"; + throw new IllegalStateException(msg); + } + } + return messages; + } + + /** + * Add the named object value to the Pages model map. + *

+ * Please note: if the Page contains an object with a matching name, + * that object will be replaced by the given value. + * + * @param name the key name of the object to add + * @param value the object to add + * @throws IllegalArgumentException if the name or value parameters are + * null + */ + public void addModel(String name, Object value) { + if (name == null) { + String msg = "Cannot add null parameter name to " + + getClass().getName() + " model"; + throw new IllegalArgumentException(msg); + } + if (value == null) { + String msg = "Cannot add null " + name + " parameter " + + "to " + getClass().getName() + " model"; + throw new IllegalArgumentException(msg); + } + + getModel().put(name, value); + } + + /** + * Return the Page's model map. The model is used populate the + * Velocity Context with is merged with the page template before rendering. + * + * @return the Page's model map + */ + public Map getModel() { + return model; + } + + /** + * Return the Page header imports. + *

+ * PageImports are used define the CSS and JavaScript imports and blocks + * to be included in the page template. + *

+ * The PageImports object will be included in the Page template when the + * following methods are invoked: + *

    + *
  • {@link ClickServlet#createTemplateModel(Page)} - for template pages
  • + *
  • {@link ClickServlet#setRequestAttributes(Page)} - for JSP pages
  • + *
+ *

+ * If you need to tailor the page imports rendered, override this method + * and modify the PageImports object returned. + *

+ * If you need to create a custom PageImports, override the method + * {@link ClickServlet#createPageImports(org.openidentityplatform.openam.click.Page)} + * + * @deprecated use the new {@link #getHeadElements()} instead + * + * @return the Page header imports + */ + public PageImports getPageImports() { + return pageImports; + } + + /** + * Set the Page header imports. + *

+ * PageImports are used define the CSS and JavaScript imports and blocks + * to be included in the page template. + *

+ * The PageImports references will be included in the Page model when the + * following methods are invoked: + *

    + *
  • {@link ClickServlet#createTemplateModel(Page)} - for template pages
  • + *
  • {@link ClickServlet#setRequestAttributes(Page)} - for JSP pages
  • + *
+ *

+ * If you need to tailor the page imports rendered, override the + * {@link #getPageImports()} method and modify the PageImports object + * returned. + *

+ * If you need to create a custom PageImports, override the method + * {@link ClickServlet#createPageImports(org.openidentityplatform.openam.click.Page)} + * + * @deprecated use the new {@link #getHeadElements()} instead + * + * @param pageImports the new pageImports instance to set + */ + public void setPageImports(PageImports pageImports) { + this.pageImports = pageImports; + } + + /** + * Return the path of the Template or JSP to render. + *

+ * If this method returns null, Click will not perform any rendering. + * This is useful when you want to stream or write directly to the + * HttpServletResponse. + *

+ * See also {@link #getForward()}, {@link #getRedirect()} + * + * @return the path of the Template or JSP to render + */ + public String getPath() { + return path; + } + + /** + * Set the path of the Template or JSP to render. + *

+ * By default Click will set the path to the requested page url. Meaning + * if the url /edit-customer.htm is requested, path will be set + * to /edit-customer.htm. + *

+ * Here is an example if you want to change the path to a different Template: + *

+ *

+     * public void onGet() {
+     *     setPath("/some-other-template.htm");
+     * }
+ * And here is an example if you want to change the path to a different JSP. + *
+     * public void onGet() {
+     *     setPath("/some-other-jsp.jsp");
+     * }
+ *

+ * If path is set to null, Click will not perform any rendering. + * This is useful when you want to stream or write directly to the + * HttpServletResponse. + *

+ * See also {@link #setForward(String)}, {@link #setRedirect(String)} + * + * @param value the path of the Template or JSP to render + */ + public void setPath(String value) { + path = value; + } + + /** + * Return the path to redirect the request to. + *

+ * If the {@link #redirect} property is not null it will be used to redirect + * the request in preference to {@link #forward} or {@link #path} properties. + * The request is redirected to using the HttpServletResponse.setRedirect() + * method. + *

+ * See also {@link #getForward()}, {@link #getPath()} + * + * @return the path to redirect the request to + */ + public String getRedirect() { + return redirect; + } + + /** + * Return true if the page is stateful and should be saved in the users + * HttpSession between requests, default value is false. + * + * @deprecated stateful pages are not supported anymore, use stateful + * Controls instead + * + * @return true if the page is stateful and should be saved in the users + * session + */ + public boolean isStateful() { + return stateful; + } + + /** + * Set whether the page is stateful and should be saved in the users + * HttpSession between requests. + *

+ * Click will synchronize on the page instance. This ensures that if + * multiple requests arrive from the same user for the page, only one + * request can access the page at a time. + *

+ * Stateful pages are stored in the HttpSession using the key + * page.getClass().getName(). + *

+ * It is worth noting that Click checks a Page's stateful property after + * each request. Thus it becomes possible to enable a stateful Page for a + * number of requests and then setting it to false again at which + * point Click will remove the Page from the HttpSession, freeing up memory + * for the server. + * + * @deprecated stateful pages are not supported anymore, use stateful + * Controls instead + * + * @param stateful the flag indicating whether the page should be saved + * between user requests + */ + public void setStateful(boolean stateful) { + this.stateful = stateful; + if (isStateful()) { + getContext().getSession(); + } + } + + /** + * Return true if the Control head elements should be included in the page + * template, false otherwise. Default value is true. + * + * @see #setIncludeControlHeadElements(boolean) + * + * @return true if the Control head elements should be included in the page + * template, false otherwise + */ + public boolean isIncludeControlHeadElements() { + return includeControlHeadElements; + } + + /** + * Set whether the Control head elements should be included in the page + * template. + *

+ * By setting this value to false, Click won't include Control's + * {@link #getHeadElements() head elements}, however the Page head elements + * will still be included. + *

+ * This allows one to create a single JavaScript and CSS resource file for + * the entire Page which increases performance, since the browser only has + * to load one resource, instead of multiple resources. + *

+ * Below is an example: + * + *

+     * public class HomePage extends Page {
+     *
+     *     private Form form = new Form("form");
+     *
+     *     public HomePage() {
+     *         // Indicate that Controls should not import their head elements
+     *         setIncludeControlHeadElements(false);
+     *
+     *         form.add(new EmailField("email");
+     *         addControl(form);
+     *     }
+     *
+     *     // Include the Page JavaScript and CSS resources
+     *     public List getHeadElements() {
+     *         if (headElements == null) {
+     *             headElements = super.getHeadElements();
+     *
+     *             // Include the Page CSS resource. This resource should combine
+     *             // all the CSS necessary for the page
+     *             headElements.add(new CssImport("/assets/css/home-page.css"));
+     *
+     *             // Include the Page JavaScript resource. This resource should
+     *             // combine all the JavaScript necessary for the page
+     *             headElements.add(new JsImport("/assets/js/home-page.js"));
+     *         }
+     *         return headElements;
+     *     }
+     * } 
+ * + * @param includeControlHeadElements flag indicating whether Control + * head elements should be included in the page + */ + public void setIncludeControlHeadElements(boolean includeControlHeadElements) { + this.includeControlHeadElements = includeControlHeadElements; + } + + /** + * Set the location to redirect the request to. + *

+ * If the {@link #redirect} property is not null it will be used to redirect + * the request in preference to the {@link #forward} and {@link #path} + * properties. The request is redirected using the HttpServletResponse.setRedirect() + * method. + *

+ * If the redirect location begins with a "/" + * character the redirect location will be prefixed with the web applications + * context path. Note if the given location is already prefixed + * with the context path, Click won't add it a second time. + *

+ * For example if an application is deployed to the context + * "mycorp" calling + * setRedirect("/customer/details.htm") + * will redirect the request to: + * "/mycorp/customer/details.htm" + *

+ * If the redirect location does not begin with a "/" + * character the redirect location will be used as specified. Thus if the + * location is http://somehost.com/myapp/customer.jsp, + * Click will redirect to that location. + *

+ * JSP note: when redirecting to a JSP template keep in mind that the + * JSP template won't be processed by Click, as ClickServlet is mapped to + * *.htm. Instead JSP templates are processed by the Servlet + * container JSP engine. + *

+ * So if you have a situation where a Page Class + * (Customer.class) is mapped to the JSP + * ("/customer.jsp") and you want to redirect to + * Customer.class, you could either redirect to + * ("/customer.htm") or + * use the alternative redirect utility {@link #setRedirect(java.lang.Class)}. + *

+ * Please note that Click will url encode the location by invoking + * response.encodeRedirectURL(location) before redirecting. + *

+ * See also {@link #setRedirect(java.lang.String, java.util.Map)}, + * {@link #setForward(String)}, {@link #setPath(String)} + * + * @param location the path to redirect the request to + */ + public void setRedirect(String location) { + setRedirect(location, null); + } + + /** + * Set the request to redirect to the give page class. + * + * @see #setRedirect(java.lang.String) + * + * @param pageClass the class of the Page to redirect the request to + * @throws IllegalArgumentException if the Page Class is not configured + * with a unique path + */ + public void setRedirect(Class pageClass) { + setRedirect(pageClass, null); + } + + /** + * Set the request to redirect to the given location and append + * the map of request parameters to the location URL. + *

+ * The map keys will be used as the request parameter names and the map + * values will be used as the request parameter values. For example: + * + *

+     * public boolean onSave() {
+     *     // Specify redirect parameters
+     *     Map parameters = new HashMap();
+     *     parameters.put("customerId", getCustomerId());
+     *
+     *     // Set redirect to customer.htm page
+     *     setRedirect("/customer.htm", parameters);
+     *
+     *     return false;
+     * } 
+ * + * To render multiple parameter values for the same parameter name, specify + * the values as a String[] array. For example: + * + *
+     * public boolean onSave() {
+     *
+     *     // Specify an array of customer IDs
+     *     String[] ids = {"123", "456", "789"};
+     *
+     *     // Specify redirect parameters
+     *     Map parameters = new HashMap();
+     *     parameters.put("customerIds", ids);
+     *
+     *     // Set redirect to customer.htm page
+     *     setRedirect("/customer.htm", parameters);
+     *
+     *     return false;
+     * } 
+ * + * @see #setRedirect(java.lang.String) + * + * @param location the path to redirect the request to + * @param params the map of request parameter name and value pairs + */ + public void setRedirect(String location, Map params) { + Context context = getContext(); + if (StringUtils.isNotBlank(location)) { + if (location.charAt(0) == '/') { + String contextPath = context.getRequest().getContextPath(); + + // Guard against adding duplicate context path + if (!location.startsWith(contextPath + '/')) { + location = contextPath + location; + } + } + } + + if (params != null && !params.isEmpty()) { + HtmlStringBuffer buffer = new HtmlStringBuffer(); + + Iterator> i = params.entrySet().iterator(); + while (i.hasNext()) { + Map.Entry entry = i.next(); + String paramName = entry.getKey(); + Object paramValue = entry.getValue(); + + // Check for multivalued parameter + if (paramValue instanceof String[]) { + String[] paramValues = (String[]) paramValue; + for (int j = 0; j < paramValues.length; j++) { + buffer.append(paramName); + buffer.append("="); + buffer.append(ClickUtils.encodeUrl(paramValues[j], context)); + if (j < paramValues.length - 1) { + buffer.append("&"); + } + } + } else { + if (paramValue != null) { + buffer.append(paramName); + buffer.append("="); + buffer.append(ClickUtils.encodeUrl(paramValue, context)); + } + } + if (i.hasNext()) { + buffer.append("&"); + } + } + + if (buffer.length() > 0) { + if (location.contains("?")) { + location += "&" + buffer.toString(); + } else { + location += "?" + buffer.toString(); + } + } + } + + redirect = location; + } + + /** + * Set the request to redirect to the given page class and and append + * the map of request parameters to the page URL. + *

+ * The map keys will be used as the request parameter names and the map + * values will be used as the request parameter values. + * + * @see #setRedirect(java.lang.String, java.util.Map) + * @see #setRedirect(java.lang.String) + * + * @param pageClass the class of the Page to redirect the request to + * @param params the map of request parameter name and value pairs + * @throws IllegalArgumentException if the Page Class is not configured + * with a unique path + */ + public void setRedirect(Class pageClass, + Map params) { + + String target = getContext().getPagePath(pageClass); + + // If page class maps to a jsp, convert to htm which allows ClickServlet + // to process the redirect + if (target != null && target.endsWith(".jsp")) { + target = StringUtils.replaceOnce(target, ".jsp", ".htm"); + } + + setRedirect(target, params); + } + + /** + * Return the path of the page border template to render, by default this + * method returns {@link #getPath()}. + *

+ * Pages can override this method to return an alternative border page + * template. This is very useful when implementing an standardized look and + * feel for a web site. The example below provides a BorderedPage base Page + * which other site templated Pages should extend. + * + *

+     * public class BorderedPage extends Page {
+     *     public String getTemplate() {
+     *         return "border.htm";
+     *     }
+     * } 
+ * + * The BorderedPage returns the page border template "border.htm": + * + *
+     * <html>
+     *   <head>
+     *     <title> $title </title>
+     *     <link rel="stylesheet" type="text/css" href="style.css" title="Style"/>
+     *   </head>
+     *   <body>
+     *
+     *     <h1> $title </h1>
+     *     <hr/>
+     *
+     *     #parse( $path )
+     *
+     *   </body>
+     * </html> 
+ * + * Other pages insert their content into this template, via their + * {@link #path} property using the Velocity + * #parse + * directive. Note the $path value is automatically + * added to the VelocityContext by the ClickServlet. + * + * @return the path of the page template to render, by default returns + * {@link #getPath()} + */ + public String getTemplate() { + return template == null ? getPath() : template; + } + + /** + * Set the page border template path. + *

+ * Note: if this value is not set, {@link #getTemplate()} will default + * to {@link #getPath()}. + * + * @param template the border template path + */ + public void setTemplate(String template) { + this.template = template; + } + + // Private methods -------------------------------------------------------- + + /** + * Replace the current control with the new control. + * + * @param currentControl the control currently contained in the page + * @param newControl the control to replace the current control container in + * the page + * + * @throws IllegalStateException if the currentControl is not contained in + * the page + */ + private void replaceControl(Control currentControl, Control newControl) { + + // Current control and new control are referencing the same object + // so we exit early + if (currentControl == newControl) { + return; + } + + int controlIndex = getControls().indexOf(currentControl); + if (controlIndex == -1) { + throw new IllegalStateException("Cannot replace the given control" + + " because it is not present in the page"); + } + + // Note: set parent first since setParent might veto further processing + newControl.setParent(this); + currentControl.setParent(null); + + // Set control to current control index + getControls().set(controlIndex, newControl); + + addModel(newControl.getName(), newControl); + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/PageInterceptor.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/PageInterceptor.java new file mode 100644 index 0000000000..42b4829629 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/PageInterceptor.java @@ -0,0 +1,238 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click; + +/** + * Provides a Page life cycle interceptor. Classes implementing this interface + * can be used to listen for key page life cycle events and abort further page + * processing if required. + *

+ * PageInterceptors can be used for many different purposes including: + *

    + *
  • enforcing application wide page security policies
  • + *
  • injecting dependencies into page objects
  • + *
  • logging and profiling page performance
  • + *
+ * + * A Click application can define multiple page interceptors that are invoked in + * the order in which they are returned by the ConfigService. + * + *

Scope

+ * + * Page interceptors can be defined with a request level scope, whereby a new + * page interceptor will be created with each page request providing a thread + * safe programming model. + *

+ * Please note, as new interceptor instances are created with each request, care + * should be taken to ensure that these objects are light weight and do not + * introduce a performance bottleneck into your application. + *

+ * Alternatively, page interceptors can be defined with application level scope + * whereby a single instance is created for the application and is used for + * all requests. + *

+ * Note application scope interceptors are more efficient that request scope + * interceptors, but you are responsible for ensuring that they are thread safe + * and support reentrant method invocations as multiple page requests are + * processed at the same time. + * + *

Configuration

+ * + * Application PageInterceptors are configured in the click.xml + * configuration file. PageInterceptors must support construction using a + * no-args public constructor. + *

+ * Page interceptors can have multiple properties configured with their XML + * definition which are set after the constructor has been called. Properties + * are set using OGNL via {@link org.apache.click.util.PropertyUtils}. + *

+ * An example configuration is provided below: + * + *

+ * <page-interceptor classname="com.mycorp.PageSecurityInterceptor" scope="application">
+ *     <property name="notAuthenticatedPath" value="/not-authenticated.htm"/>
+ *     <property name="notAuthorizedPath" value="/not-authorized.htm"/>
+ * </page-interceptor> 
+ * + * The default scope for page interceptors is "request", but this can be configured + * as "application" as is done in the example configuration above. + * + *

Example

+ * + *
+ * public class SecurityInterceptor implements PageInterceptor {
+ *
+ *    // The request not authenticated redirect path.
+ *    private String notAuthenticatedPath;
+ *
+ *    // The request not authorized redirect path.
+ *    private String notAuthorizedPath;
+ *
+ *    // Public Methods ---------------------------------------------------------
+ *
+ *    public boolean preCreate(Class pageClass, Context context) {
+ *
+ *       // If authentication required, then ensure user is authenticated
+ *       Authentication authentication = pageClass.getAnnotation(Authentication.class);
+ *
+ *       // TODO: user context check.
+ *
+ *       if (authentication != null && authentication.required()) {
+ *          sendRedirect(getNotAuthenticatedPath(), context);
+ *          return false;
+ *       }
+ *
+ *       // If authorization permission defined, then ensure user is authorized to access the page
+ *       Authorization authorization = pageClass.getAnnotation(Authorization.class);
+ *       if (authorization != null) {
+ *          if (!UserContext.getThreadUserContext().hasPermission(authorization.permission())) {
+ *             sendRedirect(getNotAuthorizedPath(), context);
+ *             return false;
+ *          }
+ *       }
+ *
+ *       return true;
+ *    }
+ *
+ *    public boolean postCreate(Page page) {
+ *       return true;
+ *    }
+ *
+ *    public boolean preResponse(Page page) {
+ *       return true;
+ *    }
+ *
+ *    public void postDestroy(Page page) {
+ *    }
+ *
+ *    public String getNotAuthenticatedPath() {
+ *       return notAuthenticatedPath;
+ *    }
+ *
+ *    public void setNotAuthenticatedPath(String notAuthenticatedPath) {
+ *       this.notAuthenticatedPath = notAuthenticatedPath;
+ *    }
+ *
+ *    public String getNotAuthorizedPath() {
+ *       return notAuthorizedPath;
+ *    }
+ *
+ *    public void setNotAuthorizedPath(String notAuthorizedPath) {
+ *       this.notAuthorizedPath = notAuthorizedPath;
+ *    }
+ *
+ *    // Protected Methods ------------------------------------------------------
+ *
+ *    protected void sendRedirect(String location, Context context) {
+ *       if (StringUtils.isNotBlank(location)) {
+ *          if (location.charAt(0) == '/') {
+ *             String contextPath = context.getRequest().getContextPath();
+ *
+ *             // Guard against adding duplicate context path
+ *             if (!location.startsWith(contextPath + '/')) {
+ *                location = contextPath + location;
+ *             }
+ *          }
+ *       }
+ *
+ *       location = context.getResponse().encodeRedirectURL(location);
+ *
+ *       try {
+ *          context.getResponse().sendRedirect(location);
+ *
+ *       } catch (IOException ioe) {
+ *          throw new RuntimeException(ioe);
+ *       }
+ *   }
+ * } 
+ * + *
+ * // Page class authentication annotation
+ * @Retention(RetentionPolicy.RUNTIME)
+ * public @interface Authentication {
+ *    boolean required() default true;
+ * } 
+ * + *
+ * // Page class authorization annotation
+ * @Retention(RetentionPolicy.RUNTIME)
+ * public @interface Authorization {
+ *    String permission();
+ * }
+ * 
+ */ +public interface PageInterceptor { + + /** + * Provides a before page object creation interceptor method, which is passed + * the class of the page to be instantiated and the page request context. + * If this method returns true then the normal page processing is performed, + * otherwise if this method returns false the page instance is never created + * and the request is considered to have been handled. + * + * @param pageClass the class of the page to be instantiated + * @param context the page request context + * @return true to continue normal page processing or false whereby the + * request is considered to be handled + */ + public boolean preCreate(Class pageClass, Context context); + + /** + * Provides a post page object creation interceptor method, which is passed + * the instance of the newly created page. This interceptor method is called + * before the page {@link Page#onSecurityCheck()} method is invoked. + *

+ * If this method returns true then the normal page processing is performed, + * otherwise if this method returns false the request is considered to have + * been handled. + *

+ * Please note the page {@link Page#onDestroy()} method will still be invoked. + * + * @param page the newly instantiated page instance + * @return true to continue normal page processing or false whereby the + * request is considered to be handled + */ + public boolean postCreate(Page page); + + /** + * Provides a page interceptor before response method. This method is invoked + * prior to the page redirect, forward or rendering phase. + *

+ * If this method returns true then the normal page processing is performed, + * otherwise if this method returns false request is considered to have been + * handled. + *

+ * Please note the page {@link Page#onDestroy()} method will still be invoked. + * + * @param page the newly instantiated page instance + * @return true to continue normal page processing or false whereby the + * request is considered to be handled + */ + public boolean preResponse(Page page); + + /** + * Provides a post page destroy interceptor method. This interceptor method + * is called immediately after the page {@link Page#onDestroy()} method is + * invoked. + * + * @param page the page object which has just been destroyed + */ + public void postDestroy(Page page); + +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/ajax/AjaxBehavior.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/ajax/AjaxBehavior.java new file mode 100644 index 0000000000..fac9f69b4e --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/ajax/AjaxBehavior.java @@ -0,0 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.openidentityplatform.openam.click.ajax; + + +import org.openidentityplatform.openam.click.ActionResult; +import org.openidentityplatform.openam.click.Behavior; +import org.openidentityplatform.openam.click.Context; +import org.openidentityplatform.openam.click.Control; + +/** + * AjaxBehavior extends the basic Behavior functionality to allow Controls to + * handle and process incoming Ajax requests. + *

+ * To handle an Ajax request, AjaxBehavior exposes the listener method: + * {@link #onAction(org.openidentityplatform.openam.click.Control) onAction}. + * The onAction method returns an ActionResult that is rendered back + * to the browser. + *

+ * Before Click invokes the onAction method it checks whether the request + * is targeted at the AjaxBehavior by invoking the method + * {@link #isAjaxTarget(org.openidentityplatform.openam.click.Context) Behavior.isAjaxTarget()}. + * Click will only invoke onAction if isAjaxTarget returns true. + */ +public interface AjaxBehavior extends Behavior { + + /** + * This method can be implemented to handle and respond to an Ajax request. + * For example: + * + *

+     * public void onInit() {
+     *     ActionLink link = new ActionLink("link");
+     *     link.addBehaior(new DefaultAjaxBehavior() {
+     *
+     *         public ActionResult onAction(Control source) {
+     *             ActionResult result = new ActionResult("<h1>Hello world</h1>", ActionResult.HTML);
+     *             return result;
+     *         }
+     *     });
+     * } 
+ * + * @param source the control the behavior is attached to + * @return the action result instance + */ + public ActionResult onAction(Control source); + + /** + * Return true if the behavior is the request target, false otherwise. + *

+ * This method is queried by Click to determine if the behavior's + * {@link #onAction(org.openidentityplatform.openam.click.Control)} method should be called in + * response to a request. + *

+ * By exposing this method through the Behavior interface it provides + * implementers with fine grained control over whether the Behavior's + * {@link #onAction(org.openidentityplatform.openam.click.Control)} method should be invoked or not. + *

+ * Below is an example implementation: + * + *

+     * public CustomBehavior implements Behavior {
+     *
+     *     private String eventType;
+     *
+     *     public CustomBehavior(String eventType) {
+     *         // The event type of the behavior
+     *         super(eventType);
+     *     }
+     *
+     *     public boolean isAjaxTarget(Context context) {
+     *         // Retrieve the eventType parameter from the incoming request
+     *         String eventType = context.getRequestParameter("type");
+     *
+     *         // Check if this Behavior's eventType matches the request
+     *         // "type" parameter
+     *         return StringUtils.equalsIgnoreCase(this.eventType, eventType);
+     *     }
+     *
+     *     public ActionResult onAction(Control source) {
+     *         // If isAjaxTarget returned true, the onAction method will be
+     *         // invoked
+     *         ...
+     *     }
+     * } 
+ * + * @param context the request context + * @return true if the behavior is the request target, false otherwise + */ + public boolean isAjaxTarget(Context context); +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/AbstractContainer.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/AbstractContainer.java new file mode 100644 index 0000000000..fa553be154 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/AbstractContainer.java @@ -0,0 +1,409 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click.control; + +import org.openidentityplatform.openam.click.Control; +import org.openidentityplatform.openam.click.util.ClickUtils; +import org.openidentityplatform.openam.click.util.ContainerUtils; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Provides a default implementation of the {@link org.openidentityplatform.openam.click.control.Container} interface + * to make it easier for developers to create their own containers. + *

+ * Subclasses can override {@link #getTag()} to return a specific HTML element. + *

+ * The following example shows how to create an HTML div element: + * + *

+ * public class Div extends AbstractContainer {
+ *
+ *     public String getTag() {
+ *         // Return the HTML tag
+ *         return "div";
+ *     }
+ * } 
+ */ +public abstract class AbstractContainer extends AbstractControl implements + Container { + + // Constants -------------------------------------------------------------- + + private static final long serialVersionUID = 1L; + + // Instance Variables ----------------------------------------------------- + + /** The list of controls. */ + protected List controls; + + /** The map of controls keyed by field name. */ + protected Map controlMap; + + // Constructors ----------------------------------------------------------- + + /** + * Create a container with no name defined. + */ + public AbstractContainer() { + } + + /** + * Create a container with the given name. + * + * @param name the container name + */ + public AbstractContainer(String name) { + super(name); + } + + // Public Methods --------------------------------------------------------- + + /** + * @see org.openidentityplatform.openam.click.control.Container#add(Control). + *

+ * Please note: if the container contains a control with the same name + * as the given control, that control will be + * {@link #replace(Control, Control) replaced} + * by the given control. If a control has no name defined it cannot be replaced. + * + * @param control the control to add to the container + * @return the control that was added to the container + * @throws IllegalArgumentException if the control is null + */ + public Control add(Control control) { + return insert(control, getControls().size()); + } + + /** + * Add the control to the container at the specified index, and return the + * added instance. + *

+ * Please note: if the container contains a control with the same name + * as the given control, that control will be + * {@link #replace(Control, Control) replaced} + * by the given control. If a control has no name defined it cannot be replaced. + *

+ * Also note if the specified control already has a parent assigned, + * it will automatically be removed from that parent and inserted into this + * container. + * + * @see org.openidentityplatform.openam.click.control.Container#insert(Control, int) + * + * @param control the control to add to the container + * @param index the index at which the control is to be inserted + * @return the control that was added to the container + * + * @throws IllegalArgumentException if the control is null or if the control + * and container is the same instance + * + * @throws IndexOutOfBoundsException if index is out of range + * (index < 0 || index > getControls().size()) + */ + public Control insert(Control control, int index) { + // Check if panel already contains the control + String controlName = control.getName(); + if (controlName != null) { + // Check if container already contains the control + Control currentControl = getControlMap().get(control.getName()); + + // If container already contains the control do a replace + if (currentControl != null) { + + // Current control and new control are referencing the same object + // so we exit early + if (currentControl == control) { + return control; + } + + // If the two controls are different objects, we remove the current + // control and add the given control + return replace(currentControl, control); + } + } + + return ContainerUtils.insert(this, control, index, getControlMap()); + } + + /** + * @seeorg.openidentityplatform.openam.click.control.Container#remove(Control). + * + * @param control the control to remove from the container + * @return true if the control was removed from the container + * @throws IllegalArgumentException if the control is null + */ + public boolean remove(Control control) { + return ContainerUtils.remove(this, control, getControlMap()); + } + + /** + * Replace the control in the container at the specified index, and return + * the newly added control. + * + * @see org.openidentityplatform.openam.click.control.Container#replace(Control, Control) + * + * @param currentControl the control currently contained in the container + * @param newControl the control to replace the current control contained in + * the container + * @return the new control that replaced the current control + * + * @deprecated this method was used for stateful pages, which have been deprecated + * + * @throws IllegalArgumentException if the currentControl or newControl is + * null + * @throws IllegalStateException if the currentControl is not contained in + * the container + */ + public Control replace(Control currentControl, Control newControl) { + int controlIndex = getControls().indexOf(currentControl); + return ContainerUtils.replace(this, currentControl, newControl, + controlIndex, getControlMap()); + } + + /** + * @see org.apache.click.control.Container#getControls(). + * + * @return the sequential list of controls held by the container + */ + public List getControls() { + if (controls == null) { + controls = new ArrayList(); + } + return controls; + } + + /** + * @see org.apache.click.control.Container#getControl(String) + * + * @param controlName the name of the control to get from the container + * @return the named control from the container if found or null otherwise + */ + public Control getControl(String controlName) { + if (hasControls()) { + return getControlMap().get(controlName); + } + return null; + } + + /** + * @see Container#contains(Control) + * + * @param control the control whose presence in this container is to be tested + * @return true if the container contains the specified control + */ + public boolean contains(Control control) { + return getControls().contains(control); + } + + /** + * Returns true if this container has existing controls, false otherwise. + * + * @return true if the container has existing controls, false otherwise. + */ + public boolean hasControls() { + return (controls != null) && !controls.isEmpty(); + } + + /** + * Return the map of controls where each map's key / value pair will consist + * of the control name and instance. + *

+ * Controls added to the container that did not specify a {@link #name}, + * will not be included in the returned map. + * + * @return the map of controls + */ + public Map getControlMap() { + if (controlMap == null) { + controlMap = new HashMap(); + } + return controlMap; + } + + /** + * @see org.openidentityplatform.openam.click.control.AbstractControl#getControlSizeEst(). + * + * @return the estimated rendered control size in characters + */ + @Override + public int getControlSizeEst() { + int size = 20; + + if (getTag() != null && hasAttributes()) { + size += 20 * getAttributes().size(); + } + + if (hasControls()) { + size += getControls().size() * size; + } + + return size; + } + + /** + * @see Control#onProcess(). + * + * @return true to continue Page event processing or false otherwise + */ + @Override + public boolean onProcess() { + + boolean continueProcessing = true; + + for (Control control : getControls()) { + if (!control.onProcess()) { + continueProcessing = false; + } + } + + dispatchActionEvent(); + + return continueProcessing; + } + + /** + * @see Control#onDestroy() + */ + @Override + public void onDestroy() { + for (Control control : getControls()) { + try { + control.onDestroy(); + } catch (Throwable t) { + ClickUtils.getLogService().error("onDestroy error", t); + } + } + } + + /** + * @see Control#onInit() + */ + @Override + public void onInit() { + super.onInit(); + for (Control control : getControls()) { + control.onInit(); + } + } + + /** + * @see Control#onRender() + */ + @Override + public void onRender() { + for (Control control : getControls()) { + control.onRender(); + } + } + + /** + * Render the HTML representation of the container and all its child + * controls to the specified buffer. + *

+ * If {@link #getTag()} returns null, this method will render only its + * child controls. + *

+ * @see org.openidentityplatform.openam.click.control.AbstractControl#render(HtmlStringBuffer) + * + * @param buffer the specified buffer to render the control's output to + */ + @Override + public void render(HtmlStringBuffer buffer) { + + //If tag is set, render it + if (getTag() != null) { + renderTagBegin(getTag(), buffer); + buffer.closeTag(); + if (hasControls()) { + buffer.append("\n"); + } + renderContent(buffer); + renderTagEnd(getTag(), buffer); + + } else { + + //render only content because no tag is specified + renderContent(buffer); + } + } + + /** + * Returns the HTML representation of this control. + *

+ * This method delegates the rendering to the method + * {@link #render(HtmlStringBuffer)}. The size of buffer + * is determined by {@link #getControlSizeEst()}. + * + * @see Object#toString() + * + * @return the HTML representation of this control + */ + @Override + public String toString() { + HtmlStringBuffer buffer = new HtmlStringBuffer(getControlSizeEst()); + render(buffer); + return buffer.toString(); + } + + // Protected Methods ------------------------------------------------------ + + /** + * @see AbstractControl#renderTagEnd(String, HtmlStringBuffer). + * + * @param tagName the name of the tag to close + * @param buffer the buffer to append the output to + */ + @Override + protected void renderTagEnd(String tagName, HtmlStringBuffer buffer) { + buffer.elementEnd(tagName); + } + + /** + * Render this container content to the specified buffer. + * + * @param buffer the buffer to append the output to + */ + protected void renderContent(HtmlStringBuffer buffer) { + renderChildren(buffer); + } + + /** + * Render this container children to the specified buffer. + * + * @see #getControls() + * + * @param buffer the buffer to append the output to + */ + protected void renderChildren(HtmlStringBuffer buffer) { + for (Control control : getControls()) { + + int before = buffer.length(); + control.render(buffer); + + int after = buffer.length(); + if (before != after) { + buffer.append("\n"); + } + } + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/AbstractControl.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/AbstractControl.java new file mode 100644 index 0000000000..a651f26699 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/AbstractControl.java @@ -0,0 +1,1121 @@ +package org.openidentityplatform.openam.click.control; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.StringTokenizer; +import java.util.Map.Entry; + +import jakarta.servlet.ServletContext; + +import org.openidentityplatform.openam.click.ActionEventDispatcher; +import org.openidentityplatform.openam.click.ActionListener; +import org.openidentityplatform.openam.click.Behavior; +import org.openidentityplatform.openam.click.ControlRegistry; +import org.openidentityplatform.openam.click.Context; +import org.openidentityplatform.openam.click.Control; +import org.openidentityplatform.openam.click.Page; +import org.openidentityplatform.openam.click.element.Element; +import org.openidentityplatform.openam.click.util.ClickUtils; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; + +/** + * Provides a default implementation of the {@link Control} interface + * to make it easier for developers to create their own controls. + *

+ * Subclasses are expected to at least override {@link #getTag()} + * to differentiate the control. However some controls do not map cleanly + * to an html tag, in which case you can override + * {@link #render(org.openidentityplatform.openam.click.util.HtmlStringBuffer)} for complete control + * over the output. + *

+ * Below is an example of creating a new control called MyField: + *

+ * public class MyField extends AbstractControl {
+ *
+ *     private String value;
+ *
+ *     public void setValue(String value) {
+ *         this.value = value;
+ *     }
+ *
+ *     public String getValue() {
+ *         return value;
+ *     }
+ *
+ *     public String getTag() {
+ *         // Return the HTML tag
+ *         return "input";
+ *     }
+ *
+ *     public boolean onProcess() {
+ *         // Bind the request parameter to the field value
+ *         String requestValue = getContext().getRequestParameter(getName());
+ *         setValue(requestValue);
+ *
+ *         // Invoke any listener of MyField
+ *         return dispatchActionEvent();
+ *     }
+ * }
+ * 
+ * By overriding {@link #getTag()} one can specify the html tag to render. + *

+ * Overriding {@link #onProcess()} allows one to bind the servlet request + * parameter to MyField value. The {@link #dispatchActionEvent()} method + * registers the listener for this control on the Context. Once the onProcess + * event has finished, all registered listeners will be fired. + *

+ * To view the html rendered by MyField invoke the control's {@link #toString()} + * method: + * + *

+ * public class Test {
+ *     public static void main (String args[]) {
+ *         // Create mock context in which to test the control.
+ *         MockContext.initContext();
+ *
+ *         String fieldName = "myfield";
+ *         MyField myfield = new MyField(fieldName);
+ *         String output = myfield.toString();
+ *         System.out.println(output);
+ *     }
+ * } 
+ * + * Executing the above test results in the following output: + * + *
+ * <input name="myfield" id="myfield"/>
+ * + * Also see {@link org.apache.click.Control} javadoc for an explanation of the + * Control execution sequence. + * + *

Message Resources and Internationalization (i18n)

+ * + * Controls support a hierarchy of resource bundles for displaying messages. + * These localized messages can be accessed through the methods: + * + *
    + *
  • {@link #getMessage(String)}
  • + *
  • {@link #getMessage(String, Object...)}
  • + *
  • {@link #getMessages()}
  • + *
+ * + * The order in which localized messages resolve are described in the + * user guide. + */ +public abstract class AbstractControl implements Control { + + // Constants -------------------------------------------------------------- + + private static final long serialVersionUID = 1L; + + // Instance Variables ----------------------------------------------------- + + /** The control's action listener. */ + protected ActionListener actionListener; + + /** The control's list of {@link org.apache.click.Behavior behaviors}. */ + protected Set behaviors; + + /** + * The list of page HTML HEAD elements including: Javascript imports, + * Css imports, inline Javascript and inline Css. + */ + protected List headElements; + + /** The Control attributes Map. */ + protected Map attributes; + + /** The Control localized messages Map. */ + protected transient Map messages; + + /** The Control name. */ + protected String name; + + /** The control's parent. */ + protected Object parent; + + /** + * The Map of CSS style attributes. + * + * @deprecated use {@link #addStyleClass(String)} and + * {@link #removeStyleClass(String)} instead. + */ + protected Map styles; + + /** The listener target object. */ + protected Object listener; + + /** The listener method name. */ + protected String listenerMethod; + + // Constructors ----------------------------------------------------------- + + /** + * Create a control with no name defined. + */ + public AbstractControl() { + } + + /** + * Create a control with the given name. + * + * @param name the control name + */ + public AbstractControl(String name) { + if (name != null) { + setName(name); + } + } + + // Public Methods --------------------------------------------------------- + + /** + * Returns the controls html tag. + *

+ * Subclasses should override this method and return the correct tag. + *

+ * This method returns null by default. + *

+ * Example tags include table, form, a and + * input. + * + * @return this controls html tag + */ + public String getTag() { + return null; + } + + /** + * Return the control's action listener. If the control has a listener + * target and listener method defined, this method will return an + * {@link org.apache.click.ActionListener} instance. + * + * @return the control's action listener + */ + public ActionListener getActionListener() { + if (actionListener == null && listener != null && listenerMethod != null) { + actionListener = new ActionListener() { + + private static final long serialVersionUID = 1L; + + public boolean onAction(Control source) { + return ClickUtils.invokeListener(listener, listenerMethod); + } + }; + } + return actionListener; + } + + /** + * Set the control's action listener. + * + * @param listener the control's action listener + */ + public void setActionListener(ActionListener listener) { + this.actionListener = listener; + } + + /** + * Returns true if this control has any + * Behaviors registered, false otherwise. + * + * @return true if this control has any Behaviors registered, + * false otherwise + */ + public boolean hasBehaviors() { + return (behaviors != null && !behaviors.isEmpty()); + } + + /** + * Add the given Behavior to the control's Set of + * {@link #getBehaviors() Behaviors}. + *

+ * In addition, the Control will be registered with the + * {@link org.apache.click.ControlRegistry#registerAjaxTarget(org.apache.click.Control) ControlRegistry} + * as a potential Ajax target control and to have it's + * Behaviors processed by the Click runtime. + * + * @param behavior the Behavior to add + */ + public void addBehavior(Behavior behavior) { + if (behavior == null) { + throw new IllegalArgumentException("Behavior cannot be null"); + } + + // Ensure we register the behavior only once + if (!hasBehaviors()) { + ControlRegistry.registerAjaxTarget(this); + } + + getBehaviors().add(behavior); + } + + /** + * Remove the given Behavior from the Control's Set of + * {@link #getBehaviors() Behaviors}. + * + * @param behavior the Behavior to remove + */ + public void removeBehavior(Behavior behavior) { + getBehaviors().remove(behavior); + } + + /** + * Returns the Set of Behaviors for this control. + * + * @return the Set of Behaviors for this control + */ + public Set getBehaviors() { + if (behaviors == null) { + behaviors = new HashSet(); + } + return behaviors; + } + + /** + * Returns true if this control is an AJAX target, false + * otherwise. + *

+ * The control is defined as an Ajax target if the control {@link #getId() ID} + * is send as a request parameter. + * + * @param context the request context + * @return true if this control is an AJAX target, false + * otherwise + */ + public boolean isAjaxTarget(Context context) { + // TODO each control could have an optimized version of isAjaxTarget + // targeting specifically that control. For now we just check that the + // control id is present. Not all controls can use an ID for example: + // ActionLink + String id = getId(); + if (id != null) { + return context.hasRequestParameter(id); + } else { + return false; + } + } + + /** + * Return the control HTML attribute with the given name, or null if the + * attribute does not exist. + * + * @param name the name of link HTML attribute + * @return the link HTML attribute + */ + public String getAttribute(String name) { + if (hasAttributes()) { + return getAttributes().get(name); + } + return null; + } + + /** + * Set the control attribute with the given attribute name and value. You would + * generally use attributes if you were creating the entire Control + * programmatically and rendering it with the {@link #toString()} method. + *

+ * For example given the ActionLink: + * + *

+     * ActionLink addLink = new ActionLink("addLink", "Add");
+     * addLink.setAttribute("target", "_blank"); 
+ * + * Will render the HTML as: + *
+     * <a href=".." target="_blank">Add</a> 
+ * + * Note: for style and class attributes you can + * also use the methods {@link #setStyle(String, String)} and + * {@link #addStyleClass(String)}. + * + * @see #setStyle(String, String) + * @see #addStyleClass(String) + * @see #removeStyleClass(String) + * + * @param name the attribute name + * @param value the attribute value + * @throws IllegalArgumentException if name parameter is null + */ + public void setAttribute(String name, String value) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + + if (value != null) { + getAttributes().put(name, value); + } else { + getAttributes().remove(name); + } + } + + /** + * Return the control's attributes Map. + * + * @return the control's attributes Map. + */ + public Map getAttributes() { + if (attributes == null) { + attributes = new HashMap(); + } + return attributes; + } + + /** + * Return true if the control has attributes or false otherwise. + * + * @return true if the control has attributes on false otherwise + */ + public boolean hasAttributes() { + return attributes != null && !attributes.isEmpty(); + } + + /** + * Returns true if specified attribute is defined, false otherwise. + * + * @param name the specified attribute to check + * @return true if name is a defined attribute + */ + public boolean hasAttribute(String name) { + return hasAttributes() && getAttributes().containsKey(name); + } + + /** + * @see org.apache.click.Control#getContext() + * + * @return the Page request Context + */ + public Context getContext() { + return Context.getThreadLocalContext(); + } + + /** + * @see Control#getName() + * + * @return the name of the control + */ + public String getName() { + return name; + } + + /** + * @see Control#setName(String) + * + * @param name of the control + * @throws IllegalArgumentException if the name is null + */ + public void setName(String name) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + this.name = name; + } + + /** + * Return the "id" attribute value if defined, or the control name otherwise. + * + * @see org.apache.click.Control#getId() + * + * @return HTML element identifier attribute "id" value + */ + public String getId() { + String id = getAttribute("id"); + + return (id != null) ? id : getName(); + } + + /** + * Set the HTML id attribute for the control with the given value. + * + * @param id the element HTML id attribute value to set + */ + public void setId(String id) { + if (id != null) { + setAttribute("id", id); + } else { + getAttributes().remove("id"); + } + } + + /** + * Return the localized message for the given key or null if not found. + * The resource message returned will use the Locale obtained from the + * Context. + *

+ * This method will attempt to lookup the localized message in the + * parent's messages, which resolves to the Page's resource bundle. + *

+ * If the message was not found, this method will attempt to look up the + * value in the /click-control.properties message properties file, + * through the method {@link #getMessages()}. + *

+ * If still not found, this method will return null. + * + * @param name the name of the message resource + * @return the named localized message for the control, or null if not found + */ + public String getMessage(String name) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + + String message = null; + + message = ClickUtils.getParentMessage(this, name); + + if (message == null && getMessages().containsKey(name)) { + message = getMessages().get(name); + } + + return message; + } + + /** + * Return the formatted message for the given resource name and message + * format arguments or null if no message was found. The resource + * message returned will use the Locale obtained from the Context. + *

+ * {@link #getMessage(java.lang.String)} is invoked to retrieve the message + * for the specified name. + * + * @param name resource name of the message + * @param args the message arguments to format + * @return the named localized message for the control or null if no message + * was found + */ + public String getMessage(String name, Object... args) { + String value = getMessage(name); + if (value == null) { + return null; + } + return MessageFormat.format(value, args); + } + + /** + * Return a Map of localized messages for the control. The messages returned + * will use the Locale obtained from the Context. + * + * @return a Map of localized messages for the control + * @throws IllegalStateException if the context for the control has not be set + */ + public Map getMessages() { + if (messages == null) { + messages = getContext().createMessagesMap(getClass(), CONTROL_MESSAGES); + } + return messages; + } + + /** + * @see org.apache.click.Control#getParent() + * + * @return the Control's parent + */ + public Object getParent() { + return parent; + } + + /** + * @see org.apache.click.Control#setParent(Object) + * + * @param parent the parent of the Control + * @throws IllegalArgumentException if the given parent instance is + * referencing this object: if (parent == this) + */ + public void setParent(Object parent) { + if (parent == this) { + throw new IllegalArgumentException("Cannot set parent to itself"); + } + this.parent = parent; + } + + /** + * @see org.apache.click.Control#onProcess() + * + * @return true to continue Page event processing or false otherwise + */ + public boolean onProcess() { + dispatchActionEvent(); + return true; + } + + /** + * Set the controls event listener. + *

+ * The method signature of the listener is:

    + *
  • must have a valid Java method name
  • + *
  • takes no arguments
  • + *
  • returns a boolean value
  • + *
+ *

+ * An example event listener method would be: + * + *

+     * public boolean onClick() {
+     *     System.out.println("onClick called");
+     *     return true;
+     * } 
+ * + * @param listener the listener object with the named method to invoke + * @param method the name of the method to invoke + */ + public void setListener(Object listener, String method) { + this.listener = listener; + this.listenerMethod = method; + } + + /** + * This method does nothing. Subclasses may override this method to perform + * initialization. + * + * @see org.apache.click.Control#onInit() + */ + public void onInit() { + } + + /** + * This method does nothing. Subclasses may override this method to perform + * clean up any resources. + * + * @see org.apache.click.Control#onDestroy() + */ + public void onDestroy() { + } + + /** + * This method does nothing. Subclasses may override this method to deploy + * static web resources. + * + * @see org.openidentityplatform.openam.click.Control#onDeploy(ServletContext) + * + * @param servletContext the servlet context + */ + public void onDeploy(ServletContext servletContext) { + } + + /** + * This method does nothing. Subclasses may override this method to perform + * pre rendering logic. + * + * @see org.apache.click.Control#onRender() + */ + public void onRender() { + } + + /** + * @deprecated use the new {@link #getHeadElements()} instead + * + * @return the HTML includes statements for the control stylesheet and + * JavaScript files + */ + public final String getHtmlImports() { + throw new UnsupportedOperationException("Use getHeadElements instead"); + } + + /** + * @see org.apache.click.Control#getHeadElements() + * + * @return the list of HEAD elements to be included in the page + */ + public List getHeadElements() { + if (headElements == null) { + // Most controls won't provide their own head elements, so save + // memory by creating an empty array list + headElements = new ArrayList(0); + } + return headElements; + } + + /** + * Return the parent page of this control, or null if not defined. + * + * @return the parent page of this control, or null if not defined + */ + public Page getPage() { + return ClickUtils.getParentPage(this); + } + + /** + * Return the control CSS style for the given name. + * + * @param name the CSS style name + * @return the CSS style for the given name + */ + public String getStyle(String name) { + if (hasAttribute("style")) { + String currentStyles = getAttribute("style"); + Map stylesMap = parseStyles(currentStyles); + return stylesMap.get(name); + } else { + return null; + } + } + + /** + * Set the control CSS style name and value pair. + *

+ * For example given the ActionLink: + * + *

+     * ActionLink addLink = new ActionLink("addLink", "Add");
+     * addLink.setStyle("color", "red");
+     * addLink.setStyle("border", "1px solid black"); 
+ * + * Will render the HTML as: + *
+     * <a href=".." style="color:red;border:1px solid black;">Add</a>
+     * 
+ * To remove an existing style, set the value to null. + * + * @param name the CSS style name + * @param value the CSS style value + */ + public void setStyle(String name, String value) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + + String oldStyles = getAttribute("style"); + + if (oldStyles == null) { + + if (value == null) { + //Exit early + return; + } else { + //If value is not null, append the new style and return + getAttributes().put("style", name + ":" + value + ";"); + return; + } + } + + //Create buffer and estimate the new size + HtmlStringBuffer buffer = new HtmlStringBuffer( + oldStyles.length() + 10); + + //Parse the current styles into a map + Map stylesMap = parseStyles(oldStyles); + + //Check if the new style is already present + if (stylesMap.containsKey(name)) { + + //If the style is present and the value is null, remove the style, + //otherwise replace it with the new value + if (value == null) { + stylesMap.remove(name); + } else { + stylesMap.put(name, value); + } + } else { + stylesMap.put(name, value); + } + + //The styles map might be empty if the last style was removed + if (stylesMap.isEmpty()) { + getAttributes().remove("style"); + return; + } + + //Iterate over the stylesMap appending each entry to buffer + for (Entry entry : stylesMap.entrySet()) { + String styleName = entry.getKey(); + String styleValue = entry.getValue(); + buffer.append(styleName); + buffer.append(":"); + buffer.append(styleValue); + buffer.append(";"); + } + getAttributes().put("style", buffer.toString()); + } + + /** + * Return true if CSS styles are defined. + * + * @deprecated use {@link #hasAttribute(String)} instead + * + * @return true if CSS styles are defined + */ + public boolean hasStyles() { + return (styles != null && !styles.isEmpty()); + } + + /** + * Return the Map of control CSS styles. + * + * @deprecated use {@link #getAttribute(String)} instead + * + * @return the Map of control CSS styles + */ + public Map getStyles() { + if (styles == null) { + styles = new HashMap(); + } + return styles; + } + + /** + * Add the CSS class attribute. Null values will be ignored. + *

+ * For example given the ActionLink: + * + *

+     * ActionLink addLink = new ActionLink("addLink", "Add");
+     * addLink.addStyleClass("red"); 
+ * + * Will render the HTML as: + *
+     * <a href=".." class="red">Add</a> 
+ * + * @param value the class attribute to add + */ + public void addStyleClass(String value) { + //If value is null, exit early + if (value == null) { + return; + } + + //If any class attributes already exist, check if the specified class + //exists in the current set of classes. + if (hasAttribute("class")) { + String oldStyleClasses = getAttribute("class").trim(); + + //Check if the specified class exists in the class attribute set + boolean classExists = classExists(value, oldStyleClasses); + + if (classExists) { + //If the class already exist, exit early + return; + } + + //Specified class does not exist so add it with the other class + //attributes + getAttributes().put("class", oldStyleClasses + " " + value); + + } else { + //Since no class attributes exist yet, only add the specified class + setAttribute("class", value); + } + } + + /** + * Removes the CSS class attribute. + * + * @param value the CSS class attribute + */ + public void removeStyleClass(String value) { + // If value is null, exit early + if (value == null) { + return; + } + + // If any class attributes already exist, check if the specified class + // exists in the current set of classes. + if (hasAttribute("class")) { + String oldStyleClasses = getAttribute("class").trim(); + + //Check if the specified class exists in the class attribute set + boolean classExists = classExists(value, oldStyleClasses); + + if (!classExists) { + //If the class does not exist, exit early + return; + } + + // If the class does exist, parse the class attributes into a set + // and remove the specified class + Set styleClassSet = parseStyleClasses(oldStyleClasses); + styleClassSet.remove(value); + + if (styleClassSet.isEmpty()) { + // If there are no more styleClasses left, remove the class + // attribute from the attributes list + getAttributes().remove("class"); + } else { + // Otherwise render the styleClasses. + // Create buffer and estimate the new size + HtmlStringBuffer buffer = new HtmlStringBuffer( + oldStyleClasses.length() + value.length()); + + // Iterate over the styleClassSet appending each entry to buffer + Iterator it = styleClassSet.iterator(); + while (it.hasNext()) { + String entry = it.next(); + buffer.append(entry); + if (it.hasNext()) { + buffer.append(" "); + } + } + getAttributes().put("class", buffer.toString()); + } + } + } + + /** + * Render the control's output to the specified buffer. + *

+ * If {@link #getTag()} returns null, this method will return an empty + * string. + *

+ * @see org.apache.click.Control#render(org.apache.click.util.HtmlStringBuffer) + * + * @param buffer the specified buffer to render the control's output to + */ + public void render(HtmlStringBuffer buffer) { + if (getTag() == null) { + return; + } + renderTagBegin(getTag(), buffer); + renderTagEnd(getTag(), buffer); + } + + /** + * Returns the HTML representation of this control. + *

+ * This method delegates the rendering to the method + * {@link #render(org.openidentityplatform.openam.click.util.HtmlStringBuffer)}. The size of buffer + * is determined by {@link #getControlSizeEst()}. + * + * @see Object#toString() + * + * @return the HTML representation of this control + */ + @Override + public String toString() { + if (getTag() == null) { + return ""; + } + HtmlStringBuffer buffer = new HtmlStringBuffer(getControlSizeEst()); + render(buffer); + return buffer.toString(); + } + + // Protected Methods ------------------------------------------------------ + + /** + * Dispatch an action event to the {@link org.apache.click.ActionEventDispatcher}. + * + * @see org.apache.click.ActionEventDispatcher#dispatchActionEvent(org.apache.click.Control, org.apache.click.ActionListener) + * @see org.apache.click.ActionEventDispatcher#dispatchAjaxBehaviors(org.apache.click.Control) + */ + protected void dispatchActionEvent() { + if (getActionListener() != null) { + ActionEventDispatcher.dispatchActionEvent(this, getActionListener()); + } + + if (hasBehaviors()) { + ActionEventDispatcher.dispatchAjaxBehaviors(this); + } + } + + /** + * Append all the controls attributes to the specified buffer. + * + * @param buffer the specified buffer to append all the attributes + */ + protected void appendAttributes(HtmlStringBuffer buffer) { + if (hasAttributes()) { + buffer.appendAttributes(attributes); + } + } + + /** + * Render the tag and common attributes including {@link #getId() id}, + * class and style. The {@link #getName() name} attribute + * is not rendered by this control. It is up to subclasses + * whether to render the name attribute or not. Generally only + * {@link org.apache.click.control.Field} controls render the name attribute. + *

+ * Please note: the tag will not be closed by this method. This + * enables callers of this method to append extra attributes as needed. + *

+ * For example the following example: + * + *

+     * Field field = new TextField("mytext");
+     * HtmlStringBuffer buffer = new HtmlStringBuffer();
+     * field.renderTagBegin("input", buffer); 
+ * + * will render: + * + *
+     * <input name="mytext" id="mytext" 
+ * + * Note that the tag is not closed, so subclasses can render extra + * attributes. + * + * @param tagName the name of the tag to render + * @param buffer the buffer to append the output to + */ + protected void renderTagBegin(String tagName, + HtmlStringBuffer buffer) { + if (tagName == null) { + throw new IllegalStateException("Tag cannot be null"); + } + + buffer.elementStart(tagName); + + String id = getId(); + if (id != null) { + buffer.appendAttribute("id", id); + } + + appendAttributes(buffer); + } + + /** + * Closes the specified tag. + * + * @param tagName the name of the tag to close + * @param buffer the buffer to append the output to + */ + protected void renderTagEnd(String tagName, HtmlStringBuffer buffer) { + buffer.elementEnd(); + } + + /** + * Return the estimated rendered control size in characters. + * + * @return the estimated rendered control size in characters + */ + protected int getControlSizeEst() { + int size = 0; + if (getTag() != null && hasAttributes()) { + //length of the markup -> == 3 + //1 * tag.length() + size += 3 + getTag().length(); + //using 20 as an estimate + size += 20 * getAttributes().size(); + } + return size; + } + + // Private Methods -------------------------------------------------------- + + /** + * Parse the specified string of style attributes and return a Map + * of key/value pairs. Invalid key/value pairs will not be added to + * the map. + * + * @param style the string containing the styles to parse + * @return map containing key/value pairs of the specified style + * @throws IllegalArgumentException if style is null + */ + private Map parseStyles(String style) { + if (style == null) { + throw new IllegalArgumentException("style cannot be null"); + } + + //LinkHashMap is used to keep the order of the style names. Probably + //makes no difference to browser but it makes testing easier since the + //order that styles are added are kept when rendering the control. + Map stylesMap = new LinkedHashMap(); + StringTokenizer tokens = new StringTokenizer(style, ";"); + while (tokens.hasMoreTokens()) { + String token = tokens.nextToken(); + int keyEnd = token.indexOf(":"); + + //If there is no key/value delimiter or value is empty, continue + if (keyEnd == -1 || (keyEnd + 1) == token.length()) { + continue; + } + //Check that the value part of the key/value pair not only + //consists of a ';' char. + if (token.charAt(keyEnd + 1) == ';') { + continue; + } + String styleName = token.substring(0, keyEnd); + String styleValue = token.substring(keyEnd + 1); + stylesMap.put(styleName, styleValue); + } + + return stylesMap; + } + + /** + * Parse the specified string of style attributes and return a Map + * of key/value pairs. Invalid key/value pairs will not be added to + * the map. + * + * @param styleClasses the string containing the styles to parse + * @return map containing key/value pairs of the specified style + * @throws IllegalArgumentException if styleClasses is null + */ + private Set parseStyleClasses(String styleClasses) { + if (styleClasses == null) { + throw new IllegalArgumentException("styleClasses cannot be null"); + } + + //LinkHashMap is used to keep the order of the class names. Probably + //makes no difference to browser but it makes testing easier since the + //order that classes were added in, are kept when rendering the control. + //Thus one can test whether the expected result and actual result match. + Set styleClassesSet = new LinkedHashSet(); + StringTokenizer tokens = new StringTokenizer(styleClasses, " "); + while (tokens.hasMoreTokens()) { + String token = tokens.nextToken(); + styleClassesSet.add(token); + } + + return styleClassesSet; + } + + /** + * Return true if the new value exists in the current value. + * + * @param newValue the value of the class attribute to check + * @param currentValue the current value to test + * @return true if the classToFind exists in the current value set + */ + private boolean classExists(String newValue, String currentValue) { + //To find if a class eg. "myclass" exists, check the following: + + //1. Check if "myclass" is the only value in the string + // -> "myclass" + if (newValue.length() == currentValue.length() + && currentValue.indexOf(newValue) == 0) { + return true; + } + + //2. Check if "myclass" exists at beginning of string + // -> "myclass otherclass" + if (currentValue.startsWith(newValue + " ")) { + return true; + } + + //3. Check if "myclass" exists in middle of string + // -> "anotherclass myclass otherclass" + if (currentValue.indexOf(" " + newValue + " ") >= 0) { + return true; + } + + //4. Check if "myclass" exists at end of string + // -> "anotherclass myclass" + return (currentValue.endsWith(" " + newValue)); + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/AbstractLink.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/AbstractLink.java new file mode 100644 index 0000000000..e920367086 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/AbstractLink.java @@ -0,0 +1,818 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click.control; + +import org.openidentityplatform.openam.click.Context; +import org.apache.click.Stateful; +import org.apache.click.control.ActionLink; +import org.apache.click.control.Submit; +import org.openidentityplatform.openam.click.util.ClickUtils; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; +import org.apache.commons.lang.StringUtils; + +import jakarta.servlet.http.HttpServletRequest; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; + +/** + * Provides a Abstract Link control:   <a href=""></a>. + *

+ * See also the W3C HTML reference: + * A Links + * + * @see ActionLink + * @see Submit + */ +public abstract class AbstractLink extends AbstractControl implements Stateful { + + private static final long serialVersionUID = 1L; + + // Instance Variables ----------------------------------------------------- + + /** The Field disabled value. */ + protected boolean disabled; + + /** + * The image src path attribute. If the image src is defined then a + * <img/> element will rendered inside the anchor link when + * using the AbstractLink {@link #toString()} method. + *

+ * If the image src value is prefixed with '/' then the request context path + * will be prefixed to the src value when rendered by the control. + */ + protected String imageSrc; + + /** The link display label. */ + protected String label; + + /** The link parameters map. */ + protected Map parameters; + + /** The link 'tabindex' attribute. */ + protected int tabindex; + + /** The link title attribute, which acts as a tooltip help message. */ + protected String title; + + /** Flag to set if both icon and text are rendered, default value is false. */ + protected boolean renderLabelAndImage = false; + + // Constructors ----------------------------------------------------------- + + /** + * Create an AbstractLink for the given name. + * + * @param name the page link name + * @throws IllegalArgumentException if the name is null + */ + public AbstractLink(String name) { + setName(name); + } + + /** + * Create an AbstractLink with no name defined. + *

+ * Please note the control's name must be defined before it is valid. + */ + public AbstractLink() { + } + + // Public Attributes ------------------------------------------------------ + + /** + * Return the link html tag: a. + * + * @see AbstractControl#getTag() + * + * @return this controls html tag + */ + @Override + public String getTag() { + return "a"; + } + + /** + * Return true if the AbstractLink is a disabled. If the link is disabled + * it will be rendered as <span> element with a HTML class attribute + * of "disabled". + * + * @return true if the AbstractLink is a disabled + */ + public boolean isDisabled() { + return disabled; + } + + /** + * Set the disabled flag. If the link is disabled it will be rendered as + * <span> element with a HTML class attribute of "disabled". + * + * @param disabled the disabled flag + */ + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + + /** + * Return the AbstractLink anchor <a> tag href attribute. + * This method will encode the URL with the session ID + * if required using HttpServletResponse.encodeURL(). + * + * @return the AbstractLink HTML href attribute + */ + public abstract String getHref(); + + /** + * Return the image src path attribute. If the image src is defined then a + * <img/> element will be rendered inside the anchor link + * when using the AbstractLink {@link #toString()} method. + *

+ * Note: the label will not be rendered in this case (default behavior), + * unless the {@link #setRenderLabelAndImage(boolean)} flag is set to true. + *

+ * If the src value is prefixed with '/' then the request context path will + * be prefixed to the src value when rendered by the control. + * + * @return the image src path attribute + */ + public String getImageSrc() { + return imageSrc; + } + + /** + * Set the image src path attribute. If the src value is prefixed with + * '/' then the request context path will be prefixed to the src value when + * rendered by the control. + *

+ * If the image src is defined then an <img/> element will + * be rendered inside the anchor link when using the AbstractLink + * {@link #toString()} method. + *

+ * Note: the label will not be rendered in this case (default behavior), + * unless the {@link #setRenderLabelAndImage(boolean)} flag is set to true. + * + * @param src the image src path attribute + */ + public void setImageSrc(String src) { + this.imageSrc = src; + } + + /** + * Return the "id" attribute value if defined, or null otherwise. + * + * @see org.apache.click.Control#getId() + * + * @return HTML element identifier attribute "id" value + */ + @Override + public String getId() { + if (hasAttributes()) { + return getAttribute("id"); + } else { + return null; + } + } + + /** + * Return the label for the AbstractLink. + *

+ * If the label value is null, this method will attempt to find a + * localized label message in the parent messages using the key: + *

+ * getName() + ".label" + *
+ * If not found then the message will be looked up in the + * /click-control.properties file using the same key. + * If a value still cannot be found then the ActionLink name will be converted + * into a label using the method: {@link ClickUtils#toLabel(String)} + *

+ * For example given a OrderPage with the properties file + * OrderPage.properties: + * + *

+     * checkout.label=Checkout
+     * checkout.title=Proceed to Checkout 
+ * + * The page ActionLink code: + *
+     * public class OrderPage extends Page {
+     *     ActionLink checkoutLink = new ActionLink("checkout");
+     *     ..
+     * } 
+ * + * Will render the AbstractLink label and title properties as: + *
+     * <a href=".." title="Proceed to Checkout">Checkout</a> 
+ * + * When a label value is not set, or defined in any properties files, then + * its value will be created from the Fields name. + *

+ * For example given the ActionLink code: + * + *

+     * ActionLink nameField = new ActionLink("deleteItem");  
+ * + * Will render the ActionLink label as: + *
+     * <a href="..">Delete Item</a> 
+ * + * Note the ActionLink label can include raw HTML to render other elements. + *

+ * For example the configured label: + * + *

+     * edit.label=<img src="images/edit.png" title="Edit Item"/> 
+ * + * Will render the ActionLink label as: + *
+     * <a href=".."><img src="images/edit.png" title="Edit Item"/></a> 
+ * + * @return the label for the ActionLink + */ + public String getLabel() { + if (label == null) { + label = getMessage(getName() + ".label"); + } + if (label == null) { + label = ClickUtils.toLabel(getName()); + } + return label; + } + + /** + * Set the label for the ActionLink. + * + * @see #getLabel() + * + * @param label the label for the ActionLink + */ + public void setLabel(String label) { + this.label = label; + } + + /** + * Return the link request parameter value for the given name, or null if + * the parameter value does not exist. + * + * @param name the name of request parameter + * @return the link request parameter value + */ + public String getParameter(String name) { + if (hasParameters()) { + Object value = getParameters().get(name); + + if (value instanceof String) { + return (String) value; + } + + if (value instanceof String[]) { + String[] array = (String[]) value; + if (array.length >= 1) { + return array[0]; + } else { + return null; + } + } + + return (value == null ? null : value.toString()); + } else { + return null; + } + } + + /** + * Set the link parameter with the given parameter name and value. You would + * generally use parameter if you were creating the entire AbstractLink + * programmatically and rendering it with the {@link #toString()} method. + *

+ * For example given the ActionLink: + * + *

+     * PageLink editLink = new PageLink("editLink", EditCustomer.class);
+     * editLink.setLabel("Edit Customer");
+     * editLink.setParameter("customerId", customerId); 
+ * + * And the page template: + *
+     * $editLink 
+ * + * Will render the HTML as: + *
+     * <a href="/mycorp/edit-customer.htm?customerId=13490">Edit Customer</a> 
+ * + * @param name the attribute name + * @param value the attribute value + * @throws IllegalArgumentException if name parameter is null + */ + public void setParameter(String name, Object value) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + + if (value != null) { + getParameters().put(name, value); + } else { + getParameters().remove(name); + } + } + + /** + * Return the link request parameter values for the given name, or null if + * the parameter values does not exist. + * + * @param name the name of request parameter + * @return the link request parameter values + */ + public String[] getParameterValues(String name) { + if (hasParameters()) { + Object values = getParameters().get(name); + if (values instanceof String) { + return new String[] { values.toString() }; + } + if (values instanceof String[]) { + return (String[]) values; + } else { + return null; + } + } else { + return null; + } + } + + /** + * Set the link parameter with the given parameter name and values. If the + * values are null, the parameter will be removed from the {@link #parameters}. + * + * @see #setParameter(String, Object) + * + * @param name the attribute name + * @param values the attribute values + * @throws IllegalArgumentException if name parameter is null + */ + public void setParameterValues(String name, Object[] values) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + + if (values != null) { + getParameters().put(name, values); + } else { + getParameters().remove(name); + } + } + + /** + * Return the AbstractLink parameters Map. + * + * @return the AbstractLink parameters Map + */ + public Map getParameters() { + if (parameters == null) { + parameters = new HashMap(4); + } + return parameters; + } + + /** + * Set the AbstractLink parameter map. + * + * @param parameters the link parameter map + */ + public void setParameters(Map parameters) { + this.parameters = parameters; + } + + /** + * Defines a link parameter that will have its value bound to a matching + * request parameter. {@link #setParameter(String, Object) setParameter} + * implicitly defines a parameter as well. + *

+ * Please note: parameters need only be defined for Ajax requests. + * For non-Ajax requests, all incoming request parameters + * are bound, whether they are defined or not. This behavior may change in a + * future release. + *

+ * Also note: link parameters are bound to request parameters + * during the {@link #onProcess()} event, so link parameters must be defined + * in the Page constructor or onInit() event. + * + * @param name the name of the parameter to define + */ + public void defineParameter(String name) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + + Map localParameters = getParameters(); + if (!localParameters.containsKey(name)) { + localParameters.put(name, null); + } + } + + /** + * Return true if the AbstractLink has parameters, false otherwise. + * + * @return true if the AbstractLink has parameters, false otherwise + */ + public boolean hasParameters() { + return parameters != null && !parameters.isEmpty(); + } + + /** + * Return the link "tabindex" attribute value. + * + * @return the link "tabindex" attribute value + */ + public int getTabIndex() { + return tabindex; + } + + /** + * Set the link "tabindex" attribute value. + * + * @param tabindex the link "tabindex" attribute value + */ + public void setTabIndex(int tabindex) { + this.tabindex = tabindex; + } + + /** + * Return the 'title' attribute, or null if not defined. The title + * attribute acts like tooltip message over the link. + *

+ * If the title value is null, this method will attempt to find a + * localized label message in the parent messages using the key: + *

+ * getName() + ".title" + *
+ * If not found then the message will be looked up in the + * /click-control.properties file using the same key. + *

+ * For examle given a ItemsPage with the properties file + * ItemPage.properties: + * + *

+     * edit.label=Edit
+     * edit.title=Edit Item 
+ * + * The page ActionLink code: + *
+     * public class ItemsPage extends Page {
+     *     ActionLink editLink = new ActionLink("edit");
+     *     ..
+     * } 
+ * + * Will render the ActionLink label and title properties as: + *
+     * <a href=".." title="Edit Item">Edit</a> 
+ * + * @return the 'title' attribute tooltip message + */ + public String getTitle() { + if (title == null) { + title = getMessage(getName() + ".title"); + } + return title; + } + + /** + * Set the 'title' attribute tooltip message. + * + * @see #getTitle() + * + * @param value the 'title' attribute tooltip message + */ + public void setTitle(String value) { + title = value; + } + + /** + * Returns true if both {@link #setImageSrc(String) icon} + * and {@link #setLabel(String) label} are rendered, + * false otherwise. + * + * @return true if both icon and text are rendered, + * false otherwise + */ + public boolean isRenderLabelAndImage() { + return renderLabelAndImage; + } + + /** + * Sets whether both {@link #setLabel(String) label} and + * {@link #setImageSrc(String) icon} are rendered for this + * link. + * + * @param renderLabelAndImage sets the rendering type of the link. + */ + public void setRenderLabelAndImage(boolean renderLabelAndImage) { + this.renderLabelAndImage = renderLabelAndImage; + } + + @Override + public boolean isAjaxTarget(Context context) { + String id = getId(); + if (id != null) { + return context.getRequestParameter(id) != null; + } else { + String localName = getName(); + if (localName != null) { + return localName.equals(context.getRequestParameter(ActionLink.ACTION_LINK)); + } + } + return false; + } + + // Public Methods --------------------------------------------------------- + + /** + * This method does nothing by default since AbstractLink does not bind to + * request values. + */ + public void bindRequestValue() { + } + + /** + * Return the link state. The following state is returned: + *
    + *
  • {@link #getParameters() link parameters}
  • + *
+ * + * @return the link state + */ + public Object getState() { + if (hasParameters()) { + return getParameters(); + } + return null; + } + + /** + * Set the link state. + * + * @param state the link state to set + */ + public void setState(Object state) { + if (state == null) { + return; + } + + Map linkState = (Map) state; + setParameters(linkState); + } + + /** + * Render the HTML representation of the anchor link. This method + * will render the entire anchor link including the tags, the label and + * any attributes, see {@link #setAttribute(String, String)} for an + * example. + *

+ * If the image src is defined then a <img/> element will + * rendered inside the anchor link instead of the label property. + *

+ * This method invokes the abstract {@link #getHref()} method. + * + * @see #toString() + * + * @param buffer the specified buffer to render the control's output to + */ + @Override + public void render(HtmlStringBuffer buffer) { + + if (isDisabled()) { + + buffer.elementStart("span"); + buffer.appendAttribute("id", getId()); + addStyleClass("disabled"); + buffer.appendAttribute("class", getAttribute("class")); + + if (hasAttribute("style")) { + buffer.appendAttribute("style", getAttribute("style")); + } + + buffer.closeTag(); + + if (StringUtils.isBlank(getImageSrc())) { + buffer.append(getLabel()); + + } else { + renderImgTag(buffer); + if (isRenderLabelAndImage()) { + buffer.elementStart("span").closeTag(); + buffer.append(getLabel()); + buffer.elementEnd("span"); + } + } + + buffer.elementEnd("span"); + + } else { + buffer.elementStart(getTag()); + removeStyleClass("disabled"); + buffer.appendAttribute("href", getHref()); + buffer.appendAttribute("id", getId()); + buffer.appendAttributeEscaped("title", getTitle()); + if (getTabIndex() > 0) { + buffer.appendAttribute("tabindex", getTabIndex()); + } + + appendAttributes(buffer); + + buffer.closeTag(); + + if (StringUtils.isBlank(getImageSrc())) { + buffer.append(getLabel()); + + } else { + renderImgTag(buffer); + if (isRenderLabelAndImage()) { + buffer.elementStart("span").closeTag(); + buffer.append(getLabel()); + buffer.elementEnd("span"); + } + } + + buffer.elementEnd(getTag()); + } + } + + /** + * Remove the link state from the session for the given request context. + * + * @see #saveState(Context) + * @see #restoreState(Context) + * + * @param context the request context + */ + public void removeState(Context context) { + ClickUtils.removeState(this, getName(), context); + } + + /** + * Restore the link state from the session for the given request context. + *

+ * This method delegates to {@link #setState(Object)} to set the + * link restored state. + * + * @see #saveState(Context) + * @see #removeState(Context) + * + * @param context the request context + */ + public void restoreState(Context context) { + ClickUtils.restoreState(this, getName(), context); + } + + /** + * Save the link state to the session for the given request context. + *

+ * * This method delegates to {@link #getState()} to retrieve the link state + * to save. + * + * @see #restoreState(Context) + * @see #removeState(Context) + * + * @param context the request context + */ + public void saveState(Context context) { + ClickUtils.saveState(this, getName(), context); + } + + // Protected Methods ------------------------------------------------------ + + /** + * Render the Image tag to the buffer. + * + * @param buffer the buffer to render the image tag to + */ + protected void renderImgTag(HtmlStringBuffer buffer) { + buffer.elementStart("img"); + buffer.appendAttribute("border", 0); + buffer.appendAttribute("hspace", 2); + buffer.appendAttribute("class", "link"); + + if (getTitle() != null) { + buffer.appendAttributeEscaped("alt", getTitle()); + } else { + buffer.appendAttributeEscaped("alt", getLabel()); + } + + String src = getImageSrc(); + if (StringUtils.isNotBlank(src)) { + if (src.charAt(0) == '/') { + src = getContext().getRequest().getContextPath() + src; + } + buffer.appendAttribute("src", src); + } + + buffer.elementEnd(); + } + + /** + * Render the given link parameters to the buffer. + *

+ * The parameters will be rendered as URL key/value pairs e.g: + * "firstname=john&lastname=smith". + *

+ * Multivalued parameters will be rendered with each value sharing the same + * key e.g: "name=john&name=susan&name=mary". + *

+ * The parameter value will be encoded through + * {@link ClickUtils#encodeUrl(Object, Context)}. + * + * @param buffer the buffer to render the parameters to + * @param parameters the parameters to render + * @param context the request context + */ + protected void renderParameters(HtmlStringBuffer buffer, Map parameters, + Context context) { + + Iterator i = parameters.keySet().iterator(); + while (i.hasNext()) { + String paramName = i.next(); + Object paramValue = getParameters().get(paramName); + + // Check for multivalued parameter + if (paramValue instanceof String[]) { + String[] paramValues = (String[]) paramValue; + for (int j = 0; j < paramValues.length; j++) { + buffer.append(paramName); + buffer.append("="); + buffer.append(ClickUtils.encodeUrl(paramValues[j], context)); + if (j < paramValues.length - 1) { + buffer.append("&"); + } + } + } else { + if (paramValue != null) { + buffer.append(paramName); + buffer.append("="); + buffer.append(ClickUtils.encodeUrl(paramValue, context)); + } + } + if (i.hasNext()) { + buffer.append("&"); + } + } + } + + /** + * This method binds the submitted request parameters to the link + * parameters. + *

+ * For non-Ajax requests this method will bind all incoming request + * parameters to the link. For Ajax requests this method will only bind + * the parameters already defined on the link. + * + * @param context the request context + */ + @SuppressWarnings("unchecked") + protected void bindRequestParameters(Context context) { + HttpServletRequest request = context.getRequest(); + + Set parameterNames = null; + + if (context.isAjaxRequest()) { + parameterNames = getParameters().keySet(); + } else { + parameterNames = request.getParameterMap().keySet(); + } + + for (String param : parameterNames) { + String[] values = request.getParameterValues(param); + // Do not process request parameters that return null values. Null + // values are only returned if the request parameter is not present. + // A null value can only occur for Ajax requests which processes + // parameters defined on the link, not the incoming parameters. + // The reason for not processing the null value is because it would + // nullify parametesr that was set during onInit + if (values == null) { + continue; + } + + if (values.length == 1) { + getParameters().put(param, values[0]); + } else { + getParameters().put(param, values); + } + } + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/ActionLink.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/ActionLink.java new file mode 100644 index 0000000000..c90f5f0423 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/ActionLink.java @@ -0,0 +1,517 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click.control; + +import org.openidentityplatform.openam.click.Context; +import org.apache.click.control.Submit; +import org.openidentityplatform.openam.click.util.ClickUtils; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; +import org.apache.commons.lang.StringUtils; + +/** + * Provides a Action Link control:   <a href=""></a>. + * + * + * + *
+ * Action Link + *
+ * + * This control can render the "href" URL attribute using + * {@link #getHref()}, or the entire ActionLink anchor tag using + * {@link #toString()}. + *

+ * ActionLink support invoking control listeners. + * + *

ActionLink Example

+ * + * An example of using ActionLink to call a logout method is illustrated below: + * + *
+ * public class MyPage extends Page {
+ *
+ *     public MyPage() {
+ *         ActionLink link = new ActionLink("logoutLink");
+ *         link.setListener(this, "onLogoutClick");
+ *         addControl(link);
+ *     }
+ *
+ *     public boolean onLogoutClick() {
+ *         if (getContext().hasSession()) {
+ *            getContext().getSession().invalidate();
+ *         }
+ *         setRedirect(LogoutPage.class);
+ *
+ *         return false;
+ *     }
+ * } 
+ * + * The corresponding template code is below. Note href is evaluated by Velocity + * to {@link #getHref()}: + * + *
+ * <a href="$logoutLink.href" title="Click to Logout">Logout</a> 
+ * + * ActionLink can also support a value parameter which is accessible + * using {@link #getValue()}. + *

+ * For example a products table could include rows + * of products, each with a get product details ActionLink and add product + * ActionLink. The ActionLinks include the product's id as a parameter to + * the {@link #getHref(Object)} method, which is then available when the + * control is processed: + * + *

+ * <table>
+ * #foreach ($product in $productList)
+ *   <tr>
+ *    <td>
+ *      $product.name
+ *    </td>
+ *    <td>
+ *      <a href="$detailsLink.getHref($product.id)" title="Get product information">Details</a>
+ *    </td>
+ *    <td>
+ *      <a href="$addLink.getHref($product.id)" title="Add to basket">Add</a>
+ *    </td>
+ *   </tr>
+ * #end
+ * </table> 
+ * + * The corresponding Page class for this template is: + * + *
+ * public class ProductsPage extends Page {
+ *
+ *     public ActionLink addLink = new ActionLink("addLink", this, "onAddClick");
+ *     public ActionLink detailsLink  = new ActionLink("detailsLink", this, "onDetailsClick");
+ *     public List productList;
+ *
+ *     public boolean onAddClick() {
+ *         // Get the product clicked on by the user
+ *         Integer productId = addLink.getValueInteger();
+ *         Product product = getProductService().getProduct(productId);
+ *
+ *         // Add product to basket
+ *         List basket = (List) getContext().getSessionAttribute("basket");
+ *         basket.add(product);
+ *         getContext().setSessionAttribute("basket", basket);
+ *
+ *         return true;
+ *     }
+ *
+ *     public boolean onDetailsClick() {
+ *         // Get the product clicked on by the user
+ *         Integer productId = detailsLink.getValueInteger();
+ *         Product product = getProductService().getProduct(productId);
+ *
+ *         // Store the product in the request and display in the details page
+ *         getContext().setRequestAttribute("product", product);
+ *         setForward(ProductDetailsPage.class);
+ *
+ *         return false;
+ *     }
+ *
+ *     public void onRender() {
+ *         // Display the list of available products
+ *         productList = getProductService().getProducts();
+ *     }
+ * } 
+ * + * See also the W3C HTML reference: + * A Links + * + * @see org.apache.click.control.AbstractLink + * @see Submit + */ +public class ActionLink extends AbstractLink { + + // Constants -------------------------------------------------------------- + + private static final long serialVersionUID = 1L; + + /** The action link parameter name:   actionLink. */ + public static final String ACTION_LINK = "actionLink"; + + /** The value parameter name:   value. */ + public static final String VALUE = "value"; + + // Instance Variables ----------------------------------------------------- + + /** The link is clicked. */ + protected boolean clicked; + + // Constructors ----------------------------------------------------------- + + /** + * Create an ActionLink for the given name. + *

+ * Please note the name 'actionLink' is reserved as a control request + * parameter name and cannot be used as the name of the control. + * + * @param name the action link name + * @throws IllegalArgumentException if the name is null + */ + public ActionLink(String name) { + setName(name); + } + + /** + * Create an ActionLink for the given name and label. + *

+ * Please note the name 'actionLink' is reserved as a control request + * parameter name and cannot be used as the name of the control. + * + * @param name the action link name + * @param label the action link label + * @throws IllegalArgumentException if the name is null + */ + public ActionLink(String name, String label) { + setName(name); + setLabel(label); + } + + /** + * Create an ActionLink for the given listener object and listener + * method. + * + * @param listener the listener target object + * @param method the listener method to call + * @throws IllegalArgumentException if the name, listener or method is null + * or if the method is blank + */ + public ActionLink(Object listener, String method) { + if (listener == null) { + throw new IllegalArgumentException("Null listener parameter"); + } + if (StringUtils.isBlank(method)) { + throw new IllegalArgumentException("Blank listener method"); + } + setListener(listener, method); + } + + /** + * Create an ActionLink for the given name, listener object and listener + * method. + *

+ * Please note the name 'actionLink' is reserved as a control request + * parameter name and cannot be used as the name of the control. + * + * @param name the action link name + * @param listener the listener target object + * @param method the listener method to call + * @throws IllegalArgumentException if the name, listener or method is null + * or if the method is blank + */ + public ActionLink(String name, Object listener, String method) { + setName(name); + if (listener == null) { + throw new IllegalArgumentException("Null listener parameter"); + } + if (StringUtils.isBlank(method)) { + throw new IllegalArgumentException("Blank listener method"); + } + setListener(listener, method); + } + + /** + * Create an ActionLink for the given name, label, listener object and + * listener method. + *

+ * Please note the name 'actionLink' is reserved as a control request + * parameter name and cannot be used as the name of the control. + * + * @param name the action link name + * @param label the action link label + * @param listener the listener target object + * @param method the listener method to call + * @throws IllegalArgumentException if the name, listener or method is null + * or if the method is blank + */ + public ActionLink(String name, String label, Object listener, + String method) { + + setName(name); + setLabel(label); + if (listener == null) { + throw new IllegalArgumentException("Null listener parameter"); + } + if (StringUtils.isBlank(method)) { + throw new IllegalArgumentException("Blank listener method"); + } + setListener(listener, method); + } + + /** + * Create an ActionLink with no name defined. Please note the + * control's name must be defined before it is valid. + */ + public ActionLink() { + } + + // Public Attributes ------------------------------------------------------ + + /** + * Returns true if the ActionLink was clicked, otherwise returns false. + * + * @return true if the ActionLink was clicked, otherwise returns false. + */ + public boolean isClicked() { + return clicked; + } + + /** + * Return the ActionLink anchor <a> tag href attribute for the + * given value. This method will encode the URL with the session ID + * if required using HttpServletResponse.encodeURL(). + * + * @param value the ActionLink value parameter + * @return the ActionLink HTML href attribute + */ + public String getHref(Object value) { + Context context = getContext(); + String uri = ClickUtils.getRequestURI(context.getRequest()); + + HtmlStringBuffer buffer = + new HtmlStringBuffer(uri.length() + getName().length() + 40); + + buffer.append(uri); + buffer.append("?"); + buffer.append(ACTION_LINK); + buffer.append("="); + buffer.append(getName()); + if (value != null) { + buffer.append("&"); + buffer.append(VALUE); + buffer.append("="); + buffer.append(ClickUtils.encodeUrl(value, context)); + } + + if (hasParameters()) { + for (String paramName : getParameters().keySet()) { + if (!paramName.equals(ACTION_LINK) && !paramName.equals(VALUE)) { + Object paramValue = getParameters().get(paramName); + + // Check for multivalued parameter + if (paramValue instanceof String[]) { + String[] paramValues = (String[]) paramValue; + for (int j = 0; j < paramValues.length; j++) { + buffer.append("&"); + buffer.append(paramName); + buffer.append("="); + buffer.append(ClickUtils.encodeUrl(paramValues[j], + context)); + } + } else { + if (paramValue != null) { + buffer.append("&"); + buffer.append(paramName); + buffer.append("="); + buffer.append(ClickUtils.encodeUrl(paramValue, + context)); + } + } + } + } + } + + return context.getResponse().encodeURL(buffer.toString()); + } + + /** + * Return the ActionLink anchor <a> tag href attribute value. + * + * @return the ActionLink anchor <a> tag HTML href attribute value + */ + @Override + public String getHref() { + return getHref(getValue()); + } + + /** + * Set the name of the Control. Each control name must be unique in the + * containing Page model or the containing Form. + *

+ * Please note the name 'actionLink' is reserved as a control request + * parameter name and cannot be used as the name of the control. + * + * @see org.apache.click.Control#setName(String) + * + * @param name of the control + * @throws IllegalArgumentException if the name is null + */ + @Override + public void setName(String name) { + if (ACTION_LINK.equals(name)) { + String msg = "Invalid name '" + ACTION_LINK + "'. This name is " + + "reserved for use as a control request parameter name"; + throw new IllegalArgumentException(msg); + } + super.setName(name); + } + + /** + * Set the parent of the ActionLink. + * + * @see org.apache.click.Control#setParent(Object) + * + * @param parent the parent of the Control + * @throws IllegalStateException if {@link #name} is not defined + * @throws IllegalArgumentException if the given parent instance is + * referencing this object: if (parent == this) + */ + @Override + public void setParent(Object parent) { + if (parent == this) { + throw new IllegalArgumentException("Cannot set parent to itself"); + } + if (getName() == null) { + String msg = "ActionLink name not defined."; + throw new IllegalArgumentException(msg); + } + this.parent = parent; + } + + /** + * Returns the ActionLink value if the action link was processed and has + * a value, or null otherwise. + * + * @return the ActionLink value if the ActionLink was processed + */ + public String getValue() { + return getParameter(VALUE); + } + + /** + * Returns the action link Double value if the action link was + * processed and has a value, or null otherwise. + * + * @return the action link Double value if the action link was processed + * + * @throws NumberFormatException if the value cannot be parsed into a Double + */ + public Double getValueDouble() { + String value = getValue(); + if (value != null) { + return Double.valueOf(value); + } else { + return null; + } + } + + /** + * Returns the ActionLink Integer value if the ActionLink was + * processed and has a value, or null otherwise. + * + * @return the ActionLink Integer value if the action link was processed + * + * @throws NumberFormatException if the value cannot be parsed into an Integer + */ + public Integer getValueInteger() { + String value = getValue(); + if (value != null) { + return Integer.valueOf(value); + } else { + return null; + } + } + + /** + * Returns the ActionLink Long value if the ActionLink was + * processed and has a value, or null otherwise. + * + * @return the ActionLink Long value if the action link was processed + * + * @throws NumberFormatException if the value cannot be parsed into a Long + */ + public Long getValueLong() { + String value = getValue(); + if (value != null) { + return Long.valueOf(value); + } else { + return null; + } + } + + /** + * Set the ActionLink value. + * + * @param value the ActionLink value + */ + public void setValue(String value) { + setParameter(VALUE, value); + } + + /** + * Set the value of the ActionLink using the given object. + * + * @param object the object value to set + */ + public void setValueObject(Object object) { + if (object != null) { + setValue(object.toString()); + } else { + setValue(null); + } + } + + /** + * This method binds the submitted request value to the ActionLink's + * value. + */ + @Override + public void bindRequestValue() { + Context context = getContext(); + if (context.isMultipartRequest()) { + return; + } + + clicked = getName().equals(context.getRequestParameter(ACTION_LINK)); + + if (clicked) { + String value = context.getRequestParameter(VALUE); + if (value != null) { + setValue(value); + } + bindRequestParameters(context); + } + } + + // Public Methods --------------------------------------------------------- + + /** + * This method will set the {@link #isClicked()} property to true if the + * ActionLink was clicked, and if an action callback listener was set + * this will be invoked. + * + * @see org.apache.click.Control#onProcess() + * + * @return true to continue Page event processing or false otherwise + */ + @Override + public boolean onProcess() { + bindRequestValue(); + + if (isClicked()) { + dispatchActionEvent(); + } + return true; + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Button.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Button.java new file mode 100644 index 0000000000..bdf74b6e4b --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Button.java @@ -0,0 +1,219 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click.control; + +import org.openidentityplatform.openam.click.Context; +import org.apache.click.control.Reset; +import org.apache.click.control.Submit; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; + +/** + * Provides a Button control:   <input type='button'/>. + * + * + * + *
+ * + *
+ * + * The Button control is used to render a JavaScript enabled button which can + * perform client side logic. The Button control provides no server side + * processing. If server side processing is required use {@link Submit} instead. + * + *

Button Example

+ * + * The example below adds a back button to a form, which when clicked returns + * to the previous page. + * + *
+ * Button backButton = new Button("back", " < Back ");
+ * backButton.setOnClick("history.back();");
+ * backButton.setTitle("Return to previous page");
+ * form.add(backButton); 
+ * + * HTML output: + *
+ * <input type='button' name='back' value=' < Back ' onclick='history.back();'
+ *        title='Return to previous page'/> 
+ * + * See also W3C HTML reference + * INPUT + * + * @see Reset + * @see Submit + */ +public class Button extends Field { + + // Constants -------------------------------------------------------------- + + private static final long serialVersionUID = 1L; + + // Constructors ----------------------------------------------------------- + + /** + * Create a button with the given name. + * + * @param name the button name + */ + public Button(String name) { + super(name); + } + + /** + * Create a button with the given name and label. The button label is + * rendered as the HTML "value" attribute. + * + * @param name the button name + * @param label the button label + */ + public Button(String name, String label) { + setName(name); + setLabel(label); + } + + /** + * Create a button with no name defined. + *

+ * Please note the control's name must be defined before it is valid. + */ + public Button() { + } + + // Public Attributes ------------------------------------------------------ + + /** + * Return the button's html tag: input. + * + * @see org.apache.click.control.AbstractControl#getTag() + * + * @return this controls html tag + */ + @Override + public String getTag() { + return "input"; + } + + /** + * Returns the button onclick attribute value, or null if not defined. + * + * @return the button onclick attribute value, or null if not defined. + */ + public String getOnClick() { + if (attributes != null) { + return attributes.get("onclick"); + } else { + return null; + } + } + + /** + * Sets the button onclick attribute value. + * + * @param value the onclick attribute value. + */ + public void setOnClick(String value) { + setAttribute("onclick", value); + } + + /** + * Return the input type: 'button'. + * + * @return the input type: 'button' + */ + public String getType() { + return "button"; + } + + // Public Methods -------------------------------------------------------- + + /** + * For non Ajax requests this method returns true, as buttons by default + * perform no server side logic. If the button is an Ajax target and a + * behavior is defined, the behavior action will be invoked. + * + * @see Field#onProcess() + * + * @return true to continue Page event processing or false otherwise + */ + @Override + public boolean onProcess() { + Context context = getContext(); + + if (context.isAjaxRequest()) { + + if (isDisabled()) { + // Switch off disabled property if control has incoming request + // parameter. Normally this means the field was enabled via JS + if (context.hasRequestParameter(getName())) { + setDisabled(false); + } else { + // If field is disabled skip process event + return true; + } + } + + if (context.hasRequestParameter(getName())) { + dispatchActionEvent(); + } + } + + return true; + } + + /** + * @see AbstractControl#getControlSizeEst() + * + * @return the estimated rendered control size in characters + */ + @Override + public int getControlSizeEst() { + return 40; + } + + /** + * Render the HTML representation of the Button. Note the button label is + * rendered as the HTML "value" attribute. + * + * @see #toString() + * + * @param buffer the specified buffer to render the control's output to + */ + @Override + public void render(HtmlStringBuffer buffer) { + buffer.elementStart(getTag()); + + buffer.appendAttribute("type", getType()); + buffer.appendAttribute("name", getName()); + buffer.appendAttribute("id", getId()); + buffer.appendAttribute("value", getLabel()); + buffer.appendAttribute("title", getTitle()); + if (getTabIndex() > 0) { + buffer.appendAttribute("tabindex", getTabIndex()); + } + + appendAttributes(buffer); + + if (isDisabled()) { + buffer.appendAttributeDisabled(); + } + + buffer.elementEnd(); + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Column.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Column.java new file mode 100644 index 0000000000..a9adbcf431 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Column.java @@ -0,0 +1,1596 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click.control; + +import org.openidentityplatform.openam.click.Context; +import org.openidentityplatform.openam.click.util.ClickUtils; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; +import org.apache.click.util.PropertyUtils; +import org.apache.commons.lang.math.NumberUtils; + +import java.io.Serializable; +import java.text.MessageFormat; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; +import java.util.StringTokenizer; + +/** + * Provides the Column table data <td> and table header <th> + * renderer. + * + * + *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
IdNameCategoryAction
834501Alison SmartResidential PropertyView
238454Angus RobinsBondsView
784191Ann MelanResidential PropertyView
+ * + *
+ * + *

+ * + * The Column object provide column definitions for the {@link org.apache.click.control.Table} object. + * + *

Column Options

+ * + * The Column class supports a number of rendering options which include: + * + *
    + *
  • {@link #autolink} - the option to automatically render href links + * for email and URL column values
  • + *
  • {@link #attributes} - the CSS style attributes for the table data cell
  • + *
  • {@link #dataClass} - the CSS class for the table data cell
  • + *
  • {@link #dataStyles} - the CSS styles for the table data cell
  • + *
  • {@link #decorator} - the custom column value renderer
  • + *
  • {@link #format} - the MessageFormat pattern rendering + * the column value
  • + *
  • {@link #headerClass} - the CSS class for the table header cell
  • + *
  • {@link #headerStyles} - the CSS styles for the table header cell
  • + *
  • {@link #headerTitle} - the table header cell value to render
  • + *
  • {@link #sortable} - the table column sortable property
  • + *
  • {@link #width} - the table cell width property
  • + *
+ * + *

Format Pattern

+ * + * The {@link #format} property which specifies {@link MessageFormat} pattern + * a is very useful for formatting column values. For example to render + * formatted number and date values you simply specify: + * + *
+ * Table table = new Table("table");
+ * table.setClass("isi");
+ *
+ * Column idColumn = new Column("purchaseId", "ID");
+ * idColumn.setFormat("{0,number,#,###}");
+ * table.addColumn(idColumn);
+ *
+ * Column priceColumn = new Column("purchasePrice", "Price");
+ * priceColumn.setFormat("{0,number,currency}");
+ * priceColumn.setTextAlign("right");
+ * table.addColumn(priceColumn);
+ *
+ * Column dateColumn = new Column("purchaseDate", "Date");
+ * dateColumn.setFormat("{0,date,dd MMM yyyy}");
+ * table.addColumn(dateColumn);
+ *
+ * Column orderIdColumn = new Column("order.id", "Order ID");
+ * table.addColumn(orderIdColumn);  
+ * + *

Column Decorators

+ * + * The support custom column value rendering you can specify a {@link Decorator} + * class on columns. The decorator render method is passed the table + * row object and the page request Context. Using the table row you can access + * all the column values enabling you to render a compound value composed of + * multiple column values. For example: + * + *
+ * Column column = new Column("email");
+ *
+ * column.setDecorator(new Decorator() {
+ *     public String render(Object row, Context context) {
+ *         Person person = (Person) row;
+ *         String email = person.getEmail();
+ *         String fullName = person.getFullName();
+ *         return "<a href='mailto:" + email + "'>" + fullName + "</a>";
+ *     }
+ * });
+ *
+ * table.addColumn(column); 
+ + * The Context parameter of the decorator render() method enables you to + * render controls to provide additional functionality. For example: + * + *
+ * public class CustomerList extends BorderedPage {
+ *
+ *     private Table table = new Table("table");
+ *     private ActionLink viewLink = new ActionLink("view");
+ *
+ *     public CustomerList() {
+ *
+ *         viewLink.setListener(this, "onViewClick");
+ *         viewLink.setLabel("View");
+ *         viewLink.setAttribute("title", "View customer details");
+ *         table.addControl(viewLink);
+ *
+ *         table.addColumn(new Column("id"));
+ *         table.addColumn(new Column("name"));
+ *         table.addColumn(new Column("category"));
+ *
+ *         Column column = new Column("Action");
+ *         column.setDecorator(new Decorator() {
+ *             public String render(Object row, Context context) {
+ *                 Customer customer = (Customer) row;
+ *                 viewLink.setValue("" + customer.getId());
+ *
+ *                 return viewLink.toString();
+ *             }
+ *          });
+ *         table.addColumn(column);
+ *
+ *         addControl(table);
+ *     }
+ *
+ *     public boolean onViewClick() {
+ *         String path = getContext().getPagePath(Logout.class);
+ *         setRedirect(path + "?id=" + viewLink.getValue());
+ *         return true;
+ *     }
+ * } 
+ * + *

Internationalization

+ * + * Column header titles can be localized using the controls parent messages. + * If the column header title value is null, the column will attempt to find a + * localized message in the parent messages using the key: + *
+ * getName() + ".headerTitle" + *
+ * If not found then the message will be looked up in the + * /click-control.properties file using the same key. + * If a value still cannot be found then the Column name will be converted + * into a header title using the method: {@link ClickUtils#toLabel(String)}. + *

+ * + * @see Decorator + * @see org.apache.click.control.Table + */ +public class Column implements Serializable { + + private static final long serialVersionUID = 1L; + + // ----------------------------------------------------- Instance Variables + + /** The Column attributes Map. */ + protected Map attributes; + + /** + * The automatically hyperlink column URL and email address values flag, + * default value is false. + */ + protected boolean autolink; + + /** The column table data <td> CSS class attribute. */ + protected String dataClass; + + /** The Map of column table data <td> CSS style attributes. */ + protected Map dataStyles; + + /** The column row decorator. */ + protected Decorator decorator; + + /** The escape HTML characters flag. The default value is true. */ + protected boolean escapeHtml = true; + + /** The column message format pattern. */ + protected String format; + + /** The CSS class attribute of the column header. */ + protected String headerClass; + + /** The Map of column table header <th> CSS style attributes. */ + protected Map headerStyles; + + /** The title of the column header. */ + protected String headerTitle; + + /** + * The maximum column length. If maxLength is greater than 0 and the column + * data string length is greater than maxLength, the rendered value will be + * truncated with an eclipse(...). + *

+ * Autolinked email or URL values will not be constrained. + *

+ * The default value is 0. + */ + protected int maxLength; + + /** + * The optional MessageFormat used to render the column table cell value. + */ + protected MessageFormat messageFormat; + + /** The property name of the row object to render. */ + protected String name; + + /** The column render id attribute status. The default value is false. */ + protected Boolean renderId; + + /** The method cached for rendering column values. */ + protected transient Map methodCache; + + /** The column sortable status. The default value is false. */ + protected Boolean sortable; + + /** The parent Table. */ + protected Table table; + + /** + * The property name used to populate the <td> "title" attribute. + * The default value is null. + */ + protected String titleProperty; + + /** The column HTML <td> width attribute. */ + protected String width; + + /** The column comparator object, which is used to sort column row values. */ + @SuppressWarnings("unchecked") + Comparator comparator; + + // ----------------------------------------------------------- Constructors + + /** + * Create a table column with the given property name. The table header + * title will be set as the capitalized property name. + * + * @param name the name of the property to render + */ + public Column(String name) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + this.name = name; + } + + /** + * Create a table column with the given property name and header title. + * + * @param name the name of the property to render + * @param title the column header title to render + */ + public Column(String name, String title) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + if (title == null) { + throw new IllegalArgumentException("Null title parameter"); + } + this.name = name; + this.headerTitle = title; + } + + /** + * Create a Column with no name defined. + *

+ * Please note the control's name must be defined before it is valid. + */ + public Column() { + } + + // ------------------------------------------------------ Public Properties + + /** + * Return the Column HTML attribute with the given name, or null if the + * attribute does not exist. + * + * @param name the name of column HTML attribute + * @return the Column HTML attribute + */ + public String getAttribute(String name) { + return getAttributes().get(name); + } + + /** + * Set the Column with the given HTML attribute name and value. These + * attributes will be rendered as HTML attributes, for example: + *

+ * If there is an existing named attribute in the Column it will be replaced + * with the new value. If the given attribute value is null, any existing + * attribute will be removed. + * + * @param name the name of the column HTML attribute + * @param value the value of the column HTML attribute + * @throws IllegalArgumentException if attribute name is null + */ + public void setAttribute(String name, String value) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + + if (value != null) { + getAttributes().put(name, value); + } else { + getAttributes().remove(name); + } + } + + /** + * Return the Column attributes Map. + * + * @return the column attributes Map. + */ + public Map getAttributes() { + if (attributes == null) { + attributes = new HashMap(); + } + return attributes; + } + + /** + * Return true if the Column has attributes or false otherwise. + * + * @return true if the column has attributes on false otherwise + */ + public boolean hasAttributes() { + return (attributes != null && !getAttributes().isEmpty()); + } + + /** + * Return the flag to automatically render HTML hyperlinks for column URL + * and email addresses values. + * + * @return automatically hyperlink column URL and email addresses flag + */ + public boolean getAutolink() { + return autolink; + } + + /** + * Set the flag to automatically render HTML hyperlinks for column URL + * and email addresses values. + * + * @param autolink the flag to automatically hyperlink column URL and + * email addresses flag + */ + public void setAutolink(boolean autolink) { + this.autolink = autolink; + } + + /** + * Return the column comparator object, which is used to sort column row + * values. + * + * @return the column row data sorting comparator object. + */ + @SuppressWarnings("unchecked") + public Comparator getComparator() { + if (comparator == null) { + comparator = new ColumnComparator(this); + } + return comparator; + } + + /** + * Set the column comparator object, which is used to sort column row + * values. + * + * @param comparator the column row data sorting comparator object + */ + @SuppressWarnings("unchecked") + public void setComparator(Comparator comparator) { + this.comparator = comparator; + } + + /** + * Return the table data <td> CSS class. + * + * @return the table data CSS class + */ + public String getDataClass() { + return dataClass; + } + + /** + * Set the table data <td> CSS class. + * + * @param dataClass the table data CSS class + */ + public void setDataClass(String dataClass) { + this.dataClass = dataClass; + } + + /** + * Return the table data <td> CSS style. + * + * @param name the CSS style name + * @return the table data CSS style for the given name + */ + public String getDataStyle(String name) { + if (hasDataStyles()) { + return getDataStyles().get(name); + + } else { + return null; + } + } + + /** + * Set the table data <td> CSS style name and value pair. + * + * @param name the CSS style name + * @param value the CSS style value + */ + public void setDataStyle(String name, String value) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + + if (value != null) { + getDataStyles().put(name, value); + } else { + getDataStyles().remove(name); + } + } + + /** + * Return true if table data <td> CSS styles are defined. + * + * @return true if table data <td> CSS styles are defined + */ + public boolean hasDataStyles() { + return (dataStyles != null && !dataStyles.isEmpty()); + } + + /** + * Return the Map of table data <td> CSS styles. + * + * @return the Map of table data <td> CSS styles + */ + public Map getDataStyles() { + if (dataStyles == null) { + dataStyles = new HashMap(); + } + return dataStyles; + } + + /** + * Return the row column <td> decorator. + * + * @return the row column <td> decorator + */ + public Decorator getDecorator() { + return decorator; + } + + /** + * Set the row column <td> decorator. + * + * @param decorator the row column <td> decorator + */ + public void setDecorator(Decorator decorator) { + this.decorator = decorator; + } + + /** + * Return true if the HTML characters will be escaped when rendering the + * column data. By default this method returns true. + * + * @return true if the HTML characters will be escaped when rendered + */ + public boolean getEscapeHtml() { + return escapeHtml; + } + + /** + * Set the escape HTML characters when rendering column data flag. + * + * @param escape the flag to escape HTML characters + */ + public void setEscapeHtml(boolean escape) { + this.escapeHtml = escape; + } + + /** + * Return the row column message format pattern. + * + * @return the message row column message format pattern + */ + public String getFormat() { + return format; + } + + /** + * Set the row column message format pattern. For example: + * + *

+     * Column idColumn = new Column("purchaseId", "ID");
+     * idColumn.setFormat("{0,number,#,###}");
+     *
+     * Column priceColumn = new Column("purchasePrice", "Price");
+     * priceColumn.setFormat("{0,number,currency}");
+     *
+     * Column dateColumn = new Column("purchaseDate", "Date");
+     * dateColumn.setFormat("{0,date,dd MMM yyyy}"); 
+ * + *

MesssageFormat Patterns

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Format Type + * Format Style + * Subformat Created + *
number + * (none) + * NumberFormat.getInstance(getLocale()) + *
integer + * NumberFormat.getIntegerInstance(getLocale()) + *
currency + * NumberFormat.getCurrencyInstance(getLocale()) + *
percent + * NumberFormat.getPercentInstance(getLocale()) + *
SubformatPattern + * new DecimalFormat(subformatPattern, new DecimalFormatSymbols(getLocale())) + *
date + * (none) + * DateFormat.getDateInstance(DateFormat.DEFAULT, getLocale()) + *
short + * DateFormat.getDateInstance(DateFormat.SHORT, getLocale()) + *
medium + * DateFormat.getDateInstance(DateFormat.DEFAULT, getLocale()) + *
long + * DateFormat.getDateInstance(DateFormat.LONG, getLocale()) + *
full + * DateFormat.getDateInstance(DateFormat.FULL, getLocale()) + *
SubformatPattern + * new SimpleDateFormat(subformatPattern, getLocale()) + *
time + * (none) + * DateFormat.getTimeInstance(DateFormat.DEFAULT, getLocale()) + *
short + * DateFormat.getTimeInstance(DateFormat.SHORT, getLocale()) + *
medium + * DateFormat.getTimeInstance(DateFormat.DEFAULT, getLocale()) + *
long + * DateFormat.getTimeInstance(DateFormat.LONG, getLocale()) + *
full + * DateFormat.getTimeInstance(DateFormat.FULL, getLocale()) + *
SubformatPattern + * new SimpleDateFormat(subformatPattern, getLocale()) + *
choice + * SubformatPattern + * new ChoiceFormat(subformatPattern) + *
+ * + *

DecimalFormat Pattern Characters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Symbol + * Location + * Localized? + * Meaning + *
0 + * Number + * Yes + * Digit + *
# + * Number + * Yes + * Digit, zero shows as absent + *
. + * Number + * Yes + * Decimal separator or monetary decimal separator + *
- + * Number + * Yes + * Minus sign + *
, + * Number + * Yes + * Grouping separator + *
E + * Number + * Yes + * Separates mantissa and exponent in scientific notation. + * Need not be quoted in prefix or suffix. + *
; + * Subpattern boundary + * Yes + * Separates positive and negative subpatterns + *
% + * Prefix or suffix + * Yes + * Multiply by 100 and show as percentage + *
\u2030 + * Prefix or suffix + * Yes + * Multiply by 1000 and show as per mille + *
¤ (\u00A4) + * Prefix or suffix + * No + * Currency sign, replaced by currency symbol. If + * doubled, replaced by international currency symbol. + * If present in a pattern, the monetary decimal separator + * is used instead of the decimal separator. + *
' + * Prefix or suffix + * No + * Used to quote special characters in a prefix or suffix, + * for example, "'#'#" formats 123 to + * "#123". To create a single quote + * itself, use two in a row: "# o''clock". + *
+ * + *

SimpleDateFormat Pattern Characters

+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Letter + * Date or Time Component + * Presentation + * Examples + *
G + * Era designator + * Text + * AD + *
y + * Year + * Year + * 1996; 96 + *
M + * Month in year + * Month + * July; Jul; 07 + *
w + * Week in year + * Number + * 27 + *
W + * Week in month + * Number + * 2 + *
D + * Day in year + * Number + * 189 + *
d + * Day in month + * Number + * 10 + *
F + * Day of week in month + * Number + * 2 + *
E + * Day in week + * Text + * Tuesday; Tue + *
a + * Am/pm marker + * Text + * PM + *
H + * Hour in day (0-23) + * Number + * 0 + *
k + * Hour in day (1-24) + * Number + * 24 + *
K + * Hour in am/pm (0-11) + * Number + * 0 + *
h + * Hour in am/pm (1-12) + * Number + * 12 + *
m + * Minute in hour + * Number + * 30 + *
s + * Second in minute + * Number + * 55 + *
S + * Millisecond + * Number + * 978 + *
z + * Time zone + * General time zone + * Pacific Standard Time; PST; GMT-08:00 + *
Z + * Time zone + * RFC 822 time zone + * -0800 + *
+ * + * @param pattern the message format pattern + */ + public void setFormat(String pattern) { + this.format = pattern; + } + + /** + * The maximum column length. If maxLength is greater than 0 and the column + * data string length is greater than maxLength, the rendered value will be + * truncated with an eclipse(...). + * + * @return the maximum column length, or 0 if not defined + */ + public int getMaxLength() { + return maxLength; + } + + /** + * Set the maximum column length. If maxLength is greater than 0 and the + * column data string length is greater than maxLength, the rendered value + * will be truncated with an eclipse(...). + * + * @param value the maximum column length + */ + public void setMaxLength(int value) { + maxLength = value; + } + + /** + * Return the MessageFormat instance used to format the table cell value. + * + * @return the MessageFormat instance used to format the table cell value + */ + public MessageFormat getMessageFormat() { + return messageFormat; + } + + /** + * Set the MessageFormat instance used to format the table cell value. + * + * @param messageFormat the MessageFormat used to format the table cell + * value + */ + public void setMessageFormat(MessageFormat messageFormat) { + this.messageFormat = messageFormat; + } + + /** + * Return the property name. + * + * @return the name of the property + */ + public String getName() { + return name; + } + + /** + * Set the property name. + * + * @param name the property name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * Return the table header <th> CSS class. + * + * @return the table header CSS class + */ + public String getHeaderClass() { + return headerClass; + } + + /** + * Set the table header <th> CSS class. + * + * @param headerClass the table header CSS class + */ + public void setHeaderClass(String headerClass) { + this.headerClass = headerClass; + } + + /** + * Return the table header <th> CSS style. + * + * @param name the CSS style name + * @return the table header CSS style value for the given name + */ + public String getHeaderStyle(String name) { + if (hasHeaderStyles()) { + return getHeaderStyles().get(name); + + } else { + return null; + } + } + + /** + * Set the table header <th> CSS style name and value pair. + * + * @param name the CSS style name + * @param value the CSS style value + */ + public void setHeaderStyle(String name, String value) { + if (name == null) { + throw new IllegalArgumentException("Null name parameter"); + } + + if (value != null) { + getHeaderStyles().put(name, value); + } else { + getHeaderStyles().remove(name); + } + } + + /** + * Return true if table header <th> CSS styles are defined. + * + * @return true if table header <th> CSS styles are defined + */ + public boolean hasHeaderStyles() { + return (headerStyles != null && !headerStyles.isEmpty()); + } + + /** + * Return the Map of table header <th> CSS styles. + * + * @return the Map of table header <th> CSS styles + */ + public Map getHeaderStyles() { + if (headerStyles == null) { + headerStyles = new HashMap(); + } + return headerStyles; + } + + /** + * Return the table header <th> title. + *

+ * If the header title value is null, this method will attempt to find a + * localized message in the parent messages using the key: + *

+ * getName() + ".headerTitle" + *
+ * If not found then the message will be looked up in the + * /click-control.properties file using the same key. + * If a value still cannot be found then the Column name will be converted + * into a header title using the method: {@link ClickUtils#toLabel(String)} + *

+ * + * @return the table header title + */ + public String getHeaderTitle() { + if (headerTitle == null) { + headerTitle = getTable().getMessage(getName() + ".headerTitle"); + } + if (headerTitle == null) { + headerTitle = ClickUtils.toLabel(getName()); + } + return headerTitle; + } + + /** + * Set the table header <th> title. + * + * @param title the table header title + */ + public void setHeaderTitle(String title) { + headerTitle = title; + } + + /** + * Return the Table and Column id appended:   "table-column" + *

+ * Use the field the "id" attribute value if defined, or the name otherwise. + * + * @return HTML element identifier attribute "id" value + */ + public String getId() { + if (hasAttributes() && getAttributes().containsKey("id")) { + return getAttribute("id"); + + } else { + String tableId = (getTable() != null) + ? getTable().getId() + "-" : ""; + + String id = tableId + getName(); + + if (id.indexOf('/') != -1) { + id = id.replace('/', '_'); + } + if (id.indexOf(' ') != -1) { + id = id.replace(' ', '_'); + } + + return id; + } + } + + /** + * Return the column sortable status. If the column sortable status is not + * defined the value will be inherited from the + * {@link org.openidentityplatform.openam.click.control.Table#sortable} property. + * + * @return the column sortable status + */ + public boolean getSortable() { + if (sortable == null) { + if (getTable() != null) { + return getTable().getSortable(); + } else { + return false; + } + + } else { + return sortable; + } + } + + /** + * Set the column render id attribute status. + * + * @param value set the column render id attribute status + */ + public void setRenderId(boolean value) { + renderId = value; + } + + /** + * Returns the column render id attribute status. If the column render id + * status is not defined the value will be inherited from the + * {@link org.openidentityplatform.openam.click.control.Table#renderId} property. + * + * @return the column render id attribute status + */ + public boolean getRenderId() { + if (renderId == null) { + if (getTable() != null) { + return getTable().getRenderId(); + } else { + return false; + } + + } else { + return renderId; + } + } + + /** + * Set the column sortable status. + * + * @param value the column sortable status + */ + public void setSortable(boolean value) { + sortable = value; + } + + /** + * Return the parent Table containing the Column. + * + * @return the parent Table containing the Column + */ + public Table getTable() { + return table; + } + + /** + * Set the Column's the parent Table. + * + * @param table Column's parent Table + */ + public void setTable(Table table) { + this.table = table; + } + + /** + * Set the column CSS "text-align" style for the header <th> and + * data <td> elements. Valid values include: + * [left, right, center] + * + * @param align the CSS "text-align" value: [left, right, center] + */ + public void setTextAlign(String align) { + if (align != null && "middle".equalsIgnoreCase(align)) { + String msg = + "\"middle\" is not a valid CSS \"text-align\" " + + "value, use \"center\" instead"; + throw new IllegalArgumentException(msg); + } + if (!getSortable()) { + setHeaderStyle("text-align", align); + } + setDataStyle("text-align", align); + } + + /** + * Return the property name used to populate the <td> "title" attribute. + * + * @return the property name used to populate the <td> "title" attribute + */ + public String getTitleProperty() { + return titleProperty; + } + + /** + * Set the property name used to populate the <td> "title" attribute. + * + * @param property the property name used to populate the <td> "title" attribute + */ + public void setTitleProperty(String property) { + titleProperty = property; + } + + /** + * Set the column CSS "vertical-align" style for the header <th> and + * data <td> elements. Valid values include: + * [baseline | sub | super | top | text-top | middle | bottom | + * text-bottom | <percentage> | <length> | inherit] + * + * @param align the CSS "vertical-align" value + */ + public void setVerticalAlign(String align) { + if (align != null && "center".equalsIgnoreCase(align)) { + String msg = + "\"center\" is not a valid CSS \"vertical-align\" " + + "value, use \"middle\" instead"; + throw new IllegalArgumentException(msg); + } + setHeaderStyle("vertical-align", align); + setDataStyle("vertical-align", align); + } + + /** + * Return the column HTML <td> width attribute. + * + * @return the column HTML <td> width attribute + */ + public String getWidth() { + return width; + } + + /** + * Set the column HTML <td> width attribute. + * + * @param value the column HTML <td> width attribute + */ + public void setWidth(String value) { + width = value; + } + + // --------------------------------------------------------- Public Methods + + /** + * Render the column table data <td> element to the given buffer using + * the passed row object. + * + * @param row the row object to render + * @param buffer the string buffer to render to + * @param context the request context + * @param rowIndex the index of the current row within the parent table + */ + public void renderTableData(Object row, HtmlStringBuffer buffer, + Context context, int rowIndex) { + + if (getMessageFormat() == null && getFormat() != null) { + Locale locale = context.getLocale(); + setMessageFormat(new MessageFormat(getFormat(), locale)); + } + + buffer.elementStart("td"); + if (getRenderId()) { + String id = getId(); + buffer.append(" id=\"").append(id).append("_").append(rowIndex).append("\""); + } + buffer.appendAttribute("class", getDataClass()); + + if (getTitleProperty() != null) { + Object titleValue = getProperty(getTitleProperty(), row); + buffer.appendAttributeEscaped("title", titleValue); + } + if (hasAttributes()) { + buffer.appendAttributes(getAttributes()); + } + if (hasDataStyles()) { + buffer.appendStyleAttributes(getDataStyles()); + } + buffer.appendAttribute("width", getWidth()); + buffer.closeTag(); + + renderTableDataContent(row, buffer, context, rowIndex); + + buffer.elementEnd("td"); + } + + /** + * Render the column table header <tr> element to the given buffer. + * + * @param buffer the string buffer to render to + * @param context the request context + */ + public void renderTableHeader(HtmlStringBuffer buffer, Context context) { + buffer.elementStart("th"); + + boolean isSortable = getSortable() && !getTable().getRowList().isEmpty(); + boolean sortedColumn = getName().equals(getTable().getSortedColumn()); + boolean ascending = getTable().isSortedAscending(); + + if (isSortable) { + String classValue = + (getHeaderClass() != null) ? getHeaderClass() + " " : ""; + + if (sortedColumn) { + classValue += (ascending) ? "ascending" : "descending"; + } else { + classValue += "sortable"; + } + buffer.appendAttribute("class", classValue); + + } else { + buffer.appendAttribute("class", getHeaderClass()); + } + + if (hasHeaderStyles()) { + buffer.appendStyleAttributes(getHeaderStyles()); + } + + if (hasAttributes()) { + buffer.appendAttributes(getAttributes()); + } + + buffer.closeTag(); + + if (isSortable) { + ActionLink controlLink = getTable().getControlLink(); + + controlLink.setParameter(org.apache.click.control.Table.COLUMN, getName()); + controlLink.setParameter(org.apache.click.control.Table.PAGE, String.valueOf(getTable().getPageNumber())); + + if (sortedColumn) { + controlLink.setParameter(org.apache.click.control.Table.ASCENDING, String.valueOf(ascending)); + controlLink.setParameter(org.apache.click.control.Table.SORT, "true"); + + } else { + controlLink.setParameter(org.apache.click.control.Table.ASCENDING, null); + controlLink.setParameter(org.apache.click.control.Table.SORT, null); + } + + // Provide spacer for sorting icon + controlLink.setLabel(getHeaderTitle() + "   "); + + controlLink.render(buffer); + + } else { + if (getEscapeHtml()) { + buffer.appendEscaped(getHeaderTitle()); + } else { + buffer.append(getHeaderTitle()); + } + } + + buffer.elementEnd("th"); + } + + /** + * Return the column name property value from the given row object. + *

+ * If the row object is a Map this method will attempt to return + * the map value for the column name. The row map lookup will be performed + * using the property name, if a value is not found the property name in + * uppercase will be used, if a value is still not found the property name + * in lowercase will be used. If a map value is still not found then this + * method will return null. + *

+ * Object property values can also be specified using a path expression. + * + * @param row the row object to obtain the property from + * @return the named row object property value + * @throws RuntimeException if an error occurred obtaining the property + */ + public Object getProperty(Object row) { + return getProperty(getName(), row); + } + + /** + * Return the column property value from the given row object and property name. + *

+ * If the row object is a Map this method will attempt to return + * the map value for the column. The row map lookup will be performed using + * the property name, if a value is not found the property name in uppercase + * will be used, if a value is still not found the property name in lowercase + * will be used. If a map value is still not found then this method will + * return null. + *

+ * Object property values can also be specified using a path expression. + * + * @param name the name of the property + * @param row the row object to obtain the property from + * @return the named row object property value + * @throws RuntimeException if an error occurred obtaining the property + */ + @SuppressWarnings("unchecked") + public Object getProperty(String name, Object row) { + if (row instanceof Map) { + Map map = (Map) row; + + Object object = map.get(name); + if (object != null) { + return object; + } + + String upperCaseName = name.toUpperCase(); + object = map.get(upperCaseName); + if (object != null) { + return object; + } + + String lowerCaseName = name.toLowerCase(); + object = map.get(lowerCaseName); + if (object != null) { + return object; + } + + return null; + + } else { + if (methodCache == null) { + methodCache = new HashMap(); + } + + return PropertyUtils.getValue(row, name, methodCache); + } + } + + // ------------------------------------------------------ Protected Methods + + /** + * Render the content within the column table data <td> element. + * + * @param row the row object to render + * @param buffer the string buffer to render to + * @param context the request context + * @param rowIndex the index of the current row within the parent table + */ + protected void renderTableDataContent(Object row, HtmlStringBuffer buffer, + Context context, int rowIndex) { + + if (getDecorator() != null) { + String value = getDecorator().render(row, context); + if (value != null) { + buffer.append(value); + } + + } else { + Object columnValue = getProperty(row); + if (columnValue != null) { + if (getAutolink() && renderLink(columnValue, buffer)) { + // Has been rendered + + } else if (getMessageFormat() != null) { + Object[] args = new Object[] { columnValue }; + + String value = getMessageFormat().format(args); + + if (getMaxLength() > 0) { + value = ClickUtils.limitLength(value, getMaxLength()); + } + + if (getEscapeHtml()) { + buffer.appendEscaped(value); + } else { + buffer.append(value); + } + + } else { + String value = columnValue.toString(); + + if (getMaxLength() > 0) { + value = ClickUtils.limitLength(value, getMaxLength()); + } + + if (getEscapeHtml()) { + buffer.appendEscaped(value); + } else { + buffer.append(value); + } + } + } + } + } + + /** + * Render the given table cell value to the buffer as a mailto: + * or http: hyperlink, or as an ordinary string if the value is + * determined not be linkable. + * + * @param value the table cell value to render + * @param buffer the StringBuffer to render to + * @return a rendered email or web hyperlink if applicable + */ + protected boolean renderLink(Object value, HtmlStringBuffer buffer) { + if (value != null) { + String valueStr = value.toString(); + + // If email + if (valueStr.indexOf('@') != -1 + && !valueStr.startsWith("@") + && !valueStr.endsWith("@")) { + + buffer.append(""); + buffer.append(valueStr); + buffer.append(""); + return true; + + } else if (valueStr.startsWith("http")) { + int index = valueStr.indexOf("//"); + if (index != -1) { + index += 2; + } else { + index = 0; + } + buffer.append(""); + buffer.append(valueStr.substring(index)); + buffer.append(""); + return true; + + } else if (valueStr.startsWith("www")) { + buffer.append(""); + buffer.append(valueStr); + buffer.append(""); + return true; + } + } + return false; + } + + // ---------------------------------------------------------- Inner Classes + + /** + * Provides a table Column comparator for sorting table rows. + * + * @see Column + * @see Table + */ + @SuppressWarnings("unchecked") + static class ColumnComparator implements Comparator, Serializable { + + private static final long serialVersionUID = 1L; + + /** The sort ascending flag. */ + protected int ascendingSort; + + /** The column to sort on. */ + protected final Column column; + + /** + * Create a new Column based row comparator. + * + * @param column the column to sort on + */ + public ColumnComparator(Column column) { + this.column = column; + } + + /** + * @see Comparator#compare(Object, Object) + * + * @param row1 the first row to compare + * @param row2 the second row to compare + * @return the comparison result + */ + public int compare(Object row1, Object row2) { + + this.ascendingSort = column.getTable().isSortedAscending() ? 1 : -1; + + Object value1 = column.getProperty(row1); + Object value2 = column.getProperty(row2); + + if (value1 instanceof Comparable && value2 instanceof Comparable) { + + if (value1 instanceof String || value2 instanceof String) { + return stringCompare(value1, value2) * ascendingSort; + + } else { + + return ((Comparable) value1).compareTo(value2) * ascendingSort; + } + + } else if (value1 != null && value2 != null) { + + return value1.toString().compareToIgnoreCase(value2.toString()) + * ascendingSort; + + } else if (value1 != null && value2 == null) { + + return +1 * ascendingSort; + + } else if (value1 == null && value2 != null) { + + return -1 * ascendingSort; + + } else { + return 0; + } + } + + // ------------------------------------------------------ Protected Methods + + /** + * Perform a comparison on the given string values. + * + * @param value1 the first value to compare + * @param value2 the second value to compare + * @return the string comparison result + */ + protected int stringCompare(Object value1, Object value2) { + String string1 = value1.toString().trim(); + String string2 = value2.toString().trim(); + + StringTokenizer st1 = new StringTokenizer(string1); + StringTokenizer st2 = new StringTokenizer(string2); + + String token1 = null; + String token2 = null; + + while (st1.hasMoreTokens()) { + token1 = st1.nextToken(); + + if (st2.hasMoreTokens()) { + token2 = st2.nextToken(); + + int comp = 0; + + if (useNumericSort(token1, token2)) { + comp = numericCompare(token1, token2); + + } else { + comp = token1.compareToIgnoreCase(token2); + } + + if (comp != 0) { + return comp; + } + + } else { + return -1; + } + } + + return 0; + } + + /** + * Return true if a numeric sort should be used. + * + * @param value1 the first value to test + * @param value2 the second value to test + * @return true if a numeric sort should be used + */ + protected boolean useNumericSort(String value1, String value2) { + return NumberUtils.isDigits(value1) && NumberUtils.isDigits(value2); + } + + /** + * Perform a numeric compare on the given string values. + * + * @param string1 the first string value to compare + * @param string2 the second string value to compare + * @return the numeric comparison result + */ + protected int numericCompare(String string1, String string2) { + if (string1.length() > 0 && string2.length() > 0) { + Double double1 = Double.valueOf(string1); + Double double2 = Double.valueOf(string2); + + return double1.compareTo(double2); + + } else if (string1.length() > 0) { + return 1; + + } else if (string2.length() > 0) { + return -1; + + } else { + return 0; + } + } + + } + +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Container.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Container.java new file mode 100644 index 0000000000..c960e6239f --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Container.java @@ -0,0 +1,114 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.openidentityplatform.openam.click.control; + +import java.util.List; +import org.openidentityplatform.openam.click.Control; +import org.apache.click.control.AbstractContainer; + +/** + * Provides the interface for a container which holds a list of child controls. + *

+ * Container extends {@link org.apache.click.Control} and enables the creation of + * nested controls. + *

+ * Container allows one to add, remove and retrieve child controls. + *

+ * Please note {@link AbstractContainer} provides + * a default implementation of the Container interface to make it easier for + * developers to create their own containers. + * + * @see org.apache.click.util.ContainerUtils + */ +public interface Container extends Control { + + /** + * Add the control to the container and return the added instance. + * + * @param control the control to add to the container and return + * @return the control that was added to the container + */ + Control add(Control control); + + /** + * Add the control to the container at the specified index, and return the + * added instance. + * + * @param control the control to add to the container and return + * @param index the index at which the control is to be inserted + * @return the control that was added to the container + * @throws IndexOutOfBoundsException if the index is out of range + * (index < 0 || index > getControls().size()). + */ + Control insert(Control control, int index); + + /** + * Replace the current control with the new control, and return the newly + * added control. + * + * @deprecated this method was used for stateful pages, which have been deprecated + * + * @param currentControl the control currently contained in the container + * @param newControl the control to replace the current control contained in + * the container + * @return the new control that replaced the current control + */ + Control replace(Control currentControl, Control newControl); + + /** + * Remove the given control from the container, returning true if the + * control was found in the container and removed, or false if the control + * was not found. + * + * @param control the control to remove from the container + * @return true if the control was removed from the container + */ + boolean remove(Control control); + + /** + * Return the sequential list of controls held by the container. + * + * @return the sequential list of controls held by the container + */ + List getControls(); + + /** + * Return the named control from the container if found or null otherwise. + * + * @param controlName the name of the control to get from the container + * @return the named control from the container if found or null otherwise + */ + Control getControl(String controlName); + + /** + * Return true if the container contains the specified control. + * + * @param control the control whose presence in this container is to be tested + * @return true if the container contains the specified control + */ + boolean contains(Control control); + + /** + * Returns true if this container has existing controls, false otherwise. + * + * @return true if the container has existing controls, false otherwise. + */ + public boolean hasControls(); +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Decorator.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Decorator.java new file mode 100644 index 0000000000..275aa8ca16 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Decorator.java @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click.control; + +import org.openidentityplatform.openam.click.Context; + +/** + * Provides a decorator interface for delegating object rendering. + * + *

Decorator Example

+ * + * The following example illustrates how to render a email hyperlink in a + * email table column. + * + *
+ * Column column = new Column("email");
+ *
+ * column.setDecorator(new Decorator() {
+ *     public String render(Object row, Context context) {
+ *         Customer customer = (Customer) row;
+ *         String email = customer.getEmail();
+ *         String fullName = customer.getFullName();
+ *         return "<a href='mailto:" + email + "'>" + fullName + "</a>";
+ *     }
+ * });
+ *
+ * table.addColumn(column); 
+ * + * @see Column + * @see Table + */ +public interface Decorator { + + /** + * Returns a decorated string representation of the given object. + * + * @param object the object to render + * @param context the request context + * @return a decorated string representation of the given object + */ + public String render(Object object, Context context); +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Field.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Field.java new file mode 100644 index 0000000000..400beee427 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Field.java @@ -0,0 +1,1288 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.openidentityplatform.openam.click.control; + +import org.apache.click.Stateful; +import org.apache.click.control.Checkbox; +import org.apache.click.control.FieldSet; +import org.apache.commons.lang.StringUtils; +import org.openidentityplatform.openam.click.Context; +import org.openidentityplatform.openam.click.Control; +import org.openidentityplatform.openam.click.Page; +import org.openidentityplatform.openam.click.util.ClickUtils; +import org.openidentityplatform.openam.click.util.ContainerUtils; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; + +/** + * Provides an abstract form Field control. Field controls are contained by + * the {@link Form} control which will orchestrate the processing and + * rendering of the contained fields. All Form field controls must extend this + * abstract class. + * + *

Field Processing

+ * + *

Post Requests

+ * + * When processing POST requests forms typically invoke the {@link #onProcess()} + * method on all its fields. The Field onProcess() method is used + * to bind the fields request value, validate the submission and invoke any + * control listener method. If the onProcess() method returns true + * the form will continue processing fields, otherwise the form will abort + * further processing. + *

+ * The body of the Field onProcess() method is detailed below. + * + *

+ * public boolean onProcess() {
+ *     bindRequestValue();
+ *
+ *     if (getValidate()) {
+ *         validate();
+ *     }
+ *
+ *     registerActionEvent();
+ *
+ *     return true;
+ * } 
+ * + * The Field methods called by onProcess() include: + * + *
+ *
{@link #bindRequestValue()}
+ *
This method will bind the HTTP request value to the Field's value. + *
+ *
{@link #getValidate()}
+ *
This method will return true if the Field should validate itself. This + * value is generally inherited from the parent Form, however the Field can + * override this value and specify whether it should be validated. + *
+ *
{@link #validate()}
+ *
This method will validate the submitted Field value. If the submitted + * value is not valid this method should set the Field {@link #error} property, + * which can be rendered by the Form. + *
+ *
{@link #dispatchActionEvent()}
+ *
This method will register any Control action listener method which has be + * defined for the Field. + *
+ *
+ * + * Field subclasses generally only have to override the validate() + * method, and possibly the bindRequestValue() method, to provide their + * own behaviour. + * + *

Get Requests

+ * + * When processing GET requests a Page's Form will typically perform no + * processing and simply render itself and its Fields. + * + *

Rendering

+ * + * Field subclasses must override the {@link #render(org.openidentityplatform.openam.click.util.HtmlStringBuffer)} + * method to enable themselves to be rendered as HTML. With the increasing use of + * AJAX, Fields should render themselves as valid XHTML, so that they may be parsed + * correctly and used as the innerHtml in the DOM. + *

+ * When a Form object renders a Field using autolayout, it renders the + * Field in a table row using the Field's {@link #label} attribute, its + * {@link #error} attribute if defined, and the Fields + * {@link #render(org.openidentityplatform.openam.click.util.HtmlStringBuffer)} method. + *

+ * To assist with rendering valid HTML Field subclasses can use the + * {@link org.apache.click.util.HtmlStringBuffer} class. + * + *

Message Resources and Internationalization (i18n)

+ * + * Fields support a hierarchy of resource bundles for displaying validation + * error messages and display messages. These localized messages can be accessed + * through the methods: + * + *
    + *
  • {@link #getMessage(String)}
  • + *
  • {@link #getMessage(String, Object...)}
  • + *
  • {@link #getMessages()}
  • + *
  • {@link #setErrorMessage(String)}
  • + *
  • {@link #setErrorMessage(String, Object)}
  • + *
+ * + * Fields automatically pick up localized messages where applicable. Please see + * the following methods on how to customize these messages: + *
    + *
  • {@link #getLabel()}
  • + *
  • {@link #getTitle()}
  • + *
  • {@link #getHelp()}
  • + *
  • {@link #setErrorMessage(String)}
  • + *
  • {@link #setErrorMessage(String, Object)}
  • + *
+ * + * + * The order in which localized messages resolve are: + *
+ *
Page scope messages
+ *
Message lookups are first resolved to the Pages message bundle if it + * exists. For example a Login page may define the message properties: + * + *
+ * /com/mycorp/page/Login.properties 
+ * + * If you want messages to be used only for a specific Page, this is where + * to place them. + *
+ * + *
Global page scope messages
+ *
Next message lookups are resolved to the global pages message bundle if it + * exists. + * + *
+ * /click-page.properties 
+ * + * If you want messages to be used across your entire application this is where + * to place them. + *
+ * + *
Control scope messages
+ *
Next message lookups are resolved to the Control message bundle if it + * exists. For example a CustomTextField control may define the + * message properties: + * + *
+ * /com/mycorp/control/CustomTextField.properties 
+ *
+ * + *
Global control scope messages
+ *
Finally message lookups are resolved to the global application control + * message bundle if the message has not already found. The global control + * properties file is: + * + *
+ * /click-control.properties 
+ * + * You can modify these properties by copying this file into your applications + * root class path and editing these properties. + *

+ * Note when customizing the message properties you must include all the + * properties, not just the ones you want to override. + *

+ *
+ */ +public abstract class Field extends AbstractControl implements Stateful { + + // Constants -------------------------------------------------------------- + + private static final long serialVersionUID = 1L; + + // Instance Variables ----------------------------------------------------- + + /** The Field disabled value. */ + protected boolean disabled; + + /** The Field error message. */ + protected String error; + + /** The request focus flag. */ + protected boolean focus; + + /** The parent Form. */ + protected Form form; + + /** The Field help text. */ + protected String help; + + /** The Field label. */ + protected String label; + + /** The field label "style" attribute value. */ + protected String labelStyle; + + /** The field label "class" attribute value. */ + protected String labelStyleClass; + + /** The field's parent element "style" attribute hint. */ + protected String parentStyleHint; + + /** The field's parent element "class" attribute hint. */ + protected String parentStyleClassHint; + + /** The Field is readonly flag. */ + protected boolean readonly; + + /** The Field is required flag. */ + protected boolean required; + + /** The Field 'tabindex' attribute. */ + protected int tabindex; + + /** The Field 'title' attribute, which acts as a tooltip help message. */ + protected String title; + + /** The Field is trimmed flag, default value is true. */ + protected boolean trim = true; + + /** + * The validate Field value onProcess() invocation flag. + */ + protected Boolean validate; + + /** The Field value. */ + protected String value; + + // Constructors ----------------------------------------------------------- + + /** + * Construct a new Field object. + */ + public Field() { + } + + /** + * Construct the Field with the given name. + * + * @param name the name of the Field + */ + public Field(String name) { + setName(name); + } + + /** + * Construct the Field with the given name and label. + * + * @param name the name of the Field + * @param label the label of the Field + */ + public Field(String name, String label) { + setName(name); + setLabel(label); + } + + // Public Attributes ------------------------------------------------------ + + /** + * Set the parent of the Field. + * + * @see org.apache.click.Control#setParent(Object) + * + * @param parent the parent of the Control + * @throws IllegalStateException if {@link #name} is not defined + * @throws IllegalArgumentException if the given parent instance is + * referencing this object: if (parent == this) + */ + @Override + public void setParent(Object parent) { + if (parent == this) { + throw new IllegalArgumentException("Cannot set parent to itself"); + } + // Guard against fields without names, as fields would throw + // exceptions when binding to request value. + if (StringUtils.isBlank(getName())) { + String msg = "Field name not defined: " + getClass().getName(); + throw new IllegalArgumentException(msg); + } + this.parent = parent; + } + + /** + * Return true if the Field is disabled. The Field will also be disabled + * if the parent FieldSet or Form is disabled. + * + * @see #setDisabled(boolean) + * + * @return true if the Field is disabled + */ + public boolean isDisabled() { + Control control = this; + + // Check parents for instances of either FieldSet or Form + while (control.getParent() != null && !(control.getParent() instanceof Page)) { + control = (Control) control.getParent(); + if (control instanceof FieldSet) { + FieldSet fieldSet = (FieldSet) control; + if (fieldSet.isDisabled()) { + return true; + } else { + return disabled; + } + } else if (control instanceof Form) { + Form localForm = (Form) control; + if (localForm.isDisabled()) { + return true; + } else { + return disabled; + } + } + } + return disabled; + } + + /** + * Set the Field disabled flag. Disabled fields are not processed nor + * validated and their action event is not fired. + *

+ * Important Note: an HTML form POST does not submit disabled fields + * values. Similarly disabled Click fields do not get processed or validated. + * However, JavaScript is often used to enable fields prior to + * submission. Click is smart enough to recognize when a field was enabled + * this way by checking if the field has an incoming request parameter. + * If a field is disabled but has an incoming request parameter, Click will + * "enable" the field and process it. + *

+ * Caveat: Unfortunately the above behavior does not apply to + * {@link Checkbox} and {@link Radio} buttons. An HTML form POST for a + * disabled checkbox/radio is the same as for an unchecked + * checkbox/radio. In neither case is a value submitted to the server and + * Click cannot make the distinction whether the checkbox/radio is disabled + * or unchecked. + * + * @param disabled the Field disabled flag + */ + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + + /** + * Return the validation error message if the Field is not valid, or null + * if valid. + * + * @return the Field validation error message, or null if valid + */ + public String getError() { + return error; + } + + /** + * Set the Field validation error message. If the error message is not null + * the Field is invalid, otherwise it is valid. + * + * @param error the validation error message + */ + public void setError(String error) { + this.error = error; + } + + /** + * Return true if the field has requested focus. + * + * @return true if the field has requested focus + */ + public boolean getFocus() { + return focus; + } + + /** + * Set the Field request focus flag. + * + * @param focus the request focus flag + */ + public void setFocus(boolean focus) { + this.focus = focus; + } + + /** + * Return the Field focus JavaScript. + * + * @return the Field focus JavaScript + */ + public String getFocusJavaScript() { + HtmlStringBuffer buffer = new HtmlStringBuffer(32); + + buffer.append("setFocus('"); + buffer.append(getId()); + buffer.append("');"); + + return buffer.toString(); + } + + /** + * Return the parent Form containing the Field or null if no form is present + * in the parent hierarchy. + * + * @return the parent Form containing the Field + */ + public Form getForm() { + if (form == null) { + // Find form in parent hierarchy + form = ContainerUtils.findForm(this); + } + return form; + } + + /** + * Set the Field's the parent Form. + * + * @param form Field's parent Form + */ + public void setForm(Form form) { + this.form = form; + } + + /** + * Return the field help text. + *

+ * If the help value is null, this method will attempt to find a + * localized help message in the parent messages using the key: + *

+ * getName() + ".help" + *
+ * If not found then the message will be looked up in the + * /click-control.properties file using the same key. + *

+ * For example given a CustomerPage with the properties file + * CustomerPage.properties: + * + *

+     * name.label=Customer Name
+     * name.help=Full name or Business name 
+ * + * The page TextField code: + *
+     * public class CustomerPage extends Page {
+     *     TextField nameField = new TextField("name");
+     *     ..
+     * } 
+ * + * Will render the TextField label and title properties as: + *
+     * <td><label>Customer Name</label></td>
+     * <td><input type="text" name="name"/> <span="Full name or Business name"/>/td> 
+ * + * How the help text is rendered is depends upon the Field subclass. + * + * @return the help text of the Field + */ + public String getHelp() { + if (help == null) { + help = getMessage(getName() + ".help"); + + if (help != null) { + if (help.indexOf("$context") != -1) { + help = StringUtils.replace(help, "$context", getContext().getRequest().getContextPath()); + + } else if (help.indexOf("${context}") != -1) { + help = StringUtils.replace(help, "${context}", getContext().getRequest().getContextPath()); + } + } + } + return help; + } + + /** + * Set the Field help text. + * + * @param help the help text of the Field + */ + public void setHelp(String help) { + this.help = help; + } + + /** + * Return true if the Field type is hidden (<input type="hidden"/>) or + * false otherwise. By default this method returns false. + * + * @return false + */ + public boolean isHidden() { + return false; + } + + /** + * Return the Form and Field id appended:   "form-field" + *

+ * Use the field the "id" attribute value if defined, or the name otherwise. + * + * @see org.apache.click.Control#getId() + * + * @return HTML element identifier attribute "id" value + */ + @Override + public String getId() { + if (hasAttributes() && getAttributes().containsKey("id")) { + return getAttribute("id"); + + } else { + String fieldName = getName(); + + if (fieldName == null) { + // If fieldName is null, exit early + return null; + } + + Form parentForm = getForm(); + String formId = (parentForm != null) ? parentForm.getId() + "_" : ""; + String id = formId + fieldName; + + if (id.indexOf('/') != -1) { + id = id.replace('/', '_'); + } + if (id.indexOf(' ') != -1) { + id = id.replace(' ', '_'); + } + if (id.indexOf('<') != -1) { + id = id.replace('<', '_'); + } + if (id.indexOf('>') != -1) { + id = id.replace('>', '_'); + } + if (id.indexOf('.') != -1) { + id = id.replace('.', '_'); + } + + return id; + } + } + + /** + * Return the field display label. + *

+ * If the label value is null, this method will attempt to find a + * localized label message in the parent messages using the key: + *

+ * getName() + ".label" + *
+ * If not found then the message will be looked up in the + * /click-control.properties file using the same key. + * If a value is still not found, the Field name will be converted + * into a label using the method: {@link ClickUtils#toLabel(String)} + *

+ * For example given a CustomerPage with the properties file + * CustomerPage.properties: + * + *

+     * name.label=Customer Name
+     * name.title=Full name or Business name 
+ * + * The page TextField code: + *
+     * public class CustomerPage extends Page {
+     *     TextField nameField = new TextField("name");
+     *     ..
+     * } 
+ * + * Will render the TextField label and title properties as: + *
+     * <td><label>Customer Name</label></td>
+     * <td><input type="text" name="name" title="Full name or Business name"/></td> 
+ * + * When a label value is not set, or defined in any properties files, then + * its value will be created from the Fields name. + *

+ * For example given the TextField code: + * + *

+     * TextField nameField = new TextField("faxNumber");  
+ * + * Will render the TextField label as: + *
+     * <td><label>Fax Number</label></td>
+     * <td><input type="text" name="faxNumber"/></td> 
+ * + * @return the display label of the Field + */ + public String getLabel() { + if (label == null) { + label = getMessage(getName() + ".label"); + } + if (label == null) { + label = ClickUtils.toLabel(getName()); + } + return label; + } + + /** + * Set the Field display caption. + * + * @param label the display label of the Field + */ + public void setLabel(String label) { + this.label = label; + } + + /** + * Return the field label "style" attribute value. + * + * @see #setLabelStyle(java.lang.String) + * + * @return the field label "style" attribute value + */ + public String getLabelStyle() { + return labelStyle; + } + + /** + * Set the field label "style" attribute value. + *

+ * Please note: the label is rendered by the containing Form + * or container, not the field itself. It is up to the parent Form + * (or container) on how to apply the label style. + *

+ *

+     * nameField.setLabelStyle("color: green; font-weight: bold");
+ * + * @param value the field label "style" attribute value + */ + public void setLabelStyle(String value) { + this.labelStyle = value; + } + + /** + * Return the field label "class" attribute value. + * + * @see #setLabelStyleClass(java.lang.String) + * + * @return the field label "class" attribute value + */ + public String getLabelStyleClass() { + return labelStyleClass; + } + + /** + * Set the field label "class" attribute value. + *

+ * Please note: the label is rendered by the containing Form + * or container, not the field itself. It is up to the parent Form + * (or container) on how to apply the label style class. + * + * @param value the field label "class" attribute value + */ + public void setLabelStyleClass(String value) { + this.labelStyleClass = value; + } + + /** + * Return the field's parent "style" attribute hint. + * + * @see #setParentStyleHint(java.lang.String) + * + * @return the field's parent "style" attribute hint + */ + public String getParentStyleHint() { + return parentStyleHint; + } + + /** + * Set the field's parent "style" attribute hint. + *

+ *

+     * nameField.setParentStyleHint("margin-bottom; 10px");
+ * + * Please note:The field's parent style provides a hint to Forms + * (or other containers) what style to render, but it is up to the + * Form (or container) implementation how the style will be applied. + * For example, Form will render the parent style on the table cells + * containing the field and label. + * + * @param styleHint the field's parent "style" attribute hint + */ + public void setParentStyleHint(String styleHint) { + this.parentStyleHint = styleHint; + } + + /** + * Return the field's parent "class" attribute hint. + * + * @see #setParentStyleClassHint(java.lang.String) + * + * @return the field's parent "class" attribute hint + */ + public String getParentStyleClassHint() { + return parentStyleClassHint; + } + + /** + * Set the field's parent "class" attribute hint. + *

+ * Please note:The parent style class provides a hint to Forms + * (or other containers) which CSS class to render, but it is up to the + * Form (or container) implementation how the style class will be applied. + * For example, Form will render the parent style class on the table cells + * containing the field and label. + * + * @param styleClassHint the field parent "class" attribute hint + */ + public void setParentStyleClassHint(String styleClassHint) { + this.parentStyleClassHint = styleClassHint; + } + + /** + * The callback listener will only be called during processing if the Field + * value is valid. If the field has validation errors the listener will not + * be called. + * + * @see org.apache.click.Control#getName() + * + * @param listener the listener object with the named method to invoke + * @param method the name of the method to invoke + */ + @Override + public void setListener(Object listener, String method) { + super.setListener(listener, method); + } + + /** + * Return true if the Field is a readonly. The Field will also be readonly + * if the parent FieldSet or Form is readonly. + * + * @return true if the Field is a readonly + */ + public boolean isReadonly() { + Control control = this; + + // Check parents for instances of either FieldSet or Form + while (control.getParent() != null && !(control.getParent() instanceof Page)) { + control = (Control) control.getParent(); + if (control instanceof FieldSet) { + FieldSet fieldSet = (FieldSet) control; + if (fieldSet.isReadonly()) { + return true; + } else { + return readonly; + } + } else if (control instanceof Form) { + Form localForm = (Form) control; + if (localForm.isReadonly()) { + return true; + } else { + return readonly; + } + } + } + return readonly; + } + + /** + * Set the Field readonly flag. + * + * @param readonly the Field readonly flag + */ + public void setReadonly(boolean readonly) { + this.readonly = readonly; + } + + /** + * Return true if the Field's value is required. + * + * @return true if the Field's value is required + */ + public boolean isRequired() { + return required; + } + + /** + * Set the Field required status. + * + * @param required set the Field required status + */ + public void setRequired(boolean required) { + this.required = required; + } + + /** + * Return the field "tabindex" attribute value. + * + * @return the field "tabindex" attribute value + */ + public int getTabIndex() { + return tabindex; + } + + /** + * Set the field "tabindex" attribute value. + * + * @param tabindex the field "tabindex" attribute value + */ + public void setTabIndex(int tabindex) { + this.tabindex = tabindex; + } + + /** + * Return the field CSS "text-align" style, or null if not defined. + * + * @return the field CSS "text-align" style, or null if not defined. + */ + public String getTextAlign() { + return getStyle("text-align"); + } + + /** + * Set the field CSS horizontal "text-align" style. + * + * @param align the CSS "text-align" value: ["left", "right", "center"] + */ + public void setTextAlign(String align) { + setStyle("text-align", align); + } + + /** + * Return the 'title' attribute, or null if not defined. The title + * attribute acts like tooltip message over the Field. + *

+ * If the title value is null, this method will attempt to find a + * localized title message in the parent messages using the key: + *

+ * getName() + ".title" + *
+ * If not found then the message will be looked up in the + * /click-control.properties file using the same key. If still + * not found the title will be left as null and will not be rendered. + *

+ * For example given a CustomerPage with the properties file + * CustomerPage.properties: + * + *

+     * name.label=Customer Name
+     * name.title=Full name or Business name 
+ * + * The page TextField code: + *
+     * public class CustomerPage extends Page {
+     *     TextField nameField = new TextField("name");
+     *     ..
+     * } 
+ * + * Will render the TextField label and title properties as: + *
+     * <td><label>Customer Name</label></td>
+     * <td><input type="text" name="name" title="Full name or Business name"/></td> 
+ * + * @return the 'title' attribute tooltip message + */ + public String getTitle() { + if (title == null) { + title = getMessage(getName() + ".title"); + } + return title; + } + + /** + * Set the 'title' attribute tooltip message. + * + * @param value the 'title' attribute tooltip message + */ + public void setTitle(String value) { + title = value; + } + + /** + * Return true if the Field request value should be trimmed, false otherwise. + * The default value is "true". + * + * @return true if the Field request value should be trimmed, false otherwise + */ + public boolean isTrim() { + return trim; + } + + /** + * Set the trim flag to true if the Field request value should be trimmed, + * false otherwise. + * + * @param trim true if the Field request value should be trimmed, false + * otherwise + */ + public void setTrim(boolean trim) { + this.trim = trim; + } + + /** + * Return true if the Field should validate itself when being processed. + *

+ * If the validate attribute for the Field is not explicitly set, this + * method will return the validation status of its parent Form, see + * {@link Form#getValidate()}. If the Field validate attribute is not set + * and the parent Form is not set this method will return true. + *

+ * This method is called by the {@link #onProcess()} method to determine + * whether the the Field {@link #validate()} method should be invoked. + * + * @return true if the Field should validate itself when being processed. + */ + public boolean getValidate() { + if (validate != null) { + return validate; + + } else if (getForm() != null) { + return getForm().getValidate(); + + } else { + return true; + } + } + + /** + * Set the validate Field value when being processed flag. + * + * @param validate the field value when processed + */ + public void setValidate(boolean validate) { + this.validate = validate; + } + + /** + * Return the field JavaScript client side validation function. + *

+ * The function name must follow the format validate_[id], where + * the id is the DOM element id of the fields focusable HTML element, to + * ensure the function has a unique name. + * + * @return the field JavaScript client side validation function + */ + public String getValidationJavaScript() { + return null; + } + + /** + * Return true if the Field is valid after being processed, or false + * otherwise. If the Field has no error message after + * {@link org.apache.click.Control#onProcess()} has been invoked it is considered to be + * valid. + * + * @return true if the Field is valid after being processed + */ + public boolean isValid() { + return (error == null); + } + + /** + * Return the Field value. + * + * @return the Field value + */ + public String getValue() { + return (value != null) ? value : ""; + } + + /** + * Set the Field value. + * + * @param value the Field value + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Return the object representation of the Field value. This method will + * return a string value, or null if the string value is null or is zero + * length. + *

+ * Specialized object field subclasses should override this method to + * return a non string object. For examples a DoubleField would + * return a Double value instead. + * + * @return the object representation of the Field value + */ + public Object getValueObject() { + if (value == null || value.length() == 0) { + return null; + } else { + return value; + } + } + + /** + * Set the value of the field using the given object. + * + * @param object the object value to set + */ + public void setValueObject(Object object) { + if (object != null) { + value = object.toString(); + } + } + + /** + * Return the width CSS "width" style, or null if not defined. + * + * @return the CSS "width" style attribute, or null if not defined + */ + public String getWidth() { + return getStyle("width"); + } + + /** + * Set the the CSS "width" style attribute. + * + * @param value the CSS "width" style attribute + */ + public void setWidth(String value) { + setStyle("width", value); + } + + // Public Methods --------------------------------------------------------- + + /** + * This method binds the submitted request value to the Field's value. + *

+ * Please note: while it is possible to explicitly bind the field + * value by invoking this method directly, it is recommended to use the + * "bind" utility methods in {@link org.apache.click.util.ClickUtils} + * instead. See {@link org.apache.click.util.ClickUtils#bind(org.apache.click.control.Field)} + * for more details. + */ + public void bindRequestValue() { + setValue(getRequestValue()); + } + + /** + * Return the Field state. The following state is returned: + *

    + *
  • {@link #getValue() field value}
  • + *
+ * + * @return the Field state + */ + public Object getState() { + String state = getValue(); + if (StringUtils.isEmpty(state)) { + return null; + } + return state; + } + + /** + * Set the Field state. + * + * @param state the Field state to set + */ + public void setState(Object state) { + if (state == null) { + return; + } + + String fieldState = (String) state; + setValue(fieldState); + } + + /** + * This method processes the page request returning true to continue + * processing or false otherwise. The Field onProcess() method is + * typically invoked by the Form onProcess() method when + * processing POST request. + *

+ * This method will bind the Field request parameter value to the field, + * validate the submission and invoke its callback listener if defined. + *

+ * Below is a typical onProcess implementation: + * + *

+     * public boolean onProcess() {
+     *     bindRequestValue();
+     *
+     *     if (getValidate()) {
+     *         validate();
+     *     }
+     *
+     *     registerActionEvent();
+     *
+     *     return true
+     * } 
+ * + * @return true to continue Page event processing or false otherwise + */ + @Override + public boolean onProcess() { + Context context = getContext(); + + if (context.hasRequestParameter(getName())) { + // Only process field if it participated in the incoming request + setDisabled(false); + + bindRequestValue(); + + if (getValidate()) { + validate(); + } + + dispatchActionEvent(); + } + + return true; + } + + /** + * Remove the Field state from the session for the given request context. + * + * @see #saveState(Context) + * @see #restoreState(Context) + * + * @param context the request context + */ + public void removeState(Context context) { + ClickUtils.removeState(this, getName(), context); + } + + /** + * Restore the Field state from the session for the given request context. + *

+ * This method delegates to {@link #setState(java.lang.Object)} to set the + * field restored state. + * + * @see #saveState(Context) + * @see #removeState(Context) + * + * @param context the request context + */ + public void restoreState(Context context) { + ClickUtils.restoreState(this, getName(), context); + } + + /** + * Save the Field state to the session for the given request context. + *

+ * * This method delegates to {@link #getState()} to retrieve the field state + * to save. + * + * @see #restoreState(Context) + * @see #removeState(Context) + * + * @param context the request context + */ + public void saveState(Context context) { + ClickUtils.saveState(this, getName(), context); + } + + /** + * The validate method is invoked by onProcess() to validate + * the request submission. Field subclasses should override this method + * to implement request validation logic. + *

+ * If the field determines that the submission is invalid it should set the + * {@link #error} property with the error message. + */ + public void validate() { + } + + // Protected Methods ------------------------------------------------------ + + /** + * Return a normalized label for display in error messages. + *

+ * The error label is a normalized version of {@link #getLabel()}. + * + * @return a normalized label for error message display + */ + protected String getErrorLabel() { + String localLabel = getLabel().trim(); + localLabel = (localLabel.endsWith(":")) + ? localLabel.substring(0, localLabel.length() - 1) : localLabel; + return localLabel; + } + + /** + * Set the error with the a label formatted message specified by the given + * message bundle key. The message will be formatted with the field label + * using {@link #getErrorLabel()}. + *

+ * setErrorMessage will attempt to find a localized error message as + * described here, using the following + * lookup strategy: + *

    + *
  • + * an error message is looked up for a specific Field instance by + * prefixing the key with the Field's name: + *
    + * getMessage(getName() + "." + key); + *
    + *
  • + *
  • + * if no message is found for a specific Field instance, an error + * message is looked up for the Field class based on the key: + *
    + * getMessage(key); + *
    + *
  • + *
+ * + * @param key the key of the localized message bundle string + */ + protected void setErrorMessage(String key) { + String errorLabel = getErrorLabel(); + String msg = getMessage(getName() + "." + key, errorLabel); + if (msg == null) { + msg = getMessage(key, errorLabel); + } + setError(msg); + } + + /** + * Set the error with the a label and value formatted message specified by + * the given message bundle key. The message will be formatted with the + * field label {0} using {@link #getErrorLabel()} and the given value {1}. + *

+ * Also see {@link #setErrorMessage(java.lang.String)} on how to + * specify error messages for specific Field instances. + * + * @param key the key of the localized message bundle string + * @param value the value to format in the message + */ + protected void setErrorMessage(String key, T value) { + String msg = getMessage(getName() + "." + key, getErrorLabel(), value); + if (msg == null) { + msg = getMessage(key, getErrorLabel(), value); + } + setError(msg); + } + + /** + * Return the field's value from the request. + * + * @return the field's value from the request + */ + protected String getRequestValue() { + String requestValue = getContext().getRequestParameter(getName()); + if (requestValue != null) { + if (isTrim()) { + return requestValue.trim(); + } else { + return requestValue; + } + } else { + return ""; + } + } + + /** + * Render the Field tag and common attributes including {@link #getName() name}, + * {@link #getId() id}, class and style. + * + * @see org.openidentityplatform.openam.click.control.AbstractControl#renderTagBegin(java.lang.String, HtmlStringBuffer) + * + * @param tagName the name of the tag to render + * @param buffer the buffer to append the output to + */ + @Override + protected void renderTagBegin(String tagName, HtmlStringBuffer buffer) { + if (tagName == null) { + throw new IllegalStateException("Tag cannot be null"); + } + + buffer.elementStart(tagName); + + String controlName = getName(); + if (controlName != null) { + buffer.appendAttribute("name", controlName); + } + + String id = getId(); + if (id != null) { + buffer.appendAttribute("id", id); + } + + appendAttributes(buffer); + } +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/FileField.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/FileField.java new file mode 100644 index 0000000000..91c6b007af --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/FileField.java @@ -0,0 +1,358 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click.control; + +import org.openidentityplatform.openam.click.Context; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.lang.StringUtils; + +import java.text.MessageFormat; + +/** + * Provides a File Field control:   <input type='file'>. + * + * + * + * + * + * + *
File Field
+ * + * The FileField control uses the Jakarta Commons + * FileUpload + * library to provide file processing functionality. + *

+ * You can control the {@link org.apache.click.service.CommonsFileUploadService#sizeMax maximum request size} + * and {@link org.apache.click.service.CommonsFileUploadService#fileSizeMax maximum file size} + * by configuring {@link org.apache.click.service.CommonsFileUploadService}. + *

+ * Note Browsers enforce the JavaScript value property as readonly + * to prevent script based stealing of users files. + *

+ * You can make the file field invisible by setting the CSS display attribute, for + * example: + * + *

+ * <form method="POST" enctype="multipart/form-data">
+ *    <input type="file" name="myfile" style="display:none" onchange="fileName=this.value">
+ *    <input type="button" value="open file" onclick="myfile.click()">
+ *    <input type="button" value="show value" onclick="alert(fileName)">
+ * </form> 
+ * + *

+ * Please also see the references: + *

+ */ +public class FileField extends Field { + + // -------------------------------------------------------------- Constants + + private static final long serialVersionUID = 1L; + + /** + * The field validation JavaScript function template. + * The function template arguments are:
    + *
  • 0 - is the field id
  • + *
  • 1 - is the Field required status
  • + *
  • 2 - is the localized error message
  • + *
+ */ + protected final static String VALIDATE_FILEFIELD_FUNCTION = + "function validate_{0}() '{'\n" + + " var msg = validateFileField(''{0}'',{1}, [''{2}'']);\n" + + " if (msg) '{'\n" + + " return msg + ''|{0}'';\n" + + " '}' else '{'\n" + + " return null;\n" + + " '}'\n" + + "'}'\n"; + + // ----------------------------------------------------- Instance Variables + + /** The text field size attribute. The default size is 20. */ + protected int size = 20; + + /** + * The + * DefaultFileItem + * after processing a file upload request. + */ + protected FileItem fileItem; + + // ----------------------------------------------------------- Constructors + + /** + * Construct the FileField with the given name. + * + * @param name the name of the field + */ + public FileField(String name) { + super(name); + } + + /** + * Construct the FileField with the given name and required status. + * + * @param name the name of the field + * @param required the field required status + */ + public FileField(String name, boolean required) { + super(name); + setRequired(required); + } + + /** + * Construct the FileField with the given name and label. + * + * @param name the name of the field + * @param label the label of the field + */ + public FileField(String name, String label) { + super(name, label); + } + + + /** + * Construct the FileField with the given name, label and required status. + * + * @param name the name of the field + * @param label the label of the field + * @param required the required status + */ + public FileField(String name, String label, boolean required) { + super(name, label); + setRequired(required); + } + + /** + * Construct the FileField with the given name, label and size. + * + * @param name the name of the field + * @param label the label of the field + * @param size the size of the field + */ + public FileField(String name, String label, int size) { + this(name, label); + setSize(size); + } + + /** + * Create an FileField with no name defined. + *

+ * Please note the control's name must be defined before it is valid. + */ + public FileField() { + super(); + } + + // ------------------------------------------------------ Public Attributes + + /** + * Return the FileField's html tag: input. + * + * @see org.apache.click.control.AbstractControl#getTag() + * + * @return this controls html tag + */ + @Override + public String getTag() { + return "input"; + } + + /** + * Return the FileItem + * after processing the request, or null otherwise. + * + * @return the FileItem after processing a request + */ + public FileItem getFileItem() { + return fileItem; + } + + /** + * Return the field size. + * + * @return the field size + */ + public int getSize() { + return size; + } + + /** + * Set the field size. + * + * @param size the field size + */ + public void setSize(int size) { + this.size = size; + } + + /** + * Return the input type: 'file'. + * + * @return the input type: 'file' + */ + public String getType() { + return "file"; + } + + /** + * Return the FileField JavaScript client side validation function. + * + * @return the field JavaScript client side validation function + */ + @Override + public String getValidationJavaScript() { + if (isRequired()) { + Object[] args = new Object[3]; + args[0] = getId(); + args[1] = String.valueOf(isRequired()); + args[2] = getMessage("file-required-error", getErrorLabel()); + + return MessageFormat.format(VALIDATE_FILEFIELD_FUNCTION, args); + + } else { + return null; + } + } + + // --------------------------------------------------------- Public Methods + + /** + * Set the {@link #fileItem} property from the multi-part form data + * submission. + */ + @Override + public void bindRequestValue() { + fileItem = getContext().getFileItem(getName()); + } + + /** + * @see AbstractControl#getControlSizeEst() + * + * @return the estimated rendered control size in characters + */ + @Override + public int getControlSizeEst() { + return 96; + } + + /** + * Overrides onProcess to use {@link Context#getFileItem(String)}. + * + * @see Field#onProcess() + * + * @return true to continue Page event processing or false otherwise + */ + @Override + public boolean onProcess() { + Context context = getContext(); + + if (context.getFileItemMap().containsKey(getName())) { + // Only process field if it participated in the incoming request + setDisabled(false); + + bindRequestValue(); + + if (getValidate()) { + validate(); + } + + dispatchActionEvent(); + } + + return true; + } + + /** + * Render the HTML representation of the FileField. + * + * @see #toString() + * + * @param buffer the specified buffer to render the control's output to + */ + @Override + public void render(HtmlStringBuffer buffer) { + buffer.elementStart(getTag()); + + buffer.appendAttribute("type", getType()); + buffer.appendAttribute("name", getName()); + buffer.appendAttribute("id", getId()); + buffer.appendAttributeEscaped("value", getValue()); + buffer.appendAttribute("size", getSize()); + buffer.appendAttribute("title", getTitle()); + if (isValid()) { + removeStyleClass("error"); + } else { + addStyleClass("error"); + } + if (getTabIndex() > 0) { + buffer.appendAttribute("tabindex", getTabIndex()); + } + + appendAttributes(buffer); + + if (isDisabled()) { + buffer.appendAttributeDisabled(); + } + if (isReadonly()) { + buffer.appendAttributeReadonly(); + } + + buffer.elementEnd(); + + if (getHelp() != null) { + buffer.append(getHelp()); + } + } + + /** + * Validate the FileField request submission. + *

+ * A field error message is displayed if a validation error occurs. + * These messages are defined in the resource bundle: + *

+ *
    + *
  • /click-control.properties + *
      + *
    • file-required-error
    • + *
    + *
  • + *
+ *
+ */ + @Override + public void validate() { + setError(null); + + if (isRequired()) { + FileItem localFileItem = getFileItem(); + if (localFileItem == null || StringUtils.isBlank(localFileItem.getName())) { + setErrorMessage("file-required-error"); + } + } + } + +} diff --git a/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Form.java b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Form.java new file mode 100644 index 0000000000..c53a15c637 --- /dev/null +++ b/openam-core/src/main/java/org/openidentityplatform/openam/click/control/Form.java @@ -0,0 +1,3175 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.openidentityplatform.openam.click.control; + +import org.openidentityplatform.openam.click.Context; +import org.openidentityplatform.openam.click.Control; +import org.openidentityplatform.openam.click.Page; +import org.apache.click.Stateful; +import org.apache.click.control.FieldSet; +import org.apache.click.control.Submit; +import org.openidentityplatform.openam.click.element.CssImport; +import org.openidentityplatform.openam.click.element.Element; +import org.openidentityplatform.openam.click.element.JsImport; +import org.apache.click.service.FileUploadService; +import org.openidentityplatform.openam.click.service.LogService; +import org.openidentityplatform.openam.click.util.ClickUtils; +import org.openidentityplatform.openam.click.util.ContainerUtils; +import org.openidentityplatform.openam.click.util.HtmlStringBuffer; +import org.apache.commons.fileupload.FileUploadBase.FileSizeLimitExceededException; +import org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException; +import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.lang.StringUtils; + +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.StringTokenizer; + +/** + * Provides a Form control:   <form method='post'>. + * + * + * + * + * + *
+ * + * + * + * + * + * + * + * + * + * + *
*
*
+ * + * + *
+ *   + *
+ * + *
+ * + * When a Form is processed it will process its {@link Field} controls + * in the order they were added to the form, and then it will process the + * {@link Button} controls in the added order. Once all the Fields have been + * processed the form will invoke its action listener if defined. + * + *

Form Example

+ * + * The example below illustrates a Form being used in a login Page. + * + *
+ * public class Login extends Page {
+ *
+ *     public Form form = new Form();
+ *
+ *     public Login() {
+ *         form.add(new TextField("username", true));
+ *         form.add(new PasswordField("password", true));
+ *         form.add(new Submit("ok", "  OK  ", this, "onOkClick"));
+ *         form.add(new Submit("cancel", this, "onCancelClick"));
+ *     }
+ *
+ *     public boolean onOkClick() {
+ *         if (form.isValid()) {
+ *             User user = new User();
+ *             form.copyTo(user);
+ *
+ *             if (getUserService().isAuthenticatedUser(user)) {
+ *                 getContext().setSessionAttribute("user", user);
+ *                 setRedirect(HomePage.class);
+ *             } else {
+ *                 form.setError(getMessage("authentication-error"));
+ *             }
+ *         }
+ *         return true;
+ *     }
+ *
+ *     public boolean onCancelClick() {
+ *         setRedirect(WelcomePage.class);
+ *         return false;
+ *     }
+ * } 
+ * + * The forms corresponding template code is below. Note the form automatically + * renders itself when Velocity invokes its {@link #toString()} method. + * + *
+ * $form 
+ * + * If a Form has been posted and processed, if it has an {@link #error} defined or + * any of its Fields have validation errors they will be automatically + * rendered, and the {@link #isValid()} method will return false. + * + * + *

Data Binding

+ * + * To bind value objects to a forms fields use the copy methods: + *
    + *
  • value object   ->   form fields       + * {@link #copyFrom(Object)}
  • + *
  • form fields   ->   value object       + * {@link #copyTo(Object)}
  • + *
+ * To debug the data binding being performed, use the Click application mode to + * "debug" or use the debug copy methods. + *

+ * Binding of nested data objects is supported using the + * OGNL library. To use + * nested objects in your form, simply specify the object path as the Field + * name. Note in the object path you exclude the root object, so the path + * customer.address.state is specified as address.state. + *

+ * For example: + * + *

+ * // The customer.address.state field
+ * TextField stateField = new TextField("address.state");
+ * form.add(stateField);
+ * ..
+ *
+ * // Loads the customer address state into the form stateField
+ * Customer customer = getCustomer();
+ * form.copyFrom(customer);
+ * ..
+ *
+ * // Copies form stateField value into the customer address state
+ * Customer customer = new Customer();
+ * form.copyTo(customer); 
+ * + * When populating an object from a form post Click will automatically create + * any null nested objects so their properties can be set. To do this Click + * uses the no-args constructor of the nested objects class. + *

+ * {@link #copyTo(Object)} and {@link #copyFrom(Object)} also supports + * java.util.Map as an argument. Examples of using + * java.util.Map are shown in the respective method descriptions. + * + * + *

Form Validation

+ * + * The Form control supports automatic field validation. By default when a POST + * request is made the form will validate the field values. To disable + * automatic validation set {@link #setValidate(boolean)} to false. + *

+ * Form also provides a {@link #validate()} method where subclasses can provide + * custom cross-field validation. + *

+ * File Upload Validation + *

+ * The Form's {@link #validateFileUpload()} provides validation for multipart + * requests (multipart requests are used for uploading files from the browser). + * The {@link #validateFileUpload()} method checks that files being uploaded do not exceed the + * {@link org.apache.click.service.CommonsFileUploadService#sizeMax maximum request size} + * or the {@link org.apache.click.service.CommonsFileUploadService#fileSizeMax maximum file size}. + *

+ * Note: if the maximum request size or maximum file size + * is exceeded, the request is deemed invalid ({@link #hasPostError hasPostError} + * will return true), and no further processing is performed on the form or fields. + * Instead the form will display the appropriate error message for the invalid request. + * See {@link #validateFileUpload()} for details of the error message properties. + *

+ * JavaScript Validation + *

+ * The Form control also supports client side JavaScript validation. By default + * JavaScript validation is not enabled. To enable JavaScript validation set + * {@link #setJavaScriptValidation(boolean)} to true. For example: + * + *

+ * Form form = new Form("form");
+ * form.setJavaScriptValidation(true);
+ *
+ * // Add form fields
+ * ..
+ *
+ * form.add(new Submit("ok", " OK ", this, "onOkClicked");
+ *
+ * Submit cancel = new Submit("cancel", "Cancel", this, "onCancelClicked");
+ * cancel.setCancelJavaScriptValidation(true);
+ *
+ * addControl(form); 
+ * + * Please note in that is this example the cancel submit button has + * {@link Submit#setCancelJavaScriptValidation(boolean)} set to true. This + * prevents JavaScript form validation being performed when the cancel button is + * clicked. + * + * + *

CSS and JavaScript resources

+ * + * The Form control makes use of the following resources (which Click automatically + * deploys to the application directory, /click): + * + *
    + *
  • click/control.css
  • + *
  • click/control.js
  • + *
+ * + * To import these files and any form control imports simply reference + * the variables $headElements and + * $jsElements in the page template. For example: + * + *
+ * <html>
+ * <head>
+ * $headElements
+ * </head>
+ * <body>
+ *
+ * $form
+ *
+ * $jsElements
+ * </body>
+ * </html> 
+ * + * + *

Form Layout

+ * The Form control supports rendering using automatic and manual layout + * techniques. + * + * + *

Auto Layout

+ * + * If you include a form variable in your template the form will be + * automatically laid out and rendered. Auto layout, form and field rendering + * options include: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
{@link #buttonAlign} button alignment:   ["left", "center", "right"]
{@link #buttonStyle} button <td> "style" attribute value
{@link #columns} number of form table columns, the default value number is 1
{@link #errorsAlign} validation error messages alignment:   ["left", "center", "right"]
{@link #errorsPosition} validation error messages position:   ["top", "middle", "bottom"]
{@link #errorsStyle} errors <td> "style" attribute value
{@link #fieldStyle} field <td> "style" attribute value
{@link #labelAlign} field label alignment:   ["left", "center", "right"]
{@link #labelsPosition} label position relative to field:   ["left", "top"]
{@link #labelStyle} label <td> "style" attribute value
click/control.css control CSS styles, automatically deployed to the click web directory
/click-control.properties form and field messages and HTML, located under classpath
+ * + * + *

Manual Layout

+ * + * You can also manually layout the Form in the page template specifying + * the fields using the named field notation: + * + *
+ * $form.{@link #getFields fields}.usernameField 
+ * + * Whenever including your own Form markup in a page template or Velocity macro + * always specify: + *
    + *
  • method + * - the form submission method ["post" | "get"]
  • + *
  • name + * - the name of your form, important when using JavaScript
  • + *
  • action + * - directs the Page where the form should be submitted to
  • + *
  • form_name + * - include a hidden field which specifies the {@link #name} of the Form
  • + *
+ * The hidden field is used by Click to determine which form was posted on + * a page which may contain multiple forms. + *

+ * Alternatively you can use the Form {@link #startTag()} and {@link #endTag()} + * methods to render this information. + *

+ * An example of a manually laid out Login form is provided below: + * + *

+ * $form.startTag()
+ *
+ *   <table style="margin: 1em;">
+ *
+ *     #if ($form.error)
+ *     <tr>
+ *       <td colspan="2" style="color: red;"> $form.error </td>
+ *     </tr>
+ *     #end
+ *     #if ($form.fields.usernameField.error)
+ *     <tr>
+ *       <td colspan="2" style="color: red;"> $form.fields.usernameField.error </td>
+ *     </tr>
+ *     #end
+ *     #if ($form.fields.passwordField.error)
+ *     <tr>
+ *       <td colspan="2" style="color: red;"> $form.fields.passwordField.error </td>
+ *     </tr>
+ *     #end
+ *
+ *     <tr>
+ *       <td> Username: </td>
+ *       <td> $form.fields.usernameField </td>
+ *     </tr>
+ *     <tr>
+ *       <td> Password: </td>
+ *       <td> $form.fields.passwordField </td>
+ *     </tr>
+ *
+ *     <tr>
+ *       <td>
+ *         $form.fields.okSubmit
+ *         $form.fields.cancelSubmit
+ *       </td>
+ *     </tr>
+ *
+ *   </table>
+ *
+ * $form.endTag() 
+ * + * As you can see in this example most of the code and markup is generic and + * could be reused. This is where Velocity Macros come in. + * + * + *

Velocity Macros

+ * + * Velocity Macros + * (velocimacros) + * are a great way to encapsulate customized forms. + *

+ * To create a generic form layout you can use the Form {@link #getFieldList()} and + * {@link #getButtonList()} properties within a Velocity macro. If you want to + * access all Form Controls from within a Velocity template or macro use + * {@link #getControls()}. + *

+ * The example below provides a generic writeForm() + * macro which you could use through out an application. This Velocity macro code + * would be contained in a macro file, e.g. macro.vm. + * + *

 #* Custom Form Macro Code *#
+ * #macro( writeForm[$form] )
+ *
+ * $form.startTag()
+ *
+ * <table width="100%">
+ *
+ * #if ($form.error)
+ *   <tr>
+ *     <td colspan="2" style="color: red;"> $form.error </td>
+ *   </tr>
+ * #end
+ *
+ * #foreach ($field in $form.fieldList)
+ *   #if (!$field.hidden)
+ *     #if (!$field.valid)
+ *     <tr>
+ *       <td colspan="2"> $field.error </td>
+ *     </tr>
+ *     #end
+ *
+ *   <tr>
+ *     <td> $field.label: </td><td> $field </td>
+ *   </tr>
+ *   #end
+ * #end
+ *
+ *  <tr>
+ *    <td colspan="2">
+ *    #foreach ($button in $form.buttonList)
+ *      $button &nbsp;
+ *    #end
+ *    </td>
+ *  </tr>
+ *
+ * </table>
+ *
+ * $form.endTag()
+ *
+ * #end 
+ * + * You would then call this macro in your Page template passing it your + * form object: + * + *
 #writeForm($form) 
+ * + * At render time Velocity will execute the macro using the given form and render + * the results to the response output stream. + * + *

Configuring Macros

+ * + * To configure your application to use your macros you can: + *
    + *
  • + * Put your macros if a file called macro.vm + * in your applications root directory. + *
  • + *
  • + * Put your macros in the auto deployed + * click/VM_global_macro.vm file. + *
  • + *
  • + * Create a custom named macro file and reference it in a + * WEB-INF/velocity.properties + * file under the property named + * velocimacro.library. + *
  • + *
+ * + * + *

Preventing Accidental Form Posts

+ * + * Users may accidentally make multiple form submissions by refreshing a page + * or by pressing the back button. + *

+ * To prevent multiple form posts from page refreshes use the Post + * Redirect pattern. With this pattern once the user has posted a form you + * redirect to another page. If the user then presses the refresh button, they + * will making a GET request on the current page. Please see the + * Redirect After Post + * article for more information on this topic. + *

+ * To prevent multiple form posts from use of the browser back button use one + * of the Form {@link #onSubmitCheck(Page, String)} methods. For example: + * + *

+ * public class Purchase extends Page {
+ *     ..
+ *
+ *     public boolean onSecurityCheck() {
+ *         return form.onSubmitCheck(this, "/invalid-submit.html");
+ *     }
+ * } 
+ * + * The form submit check methods store a special token in the users session + * and in a hidden field in the form to ensure a form post isn't replayed. + * + * + *

Dynamic Forms and not validating a request

+ * + * A common use case for web applications is to create Form fields dynamically + * based upon user selection. For example if a checkbox is ticked another Field + * is added to the Form. A simple way to achieve this is using JavaScript + * to submit the Form when the Field is changed or clicked. + *

+ * When submitting a Form using JavaScript, it is often desirable to not + * validate the fields since the user is still filling out the form. + * To cater for this use case, Form provides the {@link #setValidate(boolean)} + * to switch off form and field validation. For example: + * + *

+ * public void onInit() {
+ *     checkbox.setAttribute("onclick", "form.submit()");
+ *
+ *     // Since onInit occurs before the onProcess event,
+ *     // we have to explicitly bind the submit button in the onInit event if we
+ *     // want to check if it was clicked.
+ *     // If the submit button wasn't clicked it means the Form was submitted
+ *     // using JavaScript and we don't want to validate yet
+ *     ClickUtils.bind(submit);
+ *
+ *     // If submit was not clicked, don't validate
+ *     if(form.isFormSubmission() && !submit.isClicked()) {
+ *         form.setValidate(false);
+ *     }
+ * } 
+ * + *

 

+ * See also the W3C HTML reference: + * FORM + * + * @see org.openidentityplatform.openam.click.control.Field + * @see Submit + */ +public class Form extends AbstractContainer implements Stateful { + + // Constants -------------------------------------------------------------- + + private static final long serialVersionUID = 1L; + + /** The align left, form layout constant:   "left". */ + public static final String ALIGN_LEFT = "left"; + + /** The align center, form layout constant:   "center". */ + public static final String ALIGN_CENTER = "center"; + + /** The align right, form layout constant:   "right". */ + public static final String ALIGN_RIGHT = "right"; + + /** + * The position top, errors and labels form layout constant:   + * "top". + */ + public static final String POSITION_TOP = "top"; + + /** + * The position middle, errors in middle form layout constant:   + * "middle". + */ + public static final String POSITION_MIDDLE = "middle"; + + /** + * The position bottom, errors on bottom form layout constant:   + * "top". + */ + public static final String POSITION_BOTTOM = "bottom"; + + /** + * The position left, labels of left form layout constant:   + * "left". + */ + public static final String POSITION_LEFT = "left"; + + /** + * The form name parameter for multiple forms:   "form_name". + */ + public static final String FORM_NAME = "form_name"; + + /** The HTTP content type header for multipart forms. */ + public static final String MULTIPART_FORM_DATA = "multipart/form-data"; + + /** + * The submit check reserved request parameter prefix:   + * SUBMIT_CHECK_. + */ + public static final String SUBMIT_CHECK = "SUBMIT_CHECK_"; + + /** The Form set field focus JavaScript. */ + protected static final String FOCUS_JAVASCRIPT = + "\n"; + + // Instance Variables ----------------------------------------------------- + + /** The form action URL. */ + protected String actionURL; + + /** The form disabled value. */ + protected boolean disabled; + + /** The form "enctype" attribute. */ + protected String enctype; + + /** The form level error message. */ + protected String error; + + /** The ordered list of fields, excluding buttons. */ + protected final List fieldList = new ArrayList<>(); + + /** + * The form method ["post, "get"], default value:   + * post. + */ + protected String method = "post"; + + /** The form is readonly flag. */ + protected boolean readonly; + + /** The form validate fields when processing flag. */ + protected boolean validate = true; + + /** The button align, default value is "left". */ + protected String buttonAlign = ALIGN_LEFT; + + /** The ordered list of button values. */ + protected final List